:root {
  --bg: #070715;
  --panel: rgba(255, 255, 255, 0.10);
  --panel-strong: rgba(255, 255, 255, 0.16);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.75);
  --green: #84ff59;
  --cyan: #20d6ff;
  --pink: #ff4968;
  --gold: #ffd447;
  --purple: #8c74ff;
  --line: rgba(255, 255, 255, 0.18);
  font-family: Inter, ui-rounded, "SF Pro Rounded", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 73, 104, 0.22), transparent 32rem),
    radial-gradient(circle at 86% 20%, rgba(32, 214, 255, 0.18), transparent 30rem),
    radial-gradient(circle at 50% 100%, rgba(132, 255, 89, 0.12), transparent 26rem),
    var(--bg);
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  background: rgba(7, 7, 21, 0.74);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-weight: 950;
  font-size: 1.2rem;
}

.brand-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  box-shadow: 0 0 24px rgba(132, 255, 89, 0.26);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.nav a {
  padding: 0.55rem 0.85rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 850;
  font-size: 0.9rem;
  border-radius: 999px;
}

.nav a:hover,
.nav a:focus-visible {
  color: #07100b;
  background: var(--green);
  outline: none;
}

.hero {
  position: relative;
  min-height: min(760px, 92vh);
  display: grid;
  align-items: end;
  padding: clamp(6rem, 11vw, 9rem) clamp(1rem, 4vw, 3rem) clamp(3rem, 7vw, 5rem);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 7, 21, 0.12), rgba(7, 7, 21, 0.68)),
    url("assets/pointbase-wallpaper.png") center / cover no-repeat;
  filter: saturate(1.18);
  transform: scale(1.03);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 32%;
  background: linear-gradient(0deg, var(--bg), transparent);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.beta-badge {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 0.9rem;
  padding: 0.48rem 0.7rem;
  border: 1px solid rgba(255, 212, 71, 0.42);
  border-radius: 999px;
  color: #07100b;
  background: linear-gradient(135deg, var(--gold), var(--green));
  box-shadow: 0 12px 32px rgba(255, 212, 71, 0.14);
  font-size: 0.78rem;
  font-weight: 1000;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(4.2rem, 16vw, 10rem);
  line-height: 0.86;
  font-weight: 1000;
  letter-spacing: 0;
  text-shadow: 0 0 34px rgba(255, 73, 104, 0.44);
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2.1rem, 6vw, 4.8rem);
  line-height: 0.95;
  font-weight: 1000;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.65rem;
  font-size: 1.45rem;
  font-weight: 1000;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 730px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.18rem, 3vw, 1.75rem);
  line-height: 1.35;
  font-weight: 800;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  min-height: 3.3rem;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 950;
}

.button.primary {
  color: #07100b;
  background: linear-gradient(135deg, var(--green), var(--gold));
  box-shadow: 0 12px 34px rgba(132, 255, 89, 0.24);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.12);
}

.button.danger {
  color: #ffffff;
  background: rgba(255, 73, 104, 0.22);
  border-color: rgba(255, 73, 104, 0.44);
}

.math-float {
  position: absolute;
  z-index: 1;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(7, 7, 21, 0.38);
  font-weight: 1000;
  backdrop-filter: blur(10px);
  animation: floaty 5s ease-in-out infinite;
}

.math-a {
  top: 25%;
  right: 11%;
  color: var(--gold);
}

.math-b {
  top: 48%;
  right: 24%;
  color: var(--green);
  animation-delay: -1.4s;
}

.math-c {
  top: 34%;
  left: 7%;
  color: var(--cyan);
  animation-delay: -2.5s;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}

.section {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3.2rem, 8vw, 6rem) 0;
}

.intro-grid,
.trust-grid,
.leaderboard-band {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}

