/* Futuristic quiz cockpit prototype */

@keyframes nightModeBeacon {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(56, 232, 176, 0), 0 0 0 rgba(78, 168, 255, 0);
  }

  45% {
    box-shadow: 0 0 0 7px rgba(56, 232, 176, 0.16), 0 0 24px rgba(78, 168, 255, 0.36);
  }
}

@keyframes nightModeSweep {
  0% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(120%);
  }
}

html:not([data-theme="dark"]) button[onclick*="toggleThemeModal"] {
  position: relative;
  overflow: hidden;
  animation: nightModeBeacon 7s ease-in-out infinite;
  border-color: rgba(56, 232, 176, 0.32) !important;
}

html:not([data-theme="dark"]) button[onclick*="toggleThemeModal"]::after {
  content: '';
  position: absolute;
  inset: -40% -80%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  transform: translateX(-120%);
  animation: nightModeSweep 7s ease-in-out infinite;
}

html:not([data-theme="dark"]) #themeModal button[onclick*="setTheme('dark')"] {
  background: linear-gradient(135deg, #07111F, #174A78) !important;
  color: #F5FAFF !important;
  border-color: rgba(56, 232, 176, 0.58) !important;
  box-shadow: 0 0 0 3px rgba(56, 232, 176, 0.16), 0 14px 32px rgba(78, 168, 255, 0.22) !important;
}

html[data-theme="dark"] button[onclick*="toggleThemeModal"] {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  html:not([data-theme="dark"]) button[onclick*="toggleThemeModal"],
  html:not([data-theme="dark"]) button[onclick*="toggleThemeModal"]::after {
    animation: none;
  }
}

[data-theme="dark"] .quiz-container {
  max-width: 1180px;
}

[data-theme="dark"] #questionCountModal > div,
[data-theme="dark"] #resetModal > div,
[data-theme="dark"] #pauseModal > div,
[data-theme="dark"] .modal-style > div {
  background: linear-gradient(145deg, rgba(13, 27, 46, 0.96), rgba(8, 18, 33, 0.94)) !important;
  color: var(--text) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.56), var(--glow-primary) !important;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

[data-theme="dark"] #questionCountModal h2,
[data-theme="dark"] #questionCountModal label,
[data-theme="dark"] #resetModal h2,
[data-theme="dark"] #resetModal h3,
[data-theme="dark"] #resetModal p,
[data-theme="dark"] #resetModal label,
[data-theme="dark"] #pauseModal h2,
[data-theme="dark"] #pauseModal p,
[data-theme="dark"] .modal-style h2,
[data-theme="dark"] .modal-style p {
  color: var(--text) !important;
}

[data-theme="dark"] #questionCountModal h2,
[data-theme="dark"] #resetModal h2,
[data-theme="dark"] #pauseModal h2,
[data-theme="dark"] .modal-style h2 {
  text-shadow: 0 0 18px rgba(78, 168, 255, 0.3);
}

[data-theme="dark"] #questionCountModal select,
[data-theme="dark"] #resetModal input,
[data-theme="dark"] #resetModal select,
[data-theme="dark"] #pauseModal select,
[data-theme="dark"] .modal-style select {
  background: rgba(8, 18, 33, 0.9) !important;
  color: var(--text) !important;
  border: 1px solid rgba(116, 190, 255, 0.28) !important;
}

[data-theme="dark"] #adventure-map {
  position: relative;
}

[data-theme="dark"] #brandingSection,
[data-theme="dark"] .map-stats,
[data-theme="dark"] .chapter-card,
[data-theme="dark"] .missions-container,
[data-theme="dark"] .leaderboard,
[data-theme="dark"] .login-screen {
  background: linear-gradient(145deg, rgba(9, 22, 40, 0.72), rgba(16, 36, 60, 0.54)) !important;
  border: 1px solid rgba(116, 190, 255, 0.2) !important;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

[data-theme="dark"] .future-hero {
  position: relative;
  min-height: 360px;
  margin: 18px 0 26px;
  border-radius: 28px;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(116, 190, 255, 0.22);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48), 0 0 48px rgba(78, 168, 255, 0.16);
}

