:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e9f0ff;
  background: #040914;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  background: radial-gradient(circle at top left, rgba(34, 161, 255, 0.18), transparent 28%),
              radial-gradient(circle at bottom right, rgba(146, 93, 255, 0.12), transparent 30%),
              linear-gradient(135deg, #040914 0%, #08132a 45%, #0f183d 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

.page-shell {
  position: relative;
  padding: 3rem 2rem 2rem;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 4rem 0 3rem;
}

.hero-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(0, 242, 255, 0.16), transparent 18%),
              radial-gradient(circle at 80% 20%, rgba(160, 88, 255, 0.18), transparent 18%),
              radial-gradient(circle at 50% 80%, rgba(35, 118, 255, 0.14), transparent 25%);
  pointer-events: none;
  filter: blur(50px);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  width: 100%;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  align-items: start;
}

.hero-copy {
  max-width: 680px;
}

.eyebrow {
  display: inline-flex;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: rgba(43, 60, 112, 0.55);
  color: #7ae2ff;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(3rem, 4.7vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #81e6ff, #c76dff 48%, #83f6ff 100%);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-copy p {
  max-width: 42rem;
  margin: 1.6rem 0 2.2rem;
  line-height: 1.75;
  color: rgba(233, 240, 255, 0.9);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.25s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, rgba(73, 211, 255, 0.95), rgba(119, 99, 255, 0.9));
  color: #020617;
  box-shadow: 0 22px 60px rgba(71, 139, 255, 0.18);
}

.btn-secondary {
  color: #c7daff;
  background: rgba(18, 31, 69, 0.7);
  border-color: rgba(105, 149, 255, 0.22);
}

.glass-card {
  position: relative;
  background: rgba(11, 23, 50, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.3);
  padding: 2rem;
  overflow: hidden;
}

.panel-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #8be3ff;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1.5rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-grid h2 {
  margin: 0 0 0.35rem;
  font-size: 2rem;
}

.stat-grid p {
  margin: 0;
  color: rgba(233, 240, 255, 0.72);
}

.panel-tracker {
  padding: 1.4rem 1.25rem;
  background: rgba(9, 17, 35, 0.9);
  border-radius: 22px;
  border: 1px solid rgba(109, 129, 255, 0.1);
}

.tracker-label {
  display: block;
  color: rgba(233, 240, 255, 0.72);
  font-size: 0.95rem;
}

.tracker-value {
  margin: 0.5rem 0 1rem;
  font-size: 2rem;
  font-weight: 700;
}

