/* Trivia Page Styles */

.join-panel, .info-panel {
  background: var(--bg-elev);
  border: 1px solid color-mix(in oklab, var(--text) 10%, transparent);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.player-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-elev);
  border: 1px solid color-mix(in oklab, var(--text) 15%, transparent);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
}

.score-display {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.score-display .label {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.9rem;
}

.score-display .value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}

.question-progress {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.break-screen, .game-over-screen {
  text-align: center;
  padding: 60px 20px;
  background: var(--bg-elev);
  border: 1px solid color-mix(in oklab, var(--text) 10%, transparent);
  border-radius: var(--radius);
}

.break-screen h2, .game-over-screen h2 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.final-score {
  margin: 20px 0;
}

.final-score .label {
  color: var(--muted);
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.final-score .value {
  font-size: 4rem;
  font-weight: 700;
  color: var(--accent);
}

.question-panel {
  background: var(--bg-elev);
  border: 1px solid color-mix(in oklab, var(--text) 10%, transparent);
  border-radius: var(--radius);
  padding: 24px;
}

.timer-bar-wrap {
  position: relative;
  background: color-mix(in oklab, var(--text) 10%, transparent);
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 24px;
}

.timer-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  width: 100%;
  transform-origin: left center;
  will-change: transform;
}

.timer-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  z-index: 1;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.question-text {
  font-size: 1.8rem;
  line-height: 1.4;
  margin-bottom: 16px;
  color: var(--text);
}

/* Timer Bar */
.timer-container {
  margin-bottom: 24px;
}

.timer-bar-bg {
  position: relative;
  width: 100%;
  height: 32px;
  background: color-mix(in oklab, var(--text) 10%, transparent);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 8px;
}

.timer-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 16px;
  transition: width 0.1s linear;
}

.decay-marker {
  position: absolute;
  left: 66.67%; /* 10 seconds out of 15 = 66.67% */
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.5);
  z-index: 1;
}

.decay-marker::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
}

.timer-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 600;
}

#timerText {
  color: var(--text);
}

#pointsText {
  color: var(--accent);
}

.choices-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 640px) {
  .choices-grid {
    grid-template-columns: 1fr;
  }
}

.choice-btn {
  padding: 16px;
  background: var(--bg);
  border: 2px solid color-mix(in oklab, var(--text) 20%, transparent);
  border-radius: 12px;
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.choice-btn:hover:not(:disabled) {
  background: color-mix(in oklab, var(--accent) 20%, var(--bg));
  border-color: var(--accent);
  transform: translateY(-2px);
}

.choice-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.choice-btn.correct {
  background: color-mix(in oklab, #4caf50 30%, var(--bg));
  border-color: #4caf50;
}

.choice-btn.incorrect {
  background: color-mix(in oklab, #ff6b6b 30%, var(--bg));
  border-color: #ff6b6b;
}

.result-panel {
  text-align: center;
  padding: 20px;
  background: var(--bg);
  border-radius: 12px;
  margin-top: 20px;
}

.result-panel.correct {
  border: 2px solid #4caf50;
}

.result-panel.incorrect {
  border: 2px solid #ff6b6b;
}

.leaderboard-list {
  background: var(--bg);
  border: 1px solid color-mix(in oklab, var(--text) 10%, transparent);
  border-radius: 12px;
  padding: 12px;
}

.leaderboard-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid color-mix(in oklab, var(--text) 8%, transparent);
}

.leaderboard-item:last-child {
  border-bottom: none;
}

.leaderboard-item .rank {
  font-weight: 700;
  color: var(--muted);
  min-width: 40px;
}

.leaderboard-item .name {
  flex: 1;
  font-weight: 600;
}

.leaderboard-item .score {
  font-weight: 700;
  color: var(--accent);
}

.about-section ul {
  line-height: 1.8;
}

/* Preview mode - visible but disabled */
.preview-mode {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}


.preview-mode.active {
  opacity: 1;
  pointer-events: auto;
}

.preview-mode.active::after {
  display: none;
}

/* Active mode - fully interactive */
.preview-mode.active {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.preview-mode.active .choice-btn {
  pointer-events: auto;
  cursor: pointer;
}

/* Players list */
.players-list {
  background: var(--bg);
  border: 1px solid color-mix(in oklab, var(--text) 10%, transparent);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.players-header {
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.players-names {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.6;
}

.review-choice {
  opacity: 0.7;
  transition: all 0.3s ease;
}

.review-choice.correct {
  opacity: 1;
  background: color-mix(in oklab, #4caf50 40%, var(--bg));
  border-color: #4caf50;
  transform: scale(1.05);
  box-shadow: 0 4px 12px color-mix(in oklab, #4caf50 30%, transparent);
}