.intro-grid p,
.leaderboard-band p,
.beta p,
.legal-panel p,
.legal-list {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
  font-weight: 650;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.feature-card {
  min-height: 220px;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.feature-card span {
  display: inline-flex;
  margin-bottom: 2.1rem;
  color: #07100b;
  background: var(--gold);
  padding: 0.38rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 1000;
}

.feature-card p {
  color: var(--muted);
  line-height: 1.5;
  font-weight: 650;
}

.feature-card.hot { background: linear-gradient(145deg, rgba(255, 73, 104, 0.35), var(--panel)); }
.feature-card.green { background: linear-gradient(145deg, rgba(132, 255, 89, 0.28), var(--panel)); }
.feature-card.blue { background: linear-gradient(145deg, rgba(32, 214, 255, 0.28), var(--panel)); }
.feature-card.gold { background: linear-gradient(145deg, rgba(255, 212, 71, 0.28), var(--panel)); }
.feature-card.purple { background: linear-gradient(145deg, rgba(140, 116, 255, 0.33), var(--panel)); }
.feature-card.boss { background: linear-gradient(145deg, rgba(255, 73, 104, 0.30), rgba(7, 7, 21, 0.82)); }

.teacher-app {
  width: min(1240px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4.5rem) 0;
}

.teacher-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: end;
  margin-bottom: clamp(1.5rem, 4vw, 2.75rem);
}

.teacher-hero h1 {
  margin-bottom: 0.5rem;
  font-size: clamp(3.1rem, 10vw, 7.2rem);
}

.education-hero {
  align-items: center;
  padding: clamp(1.25rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(32, 214, 255, 0.10), rgba(132, 255, 89, 0.08)),
    rgba(255, 255, 255, 0.08);
}

.education-hero h1 {
  max-width: 780px;
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  line-height: 0.96;
  text-shadow: none;
}

.teacher-copy {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.5;
  font-weight: 750;
}

.education-snapshot {
  display: grid;
  gap: 0.75rem;
  min-width: min(360px, 100%);
}

.education-snapshot div {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.education-snapshot span {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.education-snapshot strong {
  color: var(--green);
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.education-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 1.25rem 0;
}

.education-card {
  min-height: 0;
  padding: 1.1rem 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
}

.education-card span {
  display: inline-flex;
  margin-bottom: 1.25rem;
  color: #07100b;
  background: var(--green);
  padding: 0.38rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 1000;
}

.education-card p,
.education-steps p {
  color: var(--muted);
  line-height: 1.65;
  font-weight: 650;
}

.education-band {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1rem, 4vw, 3rem);
  align-items: start;
  margin: 1.25rem 0;
}

.education-steps {
  display: grid;
  gap: 0.7rem;
}

.education-steps p {
  margin: 0;
  padding: 0.75rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
}

.education-steps strong {
  color: #ffffff;
}

.education-simple {
  width: min(1040px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.education-intro {
  max-width: 860px;
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.education-intro h1 {
  max-width: 720px;
  margin-bottom: 1.05rem;
  font-size: clamp(2.25rem, 5vw, 4.1rem);
  line-height: 1.04;
  font-weight: 950;
  text-shadow: none;
}

.education-lede {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.80);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.65;
  font-weight: 650;
}

.education-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.education-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

.education-proof span {
  display: inline-flex;
  padding: 0.5rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.88rem;
  font-weight: 850;
}

.education-trust {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 3rem);
  align-items: start;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.education-trust h2 {
  max-width: 520px;
  margin-bottom: 0;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.1;
  text-shadow: none;
}

.education-trust p:not(.eyebrow) {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 650;
}

.education-list {
  display: grid;
  gap: 0;
  margin-top: clamp(1.25rem, 4vw, 2.5rem);
}

.education-list article {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: clamp(0.75rem, 3vw, 1.5rem);
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}

.education-list span {
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 1000;
}

.education-list h3 {
  margin-bottom: 0.35rem;
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  line-height: 1.1;
}

.education-list p {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
  font-weight: 650;
}

.teacher-code {
  min-width: 190px;
  padding: 1rem;
  border: 1px solid rgba(132, 255, 89, 0.38);
  border-radius: 8px;
  text-align: center;
  background: rgba(132, 255, 89, 0.12);
  box-shadow: 0 18px 42px rgba(132, 255, 89, 0.12);
}

.teacher-code span,
.stage-top span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.teacher-code strong {
  color: var(--green);
  font-size: 2rem;
}

.teacher-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  gap: 1rem;
  align-items: stretch;
}

.account-layout {
  margin-bottom: 1rem;
}

.teacher-panel,
.classroom-stage {
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.profile-page {
  width: min(1120px, calc(100% - 2rem));
}

.profile-page .teacher-hero {
  margin-bottom: 1rem;
}

.profile-page .education-hero {
  padding: clamp(1rem, 3vw, 2rem);
}

.profile-page .education-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
}

.profile-page .teacher-panel {
  background: rgba(255, 255, 255, 0.075);
}

.profile-page .teacher-panel h2 {
  font-size: clamp(1.65rem, 3vw, 2.6rem);
  line-height: 1.05;
}

.teacher-panel h2 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
}

.profile-page .teacher-panel h2 {
  font-size: clamp(1.65rem, 3vw, 2.6rem);
  line-height: 1.05;
}

.field-label,
.settings-grid label {
  display: grid;
  gap: 0.45rem;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 900;
}

.name-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
}

.name-entry input,
.settings-grid input,
.settings-grid select,
.settings-grid textarea,
.saved-class-entry select {
  width: 100%;
  min-height: 3.2rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.28);
  font: inherit;
  font-weight: 850;
}

.settings-grid textarea {
  min-height: 8rem;
  resize: vertical;
  line-height: 1.45;
}

.wide-field {
  grid-column: 1 / -1;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  min-height: 4rem;
  margin-top: 1rem;
}