.progress-bar {
  width: 100%;
  height: 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-bar div {
  height: 100%;
  background: linear-gradient(90deg, #4fd8ff, #a44bff);
  border-radius: 999px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin: 2rem 0 3rem;
}

.feature-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature-badge {
  display: inline-flex;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 16px;
  align-items: center;
  justify-content: center;
  background: rgba(112, 84, 255, 0.12);
  color: #b6d8ff;
  font-size: 1rem;
  font-weight: 700;
}

.feature-card h2 {
  margin: 0;
  font-size: 1.45rem;
}

.feature-card p {
  margin: 0;
  line-height: 1.7;
  color: rgba(233, 240, 255, 0.78);
  flex-grow: 1;
}

.quiz-section {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 1.75rem;
  align-items: start;
  margin-bottom: 3rem;
}

.quiz-summary {
  padding: 2.25rem;
}

.summary-header h2 {
  margin: 0 0 0.5rem;
  font-size: 1.8rem;
}

.summary-header p {
  margin: 0;
  color: rgba(233, 240, 255, 0.75);
}

.score-box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0 1.25rem;
}

.score-box div {
  background: rgba(14, 24, 47, 0.85);
  border: 1px solid rgba(115, 155, 255, 0.08);
  border-radius: 20px;
  padding: 1.25rem;
}

.score-box span {
  display: block;
  color: rgba(233, 240, 255, 0.72);
  margin-bottom: 0.5rem;
}

.score-box strong {
  display: block;
  font-size: 2rem;
  color: #f8feff;
}

.score-note {
  color: rgba(233, 240, 255, 0.75);
  line-height: 1.7;
}

.quiz-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.question-tag {
  display: inline-flex;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: rgba(72, 104, 189, 0.16);
  color: #9ecbff;
  font-size: 0.95rem;
}

.question-header h3 {
  margin: 0.25rem 0 0;
  font-size: 1.5rem;
}

.question-meta {
  color: #b9d7ff;
  font-weight: 600;
}

.question-text {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.8;
  color: #e9f0ff;
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.quiz-btn {
  padding: 1.25rem 1rem;
  border: 1px solid rgba(110, 144, 255, 0.12);
  border-radius: 22px;
  background: rgba(6, 14, 33, 0.8);
  color: #d9e8ff;
  text-align: left;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.quiz-btn:hover,
.quiz-btn.active {
  border-color: rgba(79, 216, 255, 0.7);
  background: rgba(18, 40, 72, 0.95);
  box-shadow: 0 18px 40px rgba(16, 112, 211, 0.16);
  transform: translateY(-2px);
}

.quiz-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  color: rgba(233, 240, 255, 0.8);
}

.quiz-footer strong {
  color: #a5f4ff;
}

.quiz-game {
  max-width: 1180px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.quiz-card-wrap {
  display: grid;
  gap: 1.5rem;
}

.quiz-header {
  display: grid;
  gap: 0.8rem;
  padding-bottom: 0.5rem;
}

.quiz-header h2 {
  margin: 0;
  font-size: clamp(2rem, 2.5vw, 2.4rem);
}

.quiz-header p {
  margin: 0;
  color: rgba(233, 240, 255, 0.78);
}

#quiz-status {
  color: rgba(233, 240, 255, 0.82);
}

.quiz-btn.correct {
  border-color: rgba(92, 241, 134, 0.8);
  background: rgba(62, 163, 104, 0.16);
}

.quiz-btn.wrong {
  border-color: rgba(255, 131, 131, 0.9);
  background: rgba(178, 69, 84, 0.14);
}

#next-btn {
  min-width: 12rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#next-btn:not(:disabled) {
  cursor: pointer;
}

#next-btn:not(:disabled):hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(71, 139, 255, 0.25);
}

#next-btn:not(:disabled):active {
  transform: translateY(-1px);
}

#next-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  padding: 1rem;
}

.auth-modal-content {
  max-width: 460px;
  width: 100%;
  position: relative;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #e9f0ff;
  font-size: 1.8rem;
  cursor: pointer;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
}

.auth-message {
  margin-bottom: 1.25rem;
  padding: 1rem;
  border-radius: 12px;
  font-weight: 600;
  text-align: center;
}

.auth-message-success {
  background: rgba(92, 241, 134, 0.15);
  color: #5cf186;
  border: 1px solid rgba(92, 241, 134, 0.3);
}

.auth-message-error {
  background: rgba(255, 131, 131, 0.15);
  color: #ff8383;
  border: 1px solid rgba(255, 131, 131, 0.3);
}

.auth-modal-content h2 {
  margin: 0 0 1.5rem;
  font-size: 2rem;
}

.auth-modal-content form {
  display: grid;
  gap: 1.2rem;
  margin: 1.5rem 0;
}

.auth-modal-content label {
  display: grid;
  gap: 0.5rem;
  color: rgba(233, 240, 255, 0.82);
  font-size: 0.95rem;
  font-weight: 500;
}

.auth-modal-content input {
  width: 100%;
  min-height: 3rem;
  padding: 0 1rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 15, 32, 0.85);
  color: #edf4ff;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  font-size: 1rem;
}

