/* [split 4/9] servbg.com stylesheet: page content, quiz, nightmare, leaderboard, survival, stats page. Split from style.css on 2026-10-12 (lines 1750-3541 of the original); the nine css/*.css parts load in numbered order, then the terminal css/app.css. See style.css stub. */
/* === PAGE CONTENT STYLES === */
.page-content {
  padding: 10px 0;
}

/* About Page */
.about-header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.about-avatar {
  width: 80px;
  height: 80px;
  background: var(--bg-primary);
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 12px;
}

.about-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.about-title {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.about-handles {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 4px;
}

.about-socials {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.6;
}
.about-socials a { color: var(--accent); }

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.7;
}

.about-acronym {
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-primary));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border-color));
  border-radius: 4px;
  padding: 14px 16px;
  margin: 18px 0;
}

.about-acronym-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-align: center;
}

.about-acronym-expand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
}

.about-acronym-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0 2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}
.about-acronym-pair {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
}

.about-acronym-letter {
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
}

.about-acronym-word {
  color: var(--text-secondary);
  margin-right: 6px;
}

.about-acronym-note {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
}

/* About story timeline */
.about-story {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.about-story-chapter {
  display: flex;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border-color);
}

.about-story-chapter:first-child { padding-top: 0; }
.about-story-chapter:last-child  { border-bottom: none; }

.about-story-year {
  flex-shrink: 0;
  width: 72px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
  padding-top: 2px;
  letter-spacing: 0.04em;
}

.about-story-content p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
  margin: 0 0 10px;
}

.about-story-content p:last-child { margin-bottom: 0; }

.about-story-content code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--accent);
  background: var(--bg-primary);
  padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--border-color);
}

.about-story-note {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  border-left: 2px solid var(--border-color);
  padding-left: 10px;
  margin-top: 8px;
}