.player-chip {
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(255, 212, 71, 0.36);
  border-radius: 999px;
  color: #07100b;
  background: var(--gold);
  font: inherit;
  font-weight: 1000;
  cursor: pointer;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.start-class {
  width: 100%;
  margin-top: 1rem;
}

.save-note {
  min-height: 1.4rem;
  margin: 0.8rem 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.class-library-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.32fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.class-library {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.class-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}

.class-card strong,
.class-card span {
  display: block;
}

.class-card strong {
  font-size: 1.05rem;
}

.class-card span {
  margin-top: 0.25rem;
  color: var(--muted);
  font-weight: 800;
}

.roster-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.roster-pill {
  padding: 0.4rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
}

.roster-pill:hover,
.roster-pill:focus-visible {
  color: #07100b;
  background: var(--gold);
  outline: none;
}

.live-classroom {
  margin-bottom: 1rem;
  background:
    linear-gradient(135deg, rgba(132, 255, 89, 0.08), rgba(32, 214, 255, 0.07)),
    rgba(255, 255, 255, 0.075);
}

.live-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.live-heading h2 {
  font-size: clamp(2.1rem, 5vw, 4.2rem);
}

.live-tabs {
  display: inline-flex;
  flex-shrink: 0;
  gap: 0.35rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
}

.live-tab {
  min-height: 2.8rem;
  padding: 0.65rem 1rem;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

.live-tab.active {
  color: #07100b;
  background: var(--green);
}

.live-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.55fr);
  gap: 1rem;
}

.live-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
}

.live-card > input {
  width: 100%;
  min-height: 3.2rem;
  margin-bottom: 0.8rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.28);
  font: inherit;
  font-weight: 850;
}

.room-card {
  display: grid;
  align-content: center;
  min-height: 100%;
  text-align: center;
}

.room-card span {
  color: var(--muted);
  font-weight: 950;
  text-transform: uppercase;
}

.room-card strong {
  display: block;
  margin: 0.35rem 0;
  color: var(--green);
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  line-height: 1;
}

.room-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.live-room-board {
  margin-top: 1rem;
}

.student-app .teacher-hero h1 {
  font-size: clamp(3rem, 9vw, 7rem);
}

.student-join-panel {
  margin-bottom: 1rem;
}

.freeplay-page {
  width: min(1100px, calc(100% - 2rem));
  min-height: calc(100vh - 96px);
  display: grid;
  align-content: center;
}

.freeplay-hero {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  margin-bottom: 1rem;
}

.freeplay-hero .teacher-copy {
  margin: 0 auto;
}

.freeplay-center {
  display: grid;
  justify-items: center;
}

.freeplay-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.freeplay-choice-card {
  display: grid;
  gap: 0.45rem;
  width: 100%;
  min-height: 10rem;
  color: #ffffff;
  text-align: left;
  cursor: pointer;
}

.freeplay-choice-card strong {
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  line-height: 1.05;
}

.freeplay-choice-card small {
  color: var(--muted);
  font: inherit;
  font-weight: 750;
  line-height: 1.45;
}

.freeplay-choice-card:hover,
.freeplay-choice-card:focus-visible {
  outline: 3px solid rgba(132, 255, 89, 0.44);
  outline-offset: 3px;
}

.freeplay-card {
  width: min(620px, 100%);
  text-align: center;
}

.freeplay-card h2 {
  max-width: 540px;
  margin: 0 auto 0.75rem;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.02;
}

.freeplay-card .button {
  width: min(360px, 100%);
  margin-top: 1rem;
}

.freeplay-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.freeplay-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
  text-align: left;
}

.freeplay-options label {
  display: grid;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.freeplay-form input,
.freeplay-options select {
  width: 100%;
  min-height: 3.5rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.28);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 900;
  text-align: center;
}

.freeplay-options select {
  appearance: none;
  text-align: left;
}

.freeplay-form .button {
  width: 100%;
  margin-top: 0;
}

.freeplay-lobby {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.freeplay-code-block {
  display: grid;
  gap: 0.25rem;
}

.freeplay-code-block span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.freeplay-code-block strong {
  color: var(--green);
  font-size: clamp(3rem, 9vw, 6rem);
  line-height: 1;
}

.freeplay-code-block p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.room-summary {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid rgba(132, 255, 89, 0.28);
  border-radius: 8px;
  background: rgba(132, 255, 89, 0.10);
}

.room-summary span,
.refresh-pill {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.room-summary strong {
  color: var(--green);
  font-size: 1.5rem;
}

.waiting-roster {
  margin-top: 1rem;
}

.refresh-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2.4rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(32, 214, 255, 0.28);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(32, 214, 255, 0.10);
}

.score-report-panel {
  margin-bottom: 1rem;
}

.auth-page {
  min-height: calc(100vh - 9rem);
  display: grid;
  align-items: center;
}

.auth-card {
  width: min(760px, 100%);
  margin: 0 auto;
}

.auth-card h1 {
  font-size: clamp(2.8rem, 8vw, 5.2rem);
}

.auth-card .teacher-copy {
  margin-bottom: 1.25rem;
}

.read-first-panel {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid rgba(132, 255, 89, 0.30);
  border-radius: 8px;
  background: rgba(132, 255, 89, 0.10);
}

.read-first-panel h3 {
  margin-bottom: 0;
}

.read-first-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
  font-weight: 750;
}