.auth-modal-content input:focus {
  border-color: rgba(79, 216, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(79, 216, 255, 0.12);
}

.auth-modal-content input::placeholder {
  color: rgba(233, 240, 255, 0.48);
}

.card-label {
  display: inline-flex;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8be3ff;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.user-greeting {
  color: rgba(233, 240, 255, 0.82);
  font-weight: 600;
  white-space: nowrap;
}

.site-footer {
  text-align: center;
  padding: 2rem 0 1rem;
  color: rgba(233, 240, 255, 0.6);
}

.anchor {
  display: block;
  position: relative;
  top: -80px;
  visibility: hidden;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  max-width: 1280px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-mark {
  width: 3rem;
  height: 3rem;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(98, 111, 255, 0.95), rgba(34, 211, 255, 0.8));
  color: #07101f;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.brand-name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-subtitle {
  display: block;
  font-size: 0.85rem;
  color: rgba(233, 240, 255, 0.68);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.nav-links {
  display: flex;
  gap: 1.4rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: rgba(233, 240, 255, 0.82);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.25s ease;
}

.nav-links a:hover {
  color: #86f1ff;
}

.nav-actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.btn-tertiary {
  background: rgba(15, 28, 59, 0.85);
  color: #c7daff;
  border-color: rgba(79, 164, 255, 0.18);
}

.hero.hero-main {
  min-height: calc(100vh - 88px);
  padding-top: 1rem;
}

.hero-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.hero-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.hero-highlights div {
  background: rgba(15, 28, 59, 0.8);
  border: 1px solid rgba(103, 160, 255, 0.12);
  border-radius: 22px;
  padding: 1rem 1.1rem;
}

.hero-highlights strong {
  display: block;
  font-size: 1.35rem;
  margin-bottom: 0.3rem;
}

.login-card {
  max-width: 460px;
  width: 100%;
}

.card-label {
  display: inline-flex;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8be3ff;
}

.login-card h2 {
  margin: 0 0 1.5rem;
  font-size: 2rem;
}

.login-card form {
  display: grid;
  gap: 1.2rem;
}

.login-card label {
  display: grid;
  gap: 0.5rem;
  color: rgba(233, 240, 255, 0.82);
  font-size: 0.95rem;
}

.login-card input {
  width: 100%;
  min-height: 3rem;
  padding: 0 1rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 15, 32, 0.85);
  color: #edf4ff;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.login-card input:focus {
  border-color: rgba(79, 216, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(79, 216, 255, 0.12);
}

.btn-block {
  width: 100%;
}

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: rgba(233, 240, 255, 0.65);
  margin: 1.5rem 0 1rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.social-btn {
  min-height: 3rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 23, 46, 0.85);
  color: #d8e7ff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.25s ease, border-color 0.25s ease;
}

.social-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(113, 180, 255, 0.28);
}

.social-btn.google {
  color: #ffce4b;
}

.social-btn.facebook {
  color: #7a9bff;
}

.social-btn.twitter {
  color: #71d8ff;
}

.signup-note {
  margin: 1rem 0 0;
  color: rgba(233, 240, 255, 0.74);
}

.signup-note a {
  color: #84f0ff;
  text-decoration: none;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer h3 {
  margin: 0 0 0.75rem;
}

.site-footer p {
  margin: 0;
  color: rgba(233, 240, 255, 0.72);
  max-width: 42rem;
}

.site-footer .btn-secondary {
  padding: 0.95rem 1.6rem;
}

@media (max-width: 1080px) {
  .hero-content {
    grid-template-columns: 1fr;
  }
  .quiz-section {
    grid-template-columns: 1fr;
  }
  .cards {
    grid-template-columns: 1fr 1fr;
  }
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .hero-split {
    grid-template-columns: 1fr;
  }
  .hero-highlights {
    grid-template-columns: 1fr;
  }
  .social-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding: 2rem 1rem 1rem;
  }
  .hero {
    padding-top: 2rem;
  }
  .hero-copy h1 {
    font-size: 2.8rem;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .stat-grid {
    grid-template-columns: 1fr;
  }
  .score-box {
    grid-template-columns: 1fr;
  }
  .options-grid {
    grid-template-columns: 1fr;
  }
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-links {
    width: 100%;
    flex-direction: column;
    gap: 0.5rem;
  }
  .nav-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .auth-modal {
    padding: 1rem;
  }
  .auth-modal-content {
    max-width: 100%;
  }
}