[data-theme="dark"] .future-hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 12, 24, 0.84), rgba(5, 12, 24, 0.38) 52%, rgba(5, 12, 24, 0.76)),
    url("../assets/images/quiz-cockpit-bg.png") center / cover no-repeat;
  transform: scale(1.02);
  z-index: -2;
}

[data-theme="dark"] .future-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(116, 190, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(116, 190, 255, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent 75%);
  z-index: -1;
}

[data-theme="dark"] .future-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 72% 26%, rgba(56, 232, 176, 0.2), transparent 28%);
  z-index: -1;
}

.future-hero {
  display: none;
}

[data-theme="dark"] .future-hero {
  display: block;
}

.future-hero-content {
  min-height: 360px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 28px;
  align-items: center;
  padding: 34px;
}

.future-hero-copy {
  max-width: 560px;
}

.future-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(56, 232, 176, 0.34);
  border-radius: 999px;
  background: rgba(56, 232, 176, 0.1);
  color: #BFFFE9;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.future-hero h2 {
  margin: 18px 0 10px;
  color: #F7FBFF;
  font-family: var(--font-title);
  font-size: clamp(2.7rem, 7vw, 5.3rem);
  line-height: 0.92;
  letter-spacing: 0;
  text-shadow: 0 0 32px rgba(78, 168, 255, 0.38);
}

.future-hero p {
  max-width: 520px;
  color: #D3E2F3;
  font-size: 1.04rem;
  line-height: 1.65;
}

.future-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.future-trust-row span {
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid rgba(116, 190, 255, 0.24);
  background: rgba(9, 22, 40, 0.58);
  color: #DCEBFA;
  font-size: 0.86rem;
  font-weight: 700;
}

.future-dashboard {
  justify-self: end;
  width: min(100%, 430px);
  padding: 20px;
  border-radius: 22px;
  border: 1px solid rgba(116, 190, 255, 0.28);
  background: linear-gradient(145deg, rgba(8, 18, 33, 0.78), rgba(19, 42, 68, 0.58));
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.future-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #A8B8CC;
  font-size: 0.9rem;
}

.future-dashboard-header strong {
  color: #38E8B0;
  font-family: var(--font-title);
  font-size: 1.05rem;
}

.future-chart {
  margin: 18px 0;
  padding: 8px;
  border-radius: 16px;
  background: rgba(2, 8, 16, 0.42);
  border: 1px solid rgba(116, 190, 255, 0.12);
}

.future-chart svg {
  display: block;
  width: 100%;
  height: auto;
}

.future-chart-grid {
  fill: none;
  stroke: rgba(168, 184, 204, 0.14);
  stroke-width: 1;
}

.future-chart-fill {
  fill: url("#futureChartFill");
}

.future-chart-line {
  fill: none;
  stroke: url("#futureChartGradient");
  stroke-width: 5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 10px rgba(56, 232, 176, 0.42));
}

.future-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.future-metrics div {
  padding: 13px 12px;
  border-radius: 16px;
  background: rgba(78, 168, 255, 0.08);
  border: 1px solid rgba(116, 190, 255, 0.16);
}

.future-metrics span {
  display: block;
  color: #A8B8CC;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.future-metrics strong {
  display: block;
  margin-top: 5px;
  color: #F5FAFF;
  font-family: var(--font-title);
  font-size: 1.2rem;
}

[data-theme="dark"] .map-title {
  margin-top: 8px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: #F7FBFF !important;
  text-transform: none;
  letter-spacing: 0;
}

[data-theme="dark"] .map-subtitle {
  color: #A8B8CC !important;
}

[data-theme="dark"] .map-stats {
  gap: 12px;
}

[data-theme="dark"] .map-stat {
  min-width: 130px;
  padding: 14px 16px !important;
  border-radius: 18px;
  background: rgba(78, 168, 255, 0.08);
  border: 1px solid rgba(116, 190, 255, 0.14);
}

[data-theme="dark"] .map-stat-value {
  color: #F5FAFF !important;
}

[data-theme="dark"] .map-stat-label {
  color: #A8B8CC !important;
}

@media (max-width: 780px) {
  .future-hero-content {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .future-dashboard {
    justify-self: stretch;
  }

  .future-metrics {
    grid-template-columns: 1fr;
  }
}