.school-privacy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.school-privacy-grid > div {
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
}

.school-privacy-grid > div > strong {
  display: block;
  margin-bottom: 0.3rem;
  color: #ffffff;
}

.read-first-panel .privacy-guidance {
  padding-left: 0.85rem;
  border-left: 3px solid var(--gold);
  color: rgba(255, 255, 255, 0.9);
}

.terms-check {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  color: #ffffff;
  font-weight: 900;
}

.terms-check input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.2rem;
  accent-color: var(--green);
}

.auth-notice {
  display: grid;
  gap: 0.35rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(32, 214, 255, 0.34);
  border-radius: 8px;
  background: rgba(32, 214, 255, 0.12);
}

.auth-notice strong {
  color: var(--cyan);
}

.auth-notice span {
  color: rgba(255, 255, 255, 0.80);
  font-weight: 800;
}

.registration-success {
  justify-items: center;
  max-width: 620px;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2.25rem);
  text-align: center;
}

.registration-success h2 {
  margin: 0;
  font-size: clamp(2.2rem, 7vw, 4rem);
}

.registration-success p {
  max-width: 34rem;
  margin: 0.4rem auto;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.55;
}

.registration-success .button {
  width: min(320px, 100%);
  margin-top: 0.75rem;
}

.confirmation-mark {
  display: grid;
  width: 4rem;
  height: 4rem;
  place-items: center;
  border: 1px solid rgba(32, 214, 255, 0.42);
  border-radius: 50%;
  color: #07121a;
  background: var(--cyan);
  font-size: 0.78rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.education-privacy-section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.education-privacy-section h2 {
  font-size: clamp(1.8rem, 5vw, 3rem);
}

@media (max-width: 680px) {
  .school-privacy-grid {
    grid-template-columns: 1fr;
  }
}

.password-guidance {
  margin: 0.75rem 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.92rem;
  font-weight: 750;
}

.auth-text-button {
  display: block;
  margin: 0.9rem auto 0;
  padding: 0.35rem;
  border: 0;
  color: var(--cyan);
  background: transparent;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.auth-text-button:hover,
.auth-text-button:focus-visible {
  color: #ffffff;
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* Secure teacher portal */
.profile-page {
  width: min(1180px, calc(100% - 2rem));
  padding-top: clamp(1.25rem, 3vw, 2.5rem);
}

.portal-header {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: end;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.portal-header h1 {
  margin: 0.2rem 0 0.35rem;
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  line-height: 1;
}

.portal-header p:not(.eyebrow) {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.portal-notice {
  margin: 0.75rem 0;
  padding: 0.65rem 0.8rem;
  border-left: 3px solid var(--cyan);
  color: rgba(255, 255, 255, 0.82);
  background: rgba(32, 214, 255, 0.08);
  font-weight: 800;
}

.portal-notice:empty {
  display: none;
}

.portal-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 1rem 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.portal-metrics > div {
  min-width: 0;
  padding: 0.9rem 1rem;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.portal-metrics > div:last-child {
  border-right: 0;
}

.portal-metrics span,
.portal-metrics strong {
  display: block;
}

.portal-metrics span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.75rem;
  font-weight: 950;
  text-transform: uppercase;
}

.portal-metrics strong {
  margin-top: 0.25rem;
  overflow-wrap: anywhere;
  color: #ffffff;
  font-size: clamp(1.25rem, 3vw, 2rem);
}

.portal-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
}

.portal-tab {
  min-height: 3rem;
  padding: 0.65rem 0.75rem;
  border: 0;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.68);
  background: transparent;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

.portal-tab:hover,
.portal-tab:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.portal-tab.active {
  color: #07100b;
  background: var(--green);
}

.portal-section {
  margin-bottom: 1rem;
}

.portal-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 0.85rem;
}

.portal-section-heading h2 {
  margin: 0.25rem 0 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.portal-limit {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.85rem;
  font-weight: 900;
}

.portal-section .teacher-layout {
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
}

.portal-section .class-library-panel {
  display: block;
  margin: 0;
}

.class-library-heading {
  margin-bottom: 0.85rem;
}

.class-library-heading h3 {
  margin-bottom: 0.25rem;
}

.class-library-heading p {
  margin: 0;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.92rem;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .portal-header,
  .portal-section-heading {
    display: grid;
    align-items: start;
  }

  .portal-header .button {
    width: 100%;
  }

  .portal-metrics,
  .portal-tabs,
  .portal-section .teacher-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-metrics > div:nth-child(2) {
    border-right: 0;
  }

  .portal-metrics > div:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .portal-section .teacher-layout {
    grid-template-columns: 1fr;
  }
}

.report-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.report-heading h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1rem;
}

.score-report-list,
.missed-report-list {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.report-card,
.missed-card {
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
}

.report-card strong,
.report-card span,
.missed-card strong,
.missed-card span {
  display: block;
}

.report-card span,
.missed-card span {
  margin-top: 0.3rem;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.correct-card {
  border-color: rgba(132, 255, 89, 0.32);
}

.correct-card strong {
  color: var(--green);
}

.wrong-card {
  border-color: rgba(255, 73, 104, 0.36);
}

.wrong-card strong {
  color: var(--pink);
}

.mini-score-list {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.mini-score-list p {
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 900;
}

.hidden {
  display: none !important;
}

.classroom-stage {
  margin-top: 1rem;
}

.stage-top {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stage-top > div {
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.26);
}

.stage-top strong {
  color: var(--green);
  font-size: clamp(1.25rem, 3vw, 2rem);
}

#timer-display.hot {
  color: var(--pink);
  text-shadow: 0 0 22px rgba(255, 73, 104, 0.78);
}

.question-board {
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid rgba(32, 214, 255, 0.28);
  border-radius: 8px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(32, 214, 255, 0.18), rgba(255, 73, 104, 0.12)),
    rgba(0, 0, 0, 0.22);
}

.question-board p {
  color: rgba(255, 255, 255, 0.74);
  font-weight: 850;
}

.question-board h2 {
  margin: 0.4rem 0 1.2rem;
  font-size: clamp(4rem, 12vw, 8.8rem);
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.answer-choice {
  min-height: 5.6rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: #07100b;
  background: linear-gradient(135deg, var(--gold), var(--green));
  font: inherit;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 1000;
  cursor: pointer;
}

.answer-choice:hover,
.answer-choice:focus-visible,
.score-row:hover,
.score-row:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.42);
  outline-offset: 2px;
}

.player-scoreboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
}

.score-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.24);
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

.score-row.selected {
  color: #07100b;
  background: var(--cyan);
}

.score-row strong {
  color: var(--green);
  font-size: 1.45rem;
}

.score-row.selected strong {
  color: #07100b;
}

.stage-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
}