.about-footer-line {
  text-align: center;
  color: var(--accent);
  font-size: 13px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

/* Contact Form */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.form-input {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 13px;
  transition: border-color 0.15s;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-submit {
  width: 100%;
  background: var(--accent);
  border: none;
  border-radius: 4px;
  padding: 12px;
  color: #000;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.form-submit:hover {
  background: var(--accent-hover);
}

.form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-success {
  margin-top: 16px;
  padding: 12px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 4px;
  color: var(--accent);
  font-size: 13px;
  text-align: center;
}

.form-error {
  margin-top: 16px;
  padding: 12px;
  background: var(--error-dim);
  border: 1px solid var(--error);
  border-radius: 4px;
  color: var(--error);
  font-size: 13px;
  text-align: center;
}

/* Links Page */
.links-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.link-item {
  display: block;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 14px 16px;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s;
}

.link-item:hover {
  border-color: var(--accent);
  background: var(--bg-card);
}

.link-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
}

.link-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Quiz */
.quiz-content {
  min-height: 300px;
}

.quiz-categories {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.quiz-cat-btn {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px 12px;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
}

.quiz-cat-btn:hover {
  border-color: var(--accent);
  background: var(--bg-card);
}

.quiz-cat-btn.random {
  grid-column: span 2;
  background: var(--accent-dim);
  border-color: var(--accent-border);
}

.quiz-cat-btn.random:hover {
  background: var(--accent);
  color: #000;
}

.quiz-progress {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.quiz-question {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 16px;
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.5;
}

.quiz-answers {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quiz-answer {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.quiz-answer:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--bg-primary);
}

.quiz-answer:disabled {
  cursor: not-allowed;
}

.quiz-answer.correct {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.quiz-answer.wrong {
  background: var(--error-dim);
  border-color: var(--error);
  color: var(--error);
}

.quiz-feedback {
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
}

.quiz-correct { color: var(--accent); }
.quiz-wrong { color: var(--error); }

.quiz-final-score {
  text-align: center;
  padding: 30px 0;
}

.quiz-grade {
  font-size: 56px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.quiz-result-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.quiz-score-details {
  text-align: left;
}

.quiz-pct {
  font-size: 16px;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 4px;
}

.quiz-level-badge {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.level-nightmare {
  color: #f85149;
  font-weight: 600;
}

.level-standard {
  color: var(--text-secondary);
}

.quiz-time {
  font-size: 12px;
  color: var(--text-muted);
}

.quiz-final-score {
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 6px;
  padding: 12px 16px;
  margin: 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
  text-align: center;
}

.quiz-msg {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 12px 0;
  text-align: center;
}

.quiz-weak-area {
  font-size: 12px;
  color: var(--warning);
  background: var(--warning-dim);
  padding: 8px 12px;
  border-radius: 4px;
  margin: 8px 0;
  text-align: center;
}

.quiz-player-info {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
  text-align: center;
}

.quiz-status {
  font-size: 11px;
  color: var(--info);
  margin-top: 4px;
  text-align: center;
}

.wrong-answers-container {
  display: none;
  margin-top: 12px;
  max-height: 300px;
  overflow-y: auto;
  text-align: left;
}

.wrong-highlight {
  color: var(--error);
}

.correct-highlight {
  color: var(--accent);
}

.quiz-restart {
  width: 100%;
  background: var(--accent);
  border: none;
  border-radius: 4px;
  padding: 14px;
  color: #000;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 20px;
}

.quiz-restart:hover {
  background: var(--accent-hover);
}

/* === UPDATED QUIZ STYLES === */
.quiz-levels {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-level-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  color: var(--text-primary);
  font-family: var(--font-ui);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
  text-align: left;
}

.quiz-level-btn:hover {
  border-color: var(--accent);
  background: var(--bg-card);
}

.quiz-level-btn .level-icon {
  font-size: 28px;
}

.quiz-level-btn .level-name {
  font-size: 16px;
  font-weight: 600;
  display: block;
}

.quiz-level-btn .level-desc {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
}

.quiz-level-btn.basic:hover { border-color: #56d364; }
.quiz-level-btn.moderate:hover { border-color: #d29922; }
.quiz-level-btn.advanced:hover { border-color: #f85149; }

.quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.quiz-progress, .quiz-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

#quizLevel {
  color: var(--text-primary);
  font-weight: 600;
}

#quizTimer {
  font-family: var(--font-ui);
  color: var(--accent);
}

.quiz-level-badge {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 8px 0;
}

.quiz-time {
  font-size: 13px;
  color: var(--text-muted);
  margin: 8px 0;
}

.quiz-email-form {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.quiz-email-form .form-input {
  font-size: 12px;
  padding: 10px 12px;
}

.quiz-email-btn {
  width: 100%;
  background: var(--info);
  border: none;
  border-radius: 4px;
  padding: 10px;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.15s;
}

.quiz-email-btn:hover {
  background: #79c0ff;
}

/* === NIGHTMARE MODE STYLES === */
.quiz-level-btn.nightmare {
  background: linear-gradient(135deg, #1a0a0a 0%, #2d1010 100%);
  border: 2px solid #f85149;
  position: relative;
  overflow: hidden;
}

.quiz-level-btn.nightmare::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(248,81,73,0.1) 0%, transparent 60%);
  animation: nightmareGlow 3s ease-in-out infinite;
}

.quiz-level-btn.nightmare:hover {
  border-color: #ff6b6b;
  box-shadow: 0 0 20px rgba(248,81,73,0.4);
  transform: scale(1.02);
}

.quiz-level-btn.nightmare .level-name {
  color: #f85149;
  text-shadow: 0 0 10px rgba(248,81,73,0.5);
  letter-spacing: 2px;
}

.quiz-level-btn.nightmare .level-icon {
  /* renamed from skullBounce + swapped ease-in-out for ease-out-expo: same
     float/settle motion, no elastic/overshoot connotation in name or curve */
  animation: skullFloat 1s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

@keyframes nightmareGlow {
  0%, 100% { opacity: 0.3; transform: rotate(0deg); }
  50% { opacity: 0.6; transform: rotate(180deg); }
}

@keyframes skullFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Forced override, kept on purpose: updateTimer() writes an inline style.color on
   #quizTimer, and an inline style can only be outranked by a forced declaration. */
#quizTimer.nightmare-warning {
  color: #f85149 !important;
  animation: pulse 0.5s infinite;
  font-weight: bold;
}

/* === LEADERBOARD & NIGHTMARE PROMPT === */
.quiz-leaderboard-btn {
  width: 100%;
  background: linear-gradient(135deg, #1a1a0a 0%, #2d2d10 100%);
  border: 1px solid #d29922;
  border-radius: var(--radius);
  padding: 12px;
  color: #d29922;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
  transition: background-color 0.15s, color 0.15s;
}

.quiz-leaderboard-btn:hover {
  background: #d29922;
  color: #000;
}

.nightmare-prompt-box {
  background: linear-gradient(135deg, #1a0a0a 0%, #2d1010 100%);
  border: 2px solid #f85149;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
}

.nightmare-start-btn {
  flex: 1;
  background: #f85149;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s, box-shadow 0.15s;
}

.nightmare-start-btn:hover {
  background: #ff6b6b;
  box-shadow: 0 0 20px rgba(248,81,73,0.4);
}

.nightmare-cancel-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.nightmare-cancel-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text-secondary);
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.leaderboard-table th {
  text-align: left;
  padding: 10px 8px;
  background: var(--bg-primary);
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
}

.leaderboard-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.leaderboard-table tr.top-three td {
  color: var(--text-primary);
}

.leaderboard-table tr.top-three:first-child td {
  color: #ffd700;
}

.leaderboard-table tr.top-three:nth-child(2) td {
  color: #c0c0c0;
}

.leaderboard-table tr.top-three:nth-child(3) td {
  color: #cd7f32;
}

/* === WRONG ANSWERS LIST === */
.quiz-show-wrong-btn {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 12px;
  cursor: pointer;
  margin-top: 16px;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
  display: block;
  width: 100%;
}

.quiz-show-wrong-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  background: var(--bg-card);
}

.wrong-answer-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 11px;
}

.wrong-q {
  color: var(--text-primary);
  margin-bottom: 6px;
  font-weight: 500;
}

.wrong-your, .wrong-correct {
  color: var(--text-muted);
  font-size: 10px;
}

/* === SURVIVAL MODE STYLES === */
.quiz-level-btn.survival {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1a4d2e 0%, #22543d 100%);
  border-color: #2d6a4f;
}

.quiz-level-btn.survival .level-name,
.quiz-level-btn.survival .level-desc,
.quiz-level-btn.survival .level-icon {
  color: #7ee8a0;
}

.quiz-level-btn.survival .level-desc {
  color: #52c77e;
}

.quiz-level-btn.survival::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(126, 232, 160, 0.15), transparent);
  animation: survivalShine 3s infinite;
}

@keyframes survivalShine {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

.quiz-level-btn.survival:hover {
  border-color: #40916c;
  box-shadow: 0 0 20px rgba(63, 185, 80, 0.3);
  transform: translateY(-2px);
  background: linear-gradient(135deg, #22543d 0%, #2d6a4f 100%);
}

/* Survival Hub Tabs */
.survival-hub {
  max-width: 100%;
}

.survival-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  flex-wrap: wrap;
}

.survival-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
  border-radius: var(--radius) var(--radius) 0 0;
  transition: background-color 0.15s, color 0.15s;
}

.survival-tab:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.survival-tab.active {
  color: #3fb950;
  background: var(--bg-secondary);
  border-bottom: 2px solid #3fb950;
}

.survival-tab-content {
  min-height: 300px;
  overflow: hidden;
}

/* Survival Game UI */
.survival-game-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.survival-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, transparent 100%);
  border-radius: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.survival-timer-display {
  text-align: center;
}

.timer-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: conic-gradient(#3fb950 var(--progress, 100%), var(--bg-primary) 0%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 0 auto 8px;
}

.timer-circle::before {
  content: '';
  position: absolute;
  width: 64px;
  height: 64px;
  background: var(--bg-primary);
  border-radius: 50%;
}

#survivalTimerText {
  position: relative;
  z-index: 1;
  font-size: 20px;
  font-weight: 700;
  color: #3fb950;
  font-family: var(--font-ui);
}

.timer-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.survival-live-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.stat-item {
  text-align: center;
  min-width: 60px;
}

.stat-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-ui);
}

.stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.survival-question-area {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 20px;
}

.survival-category {
  font-size: 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  padding: 4px 10px;
  background: var(--bg-primary);
  border-radius: 4px;
  display: inline-block;
}

.survival-question {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.survival-answers {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.survival-answer-btn {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  text-align: left;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.15s, opacity 0.15s;
}

.survival-answer-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--text-primary);
  background: rgba(88, 166, 255, 0.1);
}

.survival-answer-btn:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.survival-answer-btn.correct {
  background: rgba(63, 185, 80, 0.2);
  border-color: #3fb950;
  color: #3fb950;
}

.survival-answer-btn.wrong {
  background: rgba(248, 81, 73, 0.2);
  border-color: #f85149;
  color: #f85149;
}

.survival-feedback {
  margin-top: 12px;
  padding: 10px;
  border-radius: 8px;
  font-size: 12px;
  text-align: center;
  display: none;
}

.survival-feedback.show {
  display: block;
}

.survival-feedback.correct {
  background: rgba(63, 185, 80, 0.1);
  color: #3fb950;
  border: 1px solid rgba(63, 185, 80, 0.3);
}

.survival-feedback.wrong {
  background: rgba(248, 81, 73, 0.1);
  color: #f85149;
  border: 1px solid rgba(248, 81, 73, 0.3);
}

