/* RPS Game Specific Styles */

.back-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s;
}

.back-link:hover {
  background: var(--btn-bg-hover);
  color: var(--text);
}

.game-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}

.game-area {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  position: relative;
}

.player-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: var(--card);
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  min-height: 320px;
}

.player-area h2 {
  margin: 0;
  font-size: 18px;
  color: var(--primary-bg1);
  filter: brightness(1.5);
}

/* Mode Selector */
.mode-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
    background: var(--btn-bg);
    padding: 4px;
    border-radius: 8px;
}

.mode-btn {
    padding: 6px 12px;
    font-size: 12px;
    border: none;
    background: transparent;
    color: var(--muted);
    border-radius: 6px;
    cursor: pointer;
    min-height: auto;
}

.mode-btn.active {
    background: var(--card);
    color: var(--text);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    font-weight: bold;
}

/* Containers */
.webcam-container,
.upload-container,
.computer-placeholder {
  width: 200px;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0,0,0,0.3);
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid var(--border);
  position: relative;
}

.hidden {
    display: none !important;
}

.webcam-container canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Upload Styles */
.image-preview-wrapper {
    width: 100%;
    height: 100%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

#uploaded-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--muted);
    gap: 8px;
}

.upload-placeholder span {
    font-size: 32px;
}

.upload-placeholder p {
    margin: 0;
    font-size: 12px;
}

.computer-placeholder {
  font-size: 80px;
}

.vs-badge {
  font-weight: 900;
  font-size: 24px;
  color: var(--muted);
  background: var(--bg);
  padding: 8px;
  border-radius: 50%;
  border: 1px solid var(--border);
  z-index: 10;
}

.prediction-bar {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
  color: var(--text);
}

.controls {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

#btnStartGame {
  width: 100%;
  max-width: 300px;
  font-size: 18px;
  padding: 14px;
}

.game-message {
  font-size: 16px;
  color: var(--muted);
  min-height: 24px;
  text-align: center;
}

.game-message.countdown {
  font-size: 32px;
  font-weight: bold;
  color: var(--text);
  animation: pulse 0.5s infinite alternate;
}

@keyframes pulse {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

.score-board {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  width: 100%;
  gap: 12px;
  margin-top: 10px;
}

.score-item {
  background: var(--btn-bg);
  padding: 12px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--border);
}

.score-item .label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.score-item .value {
  font-size: 20px;
  font-weight: bold;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
  .game-area {
    flex-direction: column;
  }
  
  .vs-badge {
    margin: -20px 0;
  }
}