.final {
  margin-bottom: 1rem;
}

.leaderboard-band,
.beta,
.legal-panel {
  padding: clamp(1.4rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
}

.score-stack {
  display: grid;
  gap: 0.75rem;
}

.score-stack div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid var(--line);
}

.score-stack span {
  color: var(--muted);
  font-weight: 850;
}

.score-stack strong {
  color: var(--green);
  font-size: 1.8rem;
}

.trust-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.trust-list li {
  padding: 1rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid var(--line);
  font-weight: 900;
}

.beta a,
.legal-panel a,
.footer a {
  color: var(--green);
  font-weight: 900;
}

.legal-page {
  width: min(900px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 7rem) 0;
}

.legal-panel h1 {
  font-size: clamp(2.5rem, 8vw, 4.8rem);
  line-height: 0.95;
}

.legal-panel h2 {
  margin-top: 2rem;
  font-size: clamp(1.65rem, 4vw, 2.25rem);
}

.legal-list {
  padding-left: 1.2rem;
}

.last-updated {
  color: rgba(255, 255, 255, 0.58);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem clamp(1rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: rgba(0, 0, 0, 0.20);
}

.footer p {
  margin: 0;
  font-weight: 900;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1rem;
}

@media (max-width: 820px) {
  .site-header,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .intro-grid,
  .trust-grid,
  .leaderboard-band {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .trust-list {
    grid-template-columns: 1fr;
  }

  .education-list article {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .education-trust {
    grid-template-columns: 1fr;
  }

  .education-actions .button {
    width: 100%;
  }

  .teacher-hero,
  .teacher-layout,
  .class-library-panel,
  .class-library,
  .class-card,
  .education-grid,
  .education-band,
  .live-heading,
  .live-grid,
  .freeplay-choice,
  .report-grid,
  .stage-top,
  .player-scoreboard,
  .stage-actions,
  .freeplay-lobby {
    grid-template-columns: 1fr;
  }

  .freeplay-page {
    min-height: auto;
    align-content: start;
    padding-top: 2rem;
  }

  .freeplay-hero {
    text-align: left;
    justify-items: start;
  }

  .freeplay-lobby {
    text-align: center;
  }

  .freeplay-options {
    grid-template-columns: 1fr;
  }

  .live-heading,
  .report-heading {
    display: grid;
  }

  .live-tabs {
    width: 100%;
  }

  .live-tab {
    flex: 1;
  }

  .teacher-code {
    width: 100%;
  }

  .answer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    min-height: 760px;
  }

  .math-float {
    display: none;
  }
}

/* School trust and privacy */
.school-trust-page {
  width: min(100% - 2rem, 1040px);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) 0;
}

.school-trust-hero {
  max-width: 760px;
  padding-bottom: 2rem;
}

.school-trust-hero h1 {
  margin: 0.35rem 0 0.75rem;
  font-size: clamp(2.5rem, 7vw, 5rem);
  line-height: 0.98;
}

.school-trust-hero > p:last-of-type {
  max-width: 650px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.1rem;
  line-height: 1.6;
}

.trust-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--gold);
  background: rgba(255, 212, 71, 0.09);
}