.survival-footer {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.survival-pause-btn {
  background: #238636;
  border: none;
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius-lg);
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.survival-pause-btn:hover:not(:disabled) {
  background: #2ea043;
}

.survival-pause-btn:disabled {
  background: var(--bg-secondary);
  color: var(--text-muted);
  cursor: not-allowed;
}

.survival-end-btn {
  background: transparent;
  border: 1px solid #f85149;
  color: #f85149;
  padding: 10px 20px;
  border-radius: var(--radius-lg);
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.survival-end-btn:hover {
  background: rgba(248, 81, 73, 0.1);
}

/* Survival Result */
.survival-result-container {
  text-align: center;
}

.survival-final-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 16px;
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.survival-final-stat {
  text-align: center;
}

.final-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #3fb950;
  font-family: var(--font-ui);
}

.final-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.survival-achievements-earned {
  margin-top: 16px;
}

.achievement-unlocked {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(210, 153, 34, 0.2) 0%, rgba(210, 153, 34, 0.1) 100%);
  border: 1px solid rgba(210, 153, 34, 0.3);
  border-radius: 4px;
  padding: 8px 16px;
  margin: 4px;
  font-size: 12px;
  color: #d29922;
}

.achievement-unlocked .achievement-icon {
  font-size: 16px;
}

/* Challenge Cards */
.challenge-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}

