
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #0b1020;
  --panel: #131b30;
  --card: #1a2540;
  --border: #2b3957;
  --text: #f4f7ff;
  --muted: #9ba9c5;
  --blue: #38bdf8;
  --purple: #a78bfa;
  --green: #4ade80;
  --red: #fb7185;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at top left, #182c51 0%, transparent 45%),
    var(--bg);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
}

button, select {
  font: inherit;
}

button {
  cursor: pointer;
  transition: transform .18s, background .18s, border-color .18s;
}

button:focus-visible, select:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

button:active {
  transform: scale(.97);
}

.topbar {
  min-height: 86px;
  padding: 16px 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 16, 32, .85);
}

.brand, .top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #0284c7, #7c3aed);
  font-size: 20px;
  font-weight: 800;
}

.brand h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 2px;
}

.brand p, .welcome p, .bottom-actions p, footer p {
  color: var(--muted);
  font-size: 12px;
}

.brand p {
  margin: 5px 0 0;
  letter-spacing: 1.5px;
}

.container {
  width: min(1200px, 92%);
  margin: 30px auto;
}

.dashboard {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 25px;
}

.eyebrow {
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
}

.welcome h2 {
  font-size: clamp(24px, 3vw, 36px);
  margin: 10px 0;
  line-height: 1.25;
}

.welcome h2 span {
  color: var(--blue);
}

.welcome p {
  max-width: 620px;
  line-height: 1.7;
}

.team-panel {
  min-width: 150px;
}

.team-panel label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

select {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  width: 100%;
}

.scoreboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.score-card {
  padding: 17px;
  background: rgba(19, 27, 48, .92);
  border: 1px solid var(--border);
  border-radius: 15px;
}

.score-label, .score-card small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
}

.score-card strong {
  display: block;
  margin: 9px 0 5px;
  font-size: 30px;
}

.game-panel {
  padding: clamp(18px, 3vw, 30px);
  background: rgba(19, 27, 48, .96);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .2);
}

.hidden {
  display: none !important;
}

.section-heading, .question-top, .question-footer,
.bottom-actions, .return-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h2 {
  margin: 7px 0 0;
  font-size: 25px;
}

.status-pill {
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

.progress-track {
  height: 7px;
  background: #26334e;
  border-radius: 99px;
  overflow: hidden;
  margin: 23px 0;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--purple));
  transition: width .3s ease;
}

.number-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 13px;
}

.number-card {
  position: relative;
  min-height: 100px;
  padding: 12px 8px;
  border: 1px solid #304366;
  border-radius: 14px;
  color: var(--text);
  background: linear-gradient(145deg, #1c2a48, #172139);
  overflow: hidden;
}

.number-card:hover:not(:disabled) {
  transform: translateY(-4px);
  border-color: var(--blue);
  background: #20395a;
}

.number-card .number {
  display: block;
  font-size: 32px;
  font-weight: 800;
}

.number-card .number-label {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
}

.number-card .mini-progress {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 9px;
}

.mini-progress i {
  width: 18px;
  height: 4px;
  border-radius: 5px;
  background: #44516a;
}

.mini-progress i.done {
  background: var(--green);
}

.number-card.partial {
  border-color: #c084fc;
}

.number-card.completed {
  border-color: #236e50;
  background: #123329;
}

.number-card.completed .number-label {
  color: var(--green);
}

.number-card:disabled {
  cursor: not-allowed;
  opacity: .72;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 12px;
}

.legend span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #64748b;
}

.legend-dot.partial {
  background: var(--purple);
}

.legend-dot.completed {
  background: var(--green);
}

.bottom-actions {
  border-top: 1px solid var(--border);
  margin-top: 24px;
  padding-top: 17px;
}

.secondary-btn, .danger-btn, .primary-btn {
  padding: 12px 17px;
  border-radius: 10px;
  font-weight: 700;
}

.secondary-btn {
  color: var(--text);
  border: 1px solid var(--border);
  background: #1b2944;
}

.secondary-btn:hover {
  border-color: var(--blue);
}

.danger-btn {
  color: #fecdd3;
  border: 1px solid #743346;
  background: #3b1b2a;
}

