/* Player Game Controller */
.player-game {
  min-height: 100vh;
  min-height: 100dvh;
  background: #f5f5f0;
  color: #1a1a1a;
  display: flex;
  flex-direction: column;
}

.game-phase {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem;
}

.game-phase.hidden {
  display: none;
}

/* Phase Header */
.phase-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  margin-bottom: 1rem;
}

.round-indicator {
  font-size: 1rem;
  font-weight: 600;
  color: #666;
  background: #fff;
  padding: 0.5rem 1rem;
  border-radius: 20px;
}

.score-display {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a1a1a;
  background: #f0e500;
  padding: 0.5rem 1rem;
  border-radius: 20px;
}

/* ============ BUZZ PHASE ============ */
.buzz-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.buzz-hint {
  font-size: 1.1rem;
  color: #666;
  text-align: center;
}

.buzz-btn {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff4444, #cc0000);
  border: none;
  cursor: pointer;
  box-shadow: 
    0 10px 30px rgba(204, 0, 0, 0.4),
    inset 0 -8px 20px rgba(0, 0, 0, 0.3),
    inset 0 8px 20px rgba(255, 255, 255, 0.2);
  transition: transform 0.1s, box-shadow 0.1s;
  position: relative;
}

.buzz-btn::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 20%;
  width: 30%;
  height: 20%;
  background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, transparent 100%);
  border-radius: 50%;
}

.buzz-btn:active {
  transform: scale(0.95);
  box-shadow: 
    0 5px 15px rgba(204, 0, 0, 0.4),
    inset 0 -4px 10px rgba(0, 0, 0, 0.3),
    inset 0 4px 10px rgba(255, 255, 255, 0.2);
}

.buzz-btn:disabled {
  background: linear-gradient(145deg, #888, #666);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  cursor: not-allowed;
}

.buzz-text {
  font-size: 2.5rem;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.buzz-risk {
  font-size: 0.9rem;
  color: #cc0000;
  text-align: center;
}

/* ============ BUZZ WON ============ */
.buzz-won-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
}

.buzz-won-icon {
  font-size: 4rem;
  animation: bounce 0.5s ease;
}

@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}

.buzz-won-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: #00c853;
}

.buzz-won-subtitle {
  font-size: 1rem;
  color: #666;
}

.buzz-won-waiting {
  font-size: 0.9rem;
  color: #888;
  margin-top: 1rem;
  animation: pulse 2s infinite;
}

/* ============ BUZZ LOST ============ */
.buzz-lost-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
}

.buzz-lost-text {
  font-size: 1.3rem;
  color: #666;
}

.buzz-lost-text span {
  font-weight: 700;
  color: #1a1a1a;
}

.buzz-lost-waiting {
  font-size: 0.9rem;
  color: #888;
  animation: pulse 2s infinite;
}

/* ============ ANSWER PHASE ============ */
.answer-phase, .ordering-phase {
  padding: 1rem;
}