.challenge-card.daily {
  border-color: color-mix(in srgb, #58a6ff 55%, var(--border-color));
  background: color-mix(in srgb, #58a6ff 6%, transparent);
}

.challenge-card.weekly {
  border-color: color-mix(in srgb, #d29922 55%, var(--border-color));
  background: color-mix(in srgb, #d29922 6%, transparent);
}

.challenge-card.completed {
  opacity: 0.6;
  background: rgba(63, 185, 80, 0.05);
  border-left-color: #3fb950;
}

.challenge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.challenge-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.challenge-reward {
  font-size: 11px;
  color: #d29922;
  background: rgba(210, 153, 34, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
}

.challenge-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.challenge-progress {
  height: 4px;
  background: var(--bg-primary);
  border-radius: 2px;
  overflow: hidden;
}

.challenge-progress-bar {
  /* Unused in current markup (no .challenge-progress-bar in index.php/sbgadm.php
     as of 2026-08-29) — converted to the transform-based fill pattern so any
     future revival starts from the smoother engine: set
     element.style.transform = `scaleX(${fraction})` instead of width. */
  height: 100%;
  width: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, #238636, #3fb950);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Achievement Grid */
.achievement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.achievement-badge {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 16px;
  text-align: center;
  transition: background-color 0.15s, border-color 0.15s, opacity 0.15s, filter 0.15s;
}

.achievement-badge.locked {
  opacity: 0.4;
  filter: grayscale(1);
}

.achievement-badge.unlocked {
  border-color: #d29922;
  background: linear-gradient(180deg, rgba(210, 153, 34, 0.1) 0%, transparent 100%);
}

.badge-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.badge-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.badge-desc {
  font-size: 10px;
  color: var(--text-muted);
}

/* Stats History */
.stats-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 12px;
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.overview-stat {
  text-align: center;
}

.overview-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-ui);
}

.overview-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.run-history {
  font-size: 12px;
}

.run-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: var(--bg-secondary);
  border-radius: 8px;
  margin-bottom: 8px;
}

.run-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.run-score {
  font-weight: 600;
  color: #3fb950;
  font-family: var(--font-ui);
}

.run-details {
  color: var(--text-muted);
  font-size: 11px;
}

.run-date {
  color: var(--text-muted);
  font-size: 10px;
}

/* Timer danger states */
.timer-circle.warning {
  background: conic-gradient(#d29922 var(--progress, 100%), var(--bg-primary) 0%);
}

.timer-circle.danger {
  background: conic-gradient(#f85149 var(--progress, 100%), var(--bg-primary) 0%);
  animation: pulse 0.5s infinite;
}

.timer-circle.warning #survivalTimerText,
.timer-circle.danger #survivalTimerText {
  color: inherit;
}

.timer-circle.warning #survivalTimerText { color: #d29922; }
.timer-circle.danger #survivalTimerText { color: #f85149; }

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

/* === STATS PAGE STYLES - WIDE LAYOUT === */

/* Make modal wider for stats */
.modal:has(.stats-wide) {
  /* min() instead of a bare 1400px width: the shell now survives every window
     width instead of only the one it was measured at. */
  width: min(95vw, 1400px);
  max-width: none;
  margin-inline: auto;
}

.stats-wide {
  padding: 0;
  display: flex;
  flex-direction: column;
  height: auto;
}

.stats-header-bar {
  background: var(--bg-console);
  border-bottom: 1px solid var(--border-color);
  padding: 8px 16px;
  font-family: var(--font-ui);
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stats-title {
  color: var(--accent);
  font-weight: 600;
}

.stats-meta {
  color: var(--text-muted);
}

.stats-grid-wide {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 1px;
  background: var(--border-color);
  flex: 1;
  overflow: hidden;
}

.stats-column {
  background: var(--bg-primary);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.stats-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}

.section-header {
  background: var(--bg-console);
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border-color);
  letter-spacing: 0.5px;
}

.stats-table {
  padding: 8px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 6px;
  font-family: var(--font-ui);
  font-size: 11px;
  border-bottom: 1px solid var(--border-color);
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-key {
  color: var(--text-muted);
}

.stat-val {
  color: var(--text-primary);
  font-weight: 500;
}

.stat-val.accent { color: var(--accent); }
.stat-val.error { color: var(--error); }
.stat-val.gold { color: #ffd700; }
.stat-val.fire { color: #ff6b35; }

/* Compact Leaderboard */
.leaderboard-compact {
  padding: 4px;
}

.lb-row {
  display: grid;
  grid-template-columns: 28px 1fr 70px 40px 40px 50px;
  gap: 6px;
  padding: 6px 8px;
  font-family: var(--font-ui);
  font-size: 11px;
  border-bottom: 1px solid var(--border-color);
  align-items: center;
}

.lb-row:last-child {
  border-bottom: none;
}

.lb-row.top3 {
  background: rgba(63, 185, 80, 0.05);
}

.lb-rank {
  color: var(--text-muted);
  font-size: 10px;
}

.lb-row.top3:nth-child(1) .lb-rank { color: #ffd700; }
.lb-row.top3:nth-child(2) .lb-rank { color: #c0c0c0; }
.lb-row.top3:nth-child(3) .lb-rank { color: #cd7f32; }

.lb-name {
  color: var(--text-primary);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-score {
  color: var(--accent);
  text-align: right;
  font-weight: 600;
}

.lb-detail {
  color: var(--text-muted);
  text-align: right;
  font-size: 10px;
}

.lb-detail.fire {
  color: #ff6b35;
}

/* Category Stats */
.category-stats {
  padding: 8px;
}

.cat-row {
  display: grid;
  grid-template-columns: 80px 1fr 35px;
  gap: 8px;
  align-items: center;
  padding: 3px 0;
  font-family: var(--font-ui);
  font-size: 10px;
}

.cat-row.total {
  border-top: 1px solid var(--border-color);
  margin-top: 4px;
  padding-top: 6px;
}

.cat-name {
  color: var(--text-muted);
  text-transform: uppercase;
}

.cat-row.total .cat-name {
  color: var(--accent);
  font-weight: 600;
}

.cat-bar {
  height: 4px;
  background: var(--bg-console);
  border-radius: 2px;
  overflow: hidden;
}

.cat-fill {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

.cat-count {
  color: var(--text-primary);
  text-align: right;
}

/* Geeky Tooltips */
[data-tooltip] {
  position: relative;
  cursor: pointer;
}

[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-console);
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 6px 10px;
  border-radius: 4px;
  font-family: var(--font-ui);
  font-size: 10px;
  white-space: nowrap;
  z-index: 100;
  margin-bottom: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

[data-tooltip]:hover::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--accent);
  z-index: 101;
  margin-bottom: -6px;
}

/* Death entry with tooltip */
.death-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border-color);
  font-family: var(--font-ui);
  font-size: 10px;
  transition: background 0.15s;
}

.death-entry:hover {
  background: rgba(248, 81, 73, 0.05);
}

.death-entry:last-child {
  border-bottom: none;
}

/* Leaderboard row hover */
.lb-row {
  transition: background 0.15s;
}

.lb-row:hover {
  background: rgba(63, 185, 80, 0.08);
}

.empty-state {
  background: var(--bg-console);
  border-top: 1px solid var(--border-color);
  padding: 12px 16px;
  text-align: center;
}

.stats-play-btn {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: 12px;
  padding: 10px 24px;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.stats-play-btn:hover {
  background: var(--accent);
  color: var(--bg-primary);
}

.empty-state {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 11px;
}

/* Responsive for stats */
@media (max-width: 1000px) {
  .stats-grid-wide {
    grid-template-columns: 1fr 1fr;
  }
  .stats-column:nth-child(3) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .stats-grid-wide {
    grid-template-columns: 1fr;
  }
}

/* Old stats styles (kept for compatibility) */
.stats-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

.stats-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px 16px;
  font-size: 13px;
  cursor: pointer;
  border-radius: var(--radius) var(--radius) 0 0;
  transition: background-color 0.15s, color 0.15s;
}

.stats-tab:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.stats-tab.active {
  color: var(--accent);
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--accent);
}

/* Death Feed */
.death-feed {
  padding: 4px;
}

.death-nick {
  color: var(--text-primary);
  font-weight: 500;
}

.death-score {
  color: var(--error);
}