.primary-btn {
  color: #061322;
  border: none;
  background: linear-gradient(100deg, #38bdf8, #818cf8);
  box-shadow: 0 6px 22px #38bdf822;
}

.primary-btn:hover {
  filter: brightness(1.1);
}

.question-top {
  flex-wrap: wrap;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.timer {
  min-width: 58px;
  text-align: center;
  padding: 11px;
  border-radius: 12px;
  color: var(--blue);
  background: #102e46;
  font-weight: 800;
}

.timer.urgent {
  color: var(--red);
  background: #3b1b2a;
}

.question-content {
  max-width: 850px;
  margin: 45px auto;
}

.question-content h2 {
  font-size: clamp(25px, 4vw, 38px);
  line-height: 1.4;
  margin: 15px 0;
}

#questionHint {
  color: var(--muted);
  line-height: 1.6;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
  margin-top: 28px;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 72px;
  padding: 16px;
  text-align: left;
  color: var(--text);
  background: #1a2540;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.option-letter {
  flex: 0 0 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: #293b5b;
  border-radius: 9px;
  font-weight: 800;
}

.option-btn:hover:not(:disabled),
.option-btn.selected {
  border-color: var(--blue);
  background: #153450;
}

.option-btn.correct {
  border-color: var(--green);
  background: #123329;
}

.option-btn.wrong {
  border-color: var(--red);
  background: #3b1b2a;
}

.option-btn:disabled {
  cursor: default;
}

.question-footer {
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.question-footer p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.answer-content {
  max-width: 760px;
  margin: 25px auto;
  text-align: center;
}

.answer-icon {
  width: 75px;
  height: 75px;
  display: grid;
  place-items: center;
  margin: 0 auto 22px;
  border-radius: 50%;
  color: var(--green);
  background: #123329;
  border: 1px solid #236e50;
  font-size: 34px;
}

.answer-content h2 {
  margin: 12px 0;
  font-size: clamp(27px, 4vw, 38px);
}

.correct-answer {
  padding: 19px;
  margin: 25px 0 15px;
  border: 1px solid #236e50;
  border-radius: 14px;
  background: #123329;
  color: var(--green);
  font-size: 22px;
  font-weight: 800;
}

.explanation {
  color: var(--muted);
  line-height: 1.8;
}

.return-panel {
  margin: 28px 0 20px;
  padding: 17px;
  text-align: left;
  background: #1a2540;
  border: 1px solid var(--border);
  border-radius: 13px;
}

.return-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.return-panel strong {
  color: var(--blue);
  font-size: 27px;
}

.final-scores {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 28px 0;
}

.final-scores div {
  padding: 23px;
  background: #1a2540;
  border: 1px solid var(--border);
  border-radius: 14px;
}

.final-scores span, .final-scores strong {
  display: block;
}

.final-scores span {
  color: var(--muted);
  font-size: 12px;
}

.final-scores strong {
  margin-top: 10px;
  font-size: 34px;
}

#winnerText {
  color: var(--green);
}

footer {
  text-align: center;
  padding: 10px 20px 25px;
}

@media (max-width: 750px) {
  .topbar, .dashboard {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    flex-wrap: wrap;
  }

  .scoreboard {
    grid-template-columns: repeat(2, 1fr);
  }

  .number-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .number-card {
    min-height: 85px;
  }

  .number-card .number {
    font-size: 25px;
  }

  .options-grid {
    grid-template-columns: 1fr;
  }

  .question-footer, .bottom-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .question-content {
    margin: 28px auto;
  }
}

@media (max-width: 400px) {
  .number-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .status-pill {
    font-size: 10px;
  }
}

/* Quiz Statistics Dashboard */
.quiz-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0 14px;
}

.stat-box {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 145px;
  padding: 20px;
  overflow: hidden;
  background: linear-gradient(145deg, #17233b, #111a2e);
  border: 1px solid #2b3957;
  border-radius: 16px;
  transition: transform .2s, border-color .2s;
}

.stat-box:hover {
  transform: translateY(-3px);
}

.stat-icon {
  font-size: 22px;
}

.stat-label {
  color: #a7b6d2;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.stat-box strong {
  font-size: 34px;
  line-height: 1.1;
  color: #f4f7ff;
}

.stat-box small {
  color: #9ba9c5;
  font-size: 11px;
}

.correct-box {
  border-color: #236e50;
}

.correct-box strong {
  color: #4ade80;
}

.wrong-box {
  border-color: #743346;
}

.wrong-box strong {
  color: #fb7185;
}

.remaining-box {
  border-color: #365985;
}

.remaining-box strong {
  color: #38bdf8;
}

.stats-progress {
  width: 100%;
  height: 8px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 20px;
  background: #26334e;
}

.stats-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #4ade80);
  transition: width .35s ease;
}