.timer-bar {
  height: 8px;
  background: #eee;
  border-radius: 4px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.timer-progress {
  height: 100%;
  background: linear-gradient(90deg, #00c853, #f0e500);
  border-radius: 4px;
  width: 100%;
  transition: width 0.1s linear;
}

.timer-progress.warning {
  background: linear-gradient(90deg, #ff9800, #f0e500);
}

.timer-progress.danger {
  background: linear-gradient(90deg, #ff4444, #ff9800);
}

.answers-grid, .ordering-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0.75rem;
}

.answer-btn, .order-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.1s, opacity 0.2s;
  padding: 1rem;
  min-height: 120px;
}

.answer-btn:active, .order-btn:active {
  transform: scale(0.95);
}

.answer-btn:disabled, .order-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.answer-btn.selected, .order-btn.selected {
  outline: 4px solid #1a1a1a;
  outline-offset: -4px;
}

/* Answer Colors */
.answer-a { background: linear-gradient(145deg, #ff6b6b, #ee5a5a); color: #fff; }
.answer-b { background: linear-gradient(145deg, #4dabf7, #339af0); color: #fff; }
.answer-c { background: linear-gradient(145deg, #ffd43b, #fab005); color: #1a1a1a; }
.answer-d { background: linear-gradient(145deg, #69db7c, #51cf66); color: #fff; }

.answer-letter {
  font-size: 2rem;
  font-weight: 900;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.answer-text {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.bonus-indicator {
  text-align: center;
  padding: 0.75rem;
  background: #f0e500;
  border-radius: 12px;
  font-weight: 700;
  margin-top: 0.75rem;
  animation: pulse 1s infinite;
}

.bonus-indicator.hidden {
  display: none;
}

/* ============ ORDERING PHASE ============ */
.ordering-hint {
  text-align: center;
  color: #666;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.ordering-selection {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  min-height: 50px;
}

.order-slot {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.2rem;
  color: #fff;
}

.order-slot.empty {
  background: #eee;
  border: 2px dashed #ccc;
  color: #ccc;
}

.order-slot.answer-A { background: linear-gradient(145deg, #ff6b6b, #ee5a5a); }
.order-slot.answer-B { background: linear-gradient(145deg, #4dabf7, #339af0); }
.order-slot.answer-C { background: linear-gradient(145deg, #ffd43b, #fab005); color: #1a1a1a; }
.order-slot.answer-D { background: linear-gradient(145deg, #69db7c, #51cf66); }

.order-btn.used {
  opacity: 0.3;
  pointer-events: none;
}

.reset-order-btn {
  display: block;
  margin: 1rem auto 0;
  padding: 0.75rem 1.5rem;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}

.reset-order-btn:hover {
  background: #f5f5f5;
}

/* ============ ANSWER SUBMITTED ============ */
.submitted-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
}

.submitted-answer {
  width: 100px;
  height: 100px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 900;
  color: #fff;
}

.submitted-answer.answer-A { background: linear-gradient(145deg, #ff6b6b, #ee5a5a); }
.submitted-answer.answer-B { background: linear-gradient(145deg, #4dabf7, #339af0); }
.submitted-answer.answer-C { background: linear-gradient(145deg, #ffd43b, #fab005); color: #1a1a1a; }
.submitted-answer.answer-D { background: linear-gradient(145deg, #69db7c, #51cf66); }
.submitted-answer.answer-order { 
  width: auto;
  padding: 0 1.5rem;
  font-size: 1.5rem;
  background: #1a1a1a;
}

.submitted-text {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1a1a1a;
}

.submitted-waiting {
  font-size: 0.9rem;
  color: #888;
  animation: pulse 2s infinite;
}

/* ============ RESULT PHASE ============ */
.result-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
}

.result-icon {
  font-size: 5rem;
}

.result-title {
  font-size: 2rem;
  font-weight: 700;
}

.result-title.correct { color: #00c853; }
.result-title.wrong { color: #ff4444; }

.result-points {
  font-size: 1.5rem;
  font-weight: 600;
}

.result-points.positive { color: #00c853; }
.result-points.negative { color: #ff4444; }

.result-correct-answer {
  font-size: 1rem;
  color: #666;
  margin-top: 1rem;
}

/* Look at TV */
.result-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.look-at-tv {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  text-align: center;
}

.tv-icon {
  font-size: 5rem;
  animation: pulse 2s ease-in-out infinite;
}

.tv-message {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
}

/* ============ ANIMATIONS ============ */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ============ RESPONSIVE ============ */
@media (max-height: 600px) {
  .buzz-btn {
    width: 150px;
    height: 150px;
  }
  
  .buzz-text {
    font-size: 2rem;
  }
  
  .answer-btn, .order-btn {
    min-height: 90px;
  }
  
  .answer-letter {
    font-size: 1.5rem;
  }
}

@media (min-height: 800px) {
  .buzz-btn {
    width: 240px;
    height: 240px;
  }
  
  .buzz-text {
    font-size: 3rem;
  }
  
  .answer-btn, .order-btn {
    min-height: 150px;
  }
}