.trust-status span,
.trust-section p,
.trust-section li {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
}

.trust-jump {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.65rem 0;
  border-block: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 7, 21, 0.92);
  backdrop-filter: blur(16px);
}

.trust-jump a {
  flex: 0 0 auto;
  padding: 0.55rem 0.75rem;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.trust-section {
  padding: clamp(2rem, 5vw, 4rem) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.trust-section h2 {
  max-width: 760px;
  margin: 0.35rem 0 1rem;
  font-size: clamp(1.65rem, 4vw, 2.7rem);
}

.trust-section > p,
.trust-section > ul {
  max-width: 820px;
}

.trust-table {
  margin: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.trust-row {
  display: grid;
  grid-template-columns: 1fr 1.35fr 1.15fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.trust-row span {
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.45;
}

.trust-head strong {
  color: var(--cyan);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.trust-list {
  padding-left: 1.3rem;
}

.trust-list li + li {
  margin-top: 0.6rem;
}

.trust-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.text-link,
.student-privacy-note a,
.account-privacy-panel a {
  color: var(--cyan);
  font-weight: 800;
}

.student-privacy-note {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  line-height: 1.5;
}

.account-privacy-panel {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: center;
  margin-top: 2rem;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.account-privacy-panel h2 {
  margin: 0.2rem 0 0.45rem;
  font-size: 1.4rem;
}

.account-privacy-panel p {
  max-width: 650px;
  color: rgba(255, 255, 255, 0.72);
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 720px) {
  .trust-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .trust-head {
    display: none;
  }

  .account-privacy-panel {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Game Show Mode */
.buzzer-status {
  width: min(520px, 100%);
  margin: 0 auto 1rem;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.24);
  font-size: 1rem;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
}

.game-show-buzzer {
  grid-column: 1 / -1;
  width: min(360px, 100%);
  min-height: 8rem;
  margin: 0 auto;
  border: 4px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  color: #ffffff;
  background: radial-gradient(circle at 35% 28%, #ff7388 0, #ff3155 34%, #a60025 100%);
  box-shadow: 0 14px 0 #620018, 0 26px 60px rgba(255, 49, 85, 0.45), inset 0 5px 10px rgba(255, 255, 255, 0.3);
  font: inherit;
  font-size: clamp(1.8rem, 6vw, 3rem);
  font-weight: 1000;
  cursor: pointer;
  transition: transform 100ms ease, box-shadow 100ms ease;
}

.game-show-buzzer:hover,
.game-show-buzzer:focus-visible {
  transform: translateY(3px);
  box-shadow: 0 10px 0 #620018, 0 22px 50px rgba(255, 49, 85, 0.5), inset 0 5px 10px rgba(255, 255, 255, 0.3);
}

.game-show-buzzer.queued {
  border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  box-shadow: 0 10px 35px rgba(32, 214, 255, 0.28);
  cursor: default;
}

.game-show-answer {
  animation: answer-pop 180ms ease both;
}

@keyframes answer-pop {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .math-float {
    animation: none;
  }
}

/* App polish pass */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 7, 21, 0.72), rgba(7, 7, 21, 0.92)),
    url("assets/pointbase-wallpaper.png") center / cover no-repeat;
  opacity: 0.54;
  pointer-events: none;
}

.site-header {
  padding-block: 0.8rem;
}

.brand span {
  line-height: 1;
}

.nav {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: clamp(1.25rem, 5vw, 4rem);
  align-items: end;
  min-height: min(760px, 88vh);
}

.hero-content {
  padding-bottom: clamp(0rem, 2vw, 2rem);
}

.hero h1 {
  font-size: clamp(4rem, 12vw, 8.4rem);
  line-height: 0.9;
}

.hero-copy {
  max-width: 660px;
}

.web-lobby-card {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 1.35rem);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.07)),
    rgba(7, 7, 21, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 28px 80px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.lobby-brand-mark {
  display: inline-grid;
  width: 4rem;
  height: 4rem;
  place-items: center;
  border-radius: 8px;
  color: #07100b;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  box-shadow: 0 16px 42px rgba(132, 255, 89, 0.24);
  font-size: 1.45rem;
  font-weight: 1000;
}

.freeplay-mark {
  margin: 0 auto 1rem;
}

.web-lobby-card h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
  text-shadow: none;
}

.lobby-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.lobby-stat-row span {
  display: grid;
  min-height: 4.5rem;
  place-items: center;
  padding: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.62);
  background: rgba(0, 0, 0, 0.18);
  font-size: 0.72rem;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
}

.lobby-stat-row strong {
  display: block;
  color: #ffffff;
  font-size: 1.25rem;
  line-height: 1;
}

.lobby-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.mode-chip {
  display: flex;
  min-height: 3.3rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
  font-weight: 1000;
}

.mode-chip.rush { background: linear-gradient(145deg, rgba(255, 212, 71, 0.30), rgba(255, 255, 255, 0.08)); }
.mode-chip.kids { background: linear-gradient(145deg, rgba(32, 214, 255, 0.30), rgba(255, 255, 255, 0.08)); }
.mode-chip.web { background: linear-gradient(145deg, rgba(132, 255, 89, 0.25), rgba(255, 255, 255, 0.08)); }
.mode-chip.boss { background: linear-gradient(145deg, rgba(255, 73, 104, 0.34), rgba(255, 255, 255, 0.08)); }

.section {
  padding-block: clamp(2.6rem, 6vw, 4.8rem);
}

.feature-grid {
  gap: 0.8rem;
}

.feature-card {
  min-height: 190px;
  padding: 1rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.055)),
    rgba(7, 7, 21, 0.40);
}