.stats-progress-text {
  margin: 9px 0 22px;
  text-align: right;
  color: #9ba9c5;
  font-size: 12px;
}

@media (max-width: 750px) {
  .quiz-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stat-box {
    min-height: 125px;
    padding: 15px;
  }
}

/* Correct and Wrong Answer Colors */

#answerTitle.correct-answer-title {
  color: #4ade80;
  text-shadow: 0 0 18px rgba(74, 222, 128, 0.2);
}

#answerTitle.wrong-answer-title {
  color: #fb7185;
  text-shadow: 0 0 18px rgba(251, 113, 133, 0.2);
}

#answerIcon.correct-answer-icon {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid #236e50;
}

#answerIcon.wrong-answer-icon {
  color: #fb7185;
  background: rgba(251, 113, 133, 0.12);
  border: 1px solid #743346;
}

#correctAnswer.correct-answer-box {
  color: #4ade80;
  background: #123529;
  border-color: #236e50;
}

#correctAnswer.wrong-answer-box {
  color: #4ade80;
  background: #123529;
  border-color: #236e50;
}


/* Make the 4 quiz statistics boxes smaller */
.quiz-stats {
  gap: 10px;
  margin: 12px 0 8px;
}

.stat-box {
  min-height: 72px;
  padding: 10px;
  gap: 5px;
  border-radius: 10px;
}

.stat-icon {
  font-size: 15px;
}

.stat-label {
  font-size: 8px;
  letter-spacing: 0.6px;
}

.stat-box strong {
  font-size: 22px;
  line-height: 1;
}

.stat-box small {
  font-size: 9px;
}

.stats-progress {
  height: 5px;
  margin-top: 10px;
}

.stats-progress-text {
  margin: 5px 0 12px;
  font-size: 10px;
}

@media (max-width: 750px) {
  .stat-box {
    min-height: 65px;
    padding: 9px;
  }
}


/* =================================
   IT QUEST - NEON GAMING UPGRADE
================================= */

/* Neon number cards */
.number-card {
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.number-card:hover:not(:disabled) {
  transform: translateY(-5px) scale(1.025);
  border-color: #38bdf8;
  box-shadow:
    0 0 12px #38bdf844,
    0 0 25px #6366f122;
}

.number-card:hover:not(:disabled) .number {
  color: #38bdf8;
  text-shadow: 0 0 12px #38bdf888;
}

/* Animated question timer */
.timer {
  min-width: 65px;
  border: 1px solid #38bdf855;
  box-shadow: 0 0 12px #38bdf822;
  transition: color 0.25s, background 0.25s;
}

.timer.urgent {
  color: #fb7185;
  background: #3b1b2a;
  border-color: #fb7185;
  box-shadow: 0 0 18px #fb718555;
  animation: timerPulse 0.65s ease-in-out infinite alternate;
}

@keyframes timerPulse {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.08);
  }
}

/* Answer reveal animation */
#answerScreen .answer-content {
  animation: answerEnter 0.45s ease both;
}

@keyframes answerEnter {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Correct answer celebration */
#answerScreen.correct-result {
  border-color: #4ade80;
  box-shadow:
    0 0 0 1px #4ade8033,
    0 0 28px #4ade8018;
}

#answerScreen.correct-result .answer-icon {
  animation: correctPop 0.45s ease;
}

@keyframes correctPop {
  0% {
    transform: scale(0.5);
  }
  70% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

/* Wrong answer shake */
#answerScreen.wrong-result {
  border-color: #fb7185;
  box-shadow: 0 0 25px #fb71851a;
}

#answerScreen.wrong-result .answer-icon {
  animation: wrongShake 0.4s ease;
}

@keyframes wrongShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-3px); }
}

/* Glowing answer box */
#correctAnswer.correct-answer-box {
  box-shadow: 0 0 18px #4ade8022;
}

#answerTitle.correct-answer-title {
  color: #4ade80;
  text-shadow: 0 0 18px #4ade8044;
}

#answerTitle.wrong-answer-title {
  color: #fb7185;
  text-shadow: 0 0 18px #fb718544;
}

/* Neon buttons */
.primary-btn:hover,
.secondary-btn:hover {
  box-shadow: 0 0 18px #38bdf822;
}

@media (prefers-reduced-motion: reduce) {
  .timer.urgent,
  #answerScreen .answer-content,
  #answerScreen .answer-icon {
    animation: none !important;
  }
}