.feature-card span {
  margin-bottom: 1.35rem;
}

.leaderboard-band,
.education-trust,
.teacher-panel,
.classroom-stage {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.055)),
    rgba(7, 7, 21, 0.42);
  backdrop-filter: blur(14px);
}

.education-simple {
  width: min(1120px, calc(100% - 2rem));
}

.education-intro {
  max-width: none;
  padding: clamp(1.15rem, 3vw, 1.7rem);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(32, 214, 255, 0.12), rgba(132, 255, 89, 0.07)),
    rgba(7, 7, 21, 0.50);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.education-intro h1 {
  font-size: clamp(2.35rem, 5vw, 4.25rem);
}

.education-proof span,
.beta-badge {
  border-radius: 8px;
}

.freeplay-page {
  width: min(1040px, calc(100% - 2rem));
}

.freeplay-hero h1 {
  font-size: clamp(3rem, 9vw, 6.5rem);
  line-height: 0.9;
}

.freeplay-center {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.freeplay-card {
  width: 100%;
  min-height: 100%;
  text-align: left;
}

.freeplay-card h2 {
  margin-inline: 0;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
}

.freeplay-card .button {
  width: 100%;
}

.question-board {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(0, 0, 0, 0.28), rgba(255, 255, 255, 0.08)),
    rgba(7, 7, 21, 0.40);
}

.answer-grid button {
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

@media (max-width: 940px) {
  .hero,
  .freeplay-center {
    grid-template-columns: 1fr;
  }

  .web-lobby-card {
    max-width: 560px;
  }
}

@media (max-width: 820px) {
  .hero {
    min-height: auto;
    align-items: start;
    padding-top: 4.8rem;
  }

  .web-lobby-card {
    width: 100%;
  }

  .freeplay-card {
    text-align: left;
  }

  .freeplay-mark {
    margin-inline: 0;
  }

  .lobby-stat-row {
    grid-template-columns: 1fr;
  }
}

/* Game show energy layer */
body.theme-warm .question-board {
  border-color: rgba(132, 255, 89, 0.34);
}

body.theme-hot .question-board {
  border-color: rgba(255, 212, 71, 0.42);
  box-shadow: 0 0 34px rgba(255, 212, 71, 0.12);
}

body.theme-speed .question-board {
  border-color: rgba(32, 214, 255, 0.48);
  box-shadow: 0 0 38px rgba(32, 214, 255, 0.16);
}

body.theme-power .question-board,
body.theme-pro .question-board {
  border-color: rgba(140, 116, 255, 0.48);
  box-shadow: 0 0 42px rgba(140, 116, 255, 0.16);
}

body.theme-boss .question-board {
  border-color: rgba(255, 73, 104, 0.58);
  box-shadow: 0 0 48px rgba(255, 73, 104, 0.20);
}

body.theme-double .question-board {
  background:
    linear-gradient(145deg, rgba(255, 212, 71, 0.28), rgba(132, 255, 89, 0.16)),
    rgba(7, 7, 21, 0.46);
}

body.theme-final .question-board {
  background:
    linear-gradient(145deg, rgba(255, 73, 104, 0.34), rgba(255, 212, 71, 0.16)),
    rgba(7, 7, 21, 0.58);
  box-shadow: 0 0 60px rgba(255, 73, 104, 0.24);
}

body.theme-final .question-board h2,
body.theme-double .question-board h2 {
  text-shadow: 0 0 28px rgba(255, 255, 255, 0.24);
}

.score-row.leader {
  border-color: rgba(132, 255, 89, 0.46);
  background:
    linear-gradient(135deg, rgba(132, 255, 89, 0.18), rgba(255, 255, 255, 0.08)),
    rgba(0, 0, 0, 0.24);
}

.score-row.streaking {
  border-color: rgba(255, 212, 71, 0.58);
  box-shadow: 0 0 26px rgba(255, 212, 71, 0.16);
}

.winner-podium {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  width: 100%;
}

.podium-card {
  display: grid;
  gap: 0.35rem;
  min-height: 8rem;
  align-content: center;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.26);
}

.podium-card span {
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.podium-card strong {
  color: #ffffff;
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  line-height: 1;
}

.podium-card small {
  color: var(--muted);
  font: inherit;
  font-weight: 850;
}

.podium-card.place-1 {
  background:
    linear-gradient(145deg, rgba(255, 212, 71, 0.30), rgba(132, 255, 89, 0.16)),
    rgba(0, 0, 0, 0.24);
  box-shadow: 0 0 34px rgba(255, 212, 71, 0.16);
}

@media (max-width: 820px) {
  .winner-podium {
    grid-template-columns: 1fr;
  }
}

/* Free Play cleanup */
.freeplay-page {
  width: min(980px, calc(100% - 2rem));
  min-height: auto;
  align-content: start;
  padding-top: clamp(1.5rem, 4vw, 3rem);
}

.freeplay-hero {
  max-width: 720px;
  margin: 0 auto 1.1rem;
  padding: clamp(1rem, 3vw, 1.35rem);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05)),
    rgba(7, 7, 21, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.freeplay-hero h1 {
  margin-bottom: 0.45rem;
  font-size: clamp(2.45rem, 7vw, 4.4rem);
  line-height: 0.95;
}

.freeplay-hero .teacher-copy {
  max-width: 560px;
  font-size: clamp(0.98rem, 2vw, 1.15rem);
  line-height: 1.45;
}

.freeplay-mark {
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
}

.freeplay-choice {
  max-width: 820px;
  margin: 0 auto 1.1rem;
  gap: 0.9rem;
  perspective: 900px;
}

.freeplay-choice-card {
  position: relative;
  overflow: hidden;
  min-height: 8.2rem;
  padding: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06)),
    rgba(7, 7, 21, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 24px 70px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px) saturate(1.25);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.freeplay-choice-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  opacity: 0.92;
}

.freeplay-choice-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.20), transparent 42%);
  pointer-events: none;
}

#free-choose-host::before {
  background:
    radial-gradient(circle at 18% 10%, rgba(132, 255, 89, 0.38), transparent 42%),
    radial-gradient(circle at 95% 95%, rgba(255, 212, 71, 0.22), transparent 44%),
    rgba(7, 7, 21, 0.32);
}

#free-choose-join::before {
  background:
    radial-gradient(circle at 18% 10%, rgba(32, 214, 255, 0.34), transparent 42%),
    radial-gradient(circle at 95% 95%, rgba(255, 73, 104, 0.22), transparent 44%),
    rgba(7, 7, 21, 0.32);
}

.freeplay-choice-card:hover,
.freeplay-choice-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 30px 80px rgba(0, 0, 0, 0.30);
}

.choice-icon {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  place-items: center;
  margin-bottom: 0.7rem;
  border-radius: 8px;
  color: #07100b;
  background: linear-gradient(135deg, var(--green), var(--gold));
  box-shadow: 0 16px 32px rgba(132, 255, 89, 0.20);
  font-size: 1.05rem;
  font-weight: 1000;
}

#free-choose-join .choice-icon {
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  box-shadow: 0 16px 32px rgba(32, 214, 255, 0.18);
}

.freeplay-choice-card strong {
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  line-height: 1.05;
}

.freeplay-choice-card small {
  max-width: 25rem;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.freeplay-center {
  grid-template-columns: minmax(0, 560px);
  justify-content: center;
}

.freeplay-card {
  position: relative;
  overflow: hidden;
  padding: clamp(1rem, 3vw, 1.35rem);
  text-align: left;
  border-color: rgba(255, 255, 255, 0.20);
  background:
    radial-gradient(circle at top left, rgba(32, 214, 255, 0.16), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06)),
    rgba(7, 7, 21, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 24px 70px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px) saturate(1.2);
}

.freeplay-card h2 {
  margin-bottom: 0.65rem;
  font-size: clamp(1.55rem, 4vw, 2.35rem);
}

.freeplay-card .save-note {
  font-size: 0.95rem;
  line-height: 1.45;
}

.freeplay-options {
  grid-template-columns: 1fr;
}

.freeplay-form input,
.freeplay-options select {
  text-align: left;
}

.freeplay-lobby {
  max-width: 980px;
  margin-inline: auto;
}

.freeplay-page .stage-top {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.freeplay-page .question-board h2 {
  font-size: clamp(3rem, 10vw, 7rem);
}

@media (max-width: 820px) {
  .freeplay-page {
    width: min(100% - 1rem, 680px);
    padding-top: 1rem;
  }

  .freeplay-hero {
    text-align: left;
    justify-items: start;
  }

  .freeplay-mark {
    margin-inline: 0;
  }

  .freeplay-choice,
  .freeplay-page .stage-top {
    grid-template-columns: 1fr;
  }
}
