/* Fonts are SELF-HOSTED (OFL-licensed, files in fonts/) — no third-party
   requests at runtime. This matters for GDPR in Germany: pulling fonts
   from fonts.googleapis.com at page load discloses every visitor's IP
   to Google, which German courts ruled unlawful without consent.
   See fonts/OFL-*.txt for the licenses. */
@font-face {
  font-family: "Press Start 2P";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/press-start-2p-latin-400.woff2") format("woff2");
}

@font-face {
  font-family: "Chakra Petch";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/chakra-petch-latin-400.woff2") format("woff2");
}

@font-face {
  font-family: "Chakra Petch";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/chakra-petch-latin-600.woff2") format("woff2");
}

@font-face {
  font-family: "Chakra Petch";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/chakra-petch-latin-700.woff2") format("woff2");
}

:root {
  --bg: #070812;
  --panel: #101323;
  --text: #f4f7ff;
  --muted: #9299b8;
  --cyan: #00f5ff;
  --purple: #9b5cff;
  --pink: #ff3cac;
  --border: rgba(255, 255, 255, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 80% 10%, rgba(155, 92, 255, 0.18), transparent 30%),
    radial-gradient(circle at 10% 40%, rgba(0, 245, 255, 0.1), transparent 28%),
    var(--bg);
  font-family: "Chakra Petch", "Segoe UI", sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 45px 45px;
  mask-image: linear-gradient(to bottom, black, transparent);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: none;
  cursor: pointer;
  font: inherit;
}

.navbar {
  width: min(1200px, 90%);
  margin: auto;
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.logo {
  font-family: "Press Start 2P", monospace;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 1px;
}

.logo span {
  color: var(--cyan);
}

.nav-links {
  display: flex;
  gap: 28px;
  color: var(--muted);
  font-size: 0.9rem;
}

.nav-links a {
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--cyan);
}

.nav-button,
.primary-button,
.secondary-button {
  padding: 13px 22px;
  border-radius: 6px;
  font-weight: 700;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    background 0.3s ease;
}

.nav-button,
.primary-button {
  color: #05060d;
  background: var(--cyan);
  box-shadow: 0 0 24px rgba(0, 245, 255, 0.25);
}

.nav-button:hover,
.primary-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 35px rgba(0, 245, 255, 0.6);
}

.secondary-button {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
}

.secondary-button:hover {
  border-color: var(--purple);
  box-shadow: 0 0 25px rgba(155, 92, 255, 0.3);
}

.hero {
  width: min(1200px, 90%);
  min-height: 75vh;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 50px;
}

.eyebrow {
  color: var(--cyan);
  font-family: "Press Start 2P", monospace;
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 3px;
  margin-bottom: 18px;
}

.hero h1 {
  font-family: "Chakra Petch", sans-serif;
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -3px;
}

.hero h1 span {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1px var(--cyan);
  text-shadow: 0 0 30px rgba(0, 245, 255, 0.25);
}

.hero-description {
  max-width: 520px;
  margin: 28px 0;
  color: var(--muted);
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.hero-visual {
  min-height: 430px;
  display: grid;
  place-items: center;
  position: relative;
}

.orb {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 25%, white, var(--cyan) 8%, var(--purple) 45%, #11142b 70%);
  box-shadow:
    0 0 40px rgba(0, 245, 255, 0.6),
    0 0 120px rgba(155, 92, 255, 0.45);
  animation: float 5s ease-in-out infinite;
}

.orb-ring {
  position: absolute;
  width: 340px;
  height: 120px;
  border: 1px solid rgba(0, 245, 255, 0.6);
  border-radius: 50%;
  transform: rotate(-25deg);
  animation: spin 12s linear infinite;
}

.ring-two {
  width: 420px;
  height: 160px;
  border-color: rgba(255, 60, 172, 0.5);
  transform: rotate(35deg);
  animation-direction: reverse;
}

.visual-label {
  position: absolute;
  bottom: 30px;
  color: var(--cyan);
  font-family: "Press Start 2P", monospace;
  font-size: 0.55rem;
  letter-spacing: 2px;
}

.section {
  width: min(1200px, 90%);
  margin: 100px auto;
}

.section h2 {
  font-family: "Chakra Petch", sans-serif;
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  margin-bottom: 35px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.game-card,
.tournament-panel {
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.07),
    rgba(255, 255, 255, 0.015)
  );
  backdrop-filter: blur(12px);
  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.game-card:hover {
  transform: translateY(-8px);
  border-color: var(--cyan);
  box-shadow: 0 0 35px rgba(0, 245, 255, 0.15);
}

.game-number {
  color: var(--pink);
  font-family: "Press Start 2P", monospace;
  font-size: 0.6rem;
}

.game-card h3,
.tournament-panel h3 {
  margin: 35px 0 12px;
  font-family: "Chakra Petch", sans-serif;
  font-weight: 700;
}

.game-card p,
.tournament-panel p {
  color: var(--muted);
  line-height: 1.6;
}

.tournament-panel {
  border-color: rgba(155, 92, 255, 0.45);
}

.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 8px;
  border-radius: 50%;
  background: #36ff8a;
  box-shadow: 0 0 15px #36ff8a;
}

.tournament-panel .primary-button {
  margin-top: 25px;
}

footer {
  padding: 40px 5%;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-22px);
  }
}

@keyframes spin {
  from {
    rotate: 0deg;
  }

  to {
    rotate: 360deg;
  }
}

@media (max-width: 800px) {
  .navbar {
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 50px;
  }

  .hero-visual {
    min-height: 350px;
  }

  .game-grid {
    grid-template-columns: 1fr;
  }
}
/* =========================================================
   GAMEHUB — GAMES PAGE
   ========================================================= */

.games-hero {
  min-height: 55vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 140px 8% 80px;
}

.games-hero::before {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(0, 245, 255, 0.16),
    transparent 65%
  );
  filter: blur(20px);
  pointer-events: none;
}

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

.games-hero h1 {
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.95;
  margin: 20px 0;
}

.games-hero h1 span {
  display: block;
  color: var(--cyan);
}

.games-hero-description {
  max-width: 650px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}


/* =========================================================
   GAME CATALOGUE
   ========================================================= */

.games-catalogue {
  padding-top: 40px;
}


/* =========================================================
   FILTER BUTTONS
   ========================================================= */

.game-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 35px 0;
}

.filter-button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 10px 20px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.8rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.filter-button:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-2px);
}

.filter-button.active {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--bg);
  font-weight: 700;
}


/* =========================================================
   GAMES GRID
   ========================================================= */

.games-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  width: 100%;
  margin-top: 25px;
}


/* =========================================================
   GAME CARD
   ========================================================= */

.games-grid .dynamic-game-card {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border-radius: 20px;

  border: 1px solid rgba(255, 255, 255, 0.1);

  background:
    linear-gradient(
      145deg,
      rgba(16, 19, 35, 0.98),
      rgba(7, 8, 18, 0.98)
    );

  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.25);

  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.games-grid .dynamic-game-card:hover {
  transform: translateY(-8px);

  border-color:
    rgba(0, 245, 255, 0.5);

  box-shadow:
    0 25px 70px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(0, 245, 255, 0.08);
}


/* =========================================================
   GAME IMAGE
   ========================================================= */

.games-grid .game-image {
  width: 100%;
  height: 190px;
  flex-shrink: 0;

  position: relative;
  overflow: hidden;

  background-size: cover;
  background-position: center;
}

.games-grid .game-image::after {
  content: "";
  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      to bottom,
      transparent 20%,
      rgba(7, 8, 18, 0.9) 100%
    );
}


/* =========================================================
   GAME VISUALS
   ========================================================= */

.games-grid .cyber-strike {
  background:
    radial-gradient(
      circle at 70% 30%,
      rgba(0, 245, 255, 0.55),
      transparent 35%
    ),
    linear-gradient(
      135deg,
      #061a2c,
      #0a4b59,
      #10152d
    );
}

.games-grid .neon-rivals {
  background:
    radial-gradient(
      circle at 30% 30%,
      rgba(255, 60, 172, 0.5),
      transparent 35%
    ),
    linear-gradient(
      135deg,
      #24092f,
      #61105f,
      #10152d
    );
}

.games-grid .shadow-protocol {
  background:
    radial-gradient(
      circle at 70% 35%,
      rgba(155, 92, 255, 0.5),
      transparent 35%
    ),
    linear-gradient(
      135deg,
      #100d2d,
      #28205a,
      #080b18
    );
}

.games-grid .default-game {
  background:
    radial-gradient(
      circle at 50% 30%,
      rgba(0, 245, 255, 0.3),
      transparent 40%
    ),
    linear-gradient(
      135deg,
      #111827,
      #18243d
    );
}


/* =========================================================
   GAME CARD CONTENT
   ========================================================= */

.games-grid .game-card-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px;
}

.games-grid .game-category {
  margin: 0 0 12px;

  color: var(--cyan);

  font-size: 0.72rem;
  font-weight: 700;

  letter-spacing: 2px;
  text-transform: uppercase;
}

.games-grid .game-card-content h3 {
  margin: 0 0 12px;

  color: var(--text);

  font-size: 1.55rem;
  line-height: 1.15;
}

.games-grid .game-description {
  margin: 0;

  color: var(--muted);

  font-size: 0.92rem;
  line-height: 1.7;
}


/* =========================================================
   VIEW GAME BUTTON
   ========================================================= */

.games-grid .card-button {
  margin-top: auto;
  width: 100%;

  padding: 13px 18px;

  border: 1px solid
    rgba(0, 245, 255, 0.35);

  border-radius: 10px;

  background:
    rgba(0, 245, 255, 0.06);

  color: var(--cyan);

  font-family: inherit;

  font-size: 0.78rem;
  font-weight: 700;

  letter-spacing: 1.5px;
  text-transform: uppercase;

  cursor: pointer;

  transition:
    background 0.25s ease,
    color 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.games-grid .card-button:hover {
  background: var(--cyan);
  color: var(--bg);

  transform: translateY(-2px);

  box-shadow:
    0 0 20px rgba(0, 245, 255, 0.3);
}


/* =========================================================
   LOADING / EMPTY / ERROR
   ========================================================= */

.games-loading {
  grid-column: 1 / -1;
}

.games-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
}

.games-error {
  grid-column: 1 / -1;

  text-align: center;
  padding: 80px 20px;

  border: 1px solid rgba(255, 100, 124, 0.2);
  border-radius: 18px;

  background: rgba(255, 100, 124, 0.04);
}

.games-error strong {
  display: block;
  color: #ff647c;
  margin-bottom: 10px;
}


/* =========================================================
   GAMEHUB NETWORK PANEL
   ========================================================= */

.games-network {
  padding-top: 40px;
}

.network-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;

  padding: 45px;

  border: 1px solid rgba(0, 245, 255, 0.15);
  border-radius: 24px;

  background:
    linear-gradient(
      135deg,
      rgba(0, 245, 255, 0.06),
      rgba(155, 92, 255, 0.04)
    );
}

.network-panel h2 {
  margin: 10px 0;
}

.network-panel h2 span {
  color: var(--cyan);
}

.network-panel p {
  color: var(--muted);
  max-width: 600px;
  line-height: 1.7;
}

.network-status {
  min-width: 220px;

  display: flex;
  align-items: center;
  gap: 14px;

  padding: 18px 22px;

  border: 1px solid rgba(72, 240, 163, 0.2);
  border-radius: 14px;

  background: rgba(72, 240, 163, 0.04);
}

.network-status strong {
  display: block;

  color: #48f0a3;

  font-size: 0.8rem;
  letter-spacing: 1px;
}

.network-status small {
  display: block;

  color: var(--muted);

  margin-top: 5px;
}

.network-dot {
  width: 10px;
  height: 10px;

  border-radius: 50%;

  background: #48f0a3;

  box-shadow:
    0 0 10px #48f0a3,
    0 0 20px rgba(72, 240, 163, 0.5);

  animation: networkPulse 1.8s infinite;
}

@keyframes networkPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.75);
  }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 1000px) {

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

}


@media (max-width: 650px) {

  .games-hero {
    min-height: 50vh;
    padding: 120px 6% 60px;
  }

  .games-hero h1 {
    font-size: 3.2rem;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .games-grid .dynamic-game-card {
    min-height: 400px;
  }

  .game-filters {
    gap: 8px;
  }

  .filter-button {
    padding: 9px 15px;
  }

  .network-panel {
    flex-direction: column;
    align-items: flex-start;
    padding: 30px;
  }

  .network-status {
    width: 100%;
    box-sizing: border-box;
  }

}

/* =========================================================
   ARCADE UI + LIVE BACKGROUND (Phase 2)
   ========================================================= */

/* Press Start 2P on interactive elements — the arcade touch.
   Kept small: PS2P is wide, so 10px keeps buttons compact. */
.nav-button,
.primary-button,
.secondary-button {
  font-family: "Press Start 2P", monospace;
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 1px;
}

.filter-button {
  font-family: "Press Start 2P", monospace;
  font-size: 0.52rem;
  font-weight: 400;
}

/* The grid floor is always scrolling upward — forward motion. */
body::before {
  animation: grid-scroll 12s linear infinite;
}

@keyframes grid-scroll {
  from {
    background-position: 0 0, 0 0;
  }

  to {
    background-position: 0 -45px, 0 -45px;
  }
}

/* One big soft neon orb that never sits still (behind content). */
body::after {
  content: "";
  position: fixed;
  top: -20vmax;
  right: -15vmax;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(155, 92, 255, 0.16),
    transparent 60%
  );
  filter: blur(40px);
  z-index: -2;
  pointer-events: none;
  animation: orb-drift 26s ease-in-out infinite alternate;
}

@keyframes orb-drift {
  from {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(-18vmax, 24vmax) scale(1.15);
  }

  to {
    transform: translate(-42vmax, 10vmax) scale(0.9);
  }
}

/* Canvas layer: starfield + pixel particles + shooting stars
   (injected by bg.js; z-index keeps it behind the grid). */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -3;
  pointer-events: none;
}

/* Arcade button press feel. */
.nav-button:active,
.primary-button:active,
.secondary-button:active,
.filter-button:active {
  transform: translateY(1px) scale(0.98);
}

/* Visitors who prefer reduced motion get a still page. */
@media (prefers-reduced-motion: reduce) {

  body::before,
  body::after {
    animation: none;
  }

  #bg-canvas {
    display: none;
  }
}


/* =========================================================
   PLAY PAGE — game runner (Phase 3)
   ========================================================= */

.play-main {
  width: min(720px, 92%);
  margin: 40px auto 90px;
}

.play-error {
  text-align: center;
  padding: 70px 0;
}

.play-error h1 {
  font-family: "Chakra Petch", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin: 14px 0;
}

.play-error p {
  color: var(--muted);
  margin-bottom: 30px;
}

.play-error .primary-button {
  display: inline-block;
}

.back-link {
  display: inline-block;
  font-family: "Press Start 2P", monospace;
  font-size: 0.58rem;
  color: var(--cyan);
  letter-spacing: 1px;
  margin-bottom: 28px;
  transition: transform 0.2s ease;
}

.back-link:hover {
  transform: translateX(-4px);
}

.play-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.cat-badge {
  font-family: "Press Start 2P", monospace;
  font-size: 0.5rem;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--muted);
}

.cat-action {
  color: var(--cyan);
  border-color: var(--cyan);
}

.cat-racing {
  color: #ffd166;
  border-color: #ffd166;
}

.cat-strategy {
  color: #36ff8a;
  border-color: #36ff8a;
}

.play-heading h1 {
  font-family: "Chakra Petch", sans-serif;
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 4rem);
  line-height: 1;
  letter-spacing: -1px;
}

.play-description {
  color: var(--muted);
  max-width: 58ch;
  line-height: 1.6;
}

/* --- stage ------------------------------------------------------ */

.play-stage {
  position: relative;
  margin-top: 34px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0, 245, 255, 0.12);
}

#game-canvas {
  display: block;
  width: 100%;
  height: auto;
  background: var(--panel);
  cursor: crosshair;
}

.stage-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
  padding: 24px;
  background: rgba(7, 8, 18, 0.88);
  backdrop-filter: blur(3px);
}

.stage-overlay[hidden] {
  display: none;
}

.overlay-title {
  font-family: "Press Start 2P", monospace;
  font-size: clamp(0.9rem, 3vw, 1.4rem);
  color: var(--cyan);
  text-shadow: 0 0 18px rgba(0, 245, 255, 0.6);
}

.overlay-sub {
  color: var(--muted);
  max-width: 46ch;
  line-height: 1.55;
  font-size: 0.95rem;
}

.overlay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  margin-top: 8px;
}

/* --- HUD -------------------------------------------------------- */

.hud-bar {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 1px;
  margin-top: 14px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.hud-cell {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 14px 18px;
  background: var(--panel);
}

.hud-label {
  font-family: "Press Start 2P", monospace;
  font-size: 0.48rem;
  color: var(--muted);
  letter-spacing: 1px;
}

.hud-value {
  font-family: "Press Start 2P", monospace;
  font-size: 0.85rem;
  color: var(--text);
}

.hud-best {
  color: var(--pink);
}

.hud-cell-wide .hud-value {
  color: var(--cyan);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- controls panel --------------------------------------------- */

.controls-panel {
  margin-top: 14px;
  padding: 20px 22px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.controls-title {
  font-family: "Press Start 2P", monospace;
  font-size: 0.52rem;
  color: var(--cyan);
  letter-spacing: 2px;
  margin-bottom: 12px;
}

.controls-hint {
  color: var(--text);
  line-height: 1.6;
  font-size: 0.95rem;
}

.engine-credit {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 1px;
}


/* =========================================================
   AUTH PAGES — sign in / create account (Phase 4)
   ========================================================= */

.auth-main {
  width: min(460px, 92%);
  margin: 50px auto 100px;
}

.auth-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 38px 34px;
  box-shadow: 0 0 40px rgba(0, 245, 255, 0.1);
}

.auth-panel h1 {
  font-family: "Chakra Petch", sans-serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  margin: 10px 0 8px;
}

.auth-sub {
  color: var(--muted);
  margin-bottom: 26px;
  line-height: 1.5;
}

.auth-notice {
  border: 1px solid #ffd166;
  color: #ffd166;
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 22px;
  line-height: 1.5;
  font-size: 0.92rem;
}

.auth-notice .secondary-button {
  display: inline-block;
  margin-top: 14px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-form[hidden] {
  display: none;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-field span {
  font-family: "Press Start 2P", monospace;
  font-size: 0.5rem;
  color: var(--cyan);
  letter-spacing: 2px;
}

.auth-field input {
  background: #0b0d1a;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  padding: 13px 14px;
  font-family: "Chakra Petch", sans-serif;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-field input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.15);
}

.auth-error {
  color: #ff5c7a;
  border: 1px solid rgba(255, 92, 122, 0.5);
  border-radius: 6px;
  padding: 11px 14px;
  font-size: 0.92rem;
}

.auth-error[hidden] {
  display: none;
}

.auth-form .primary-button {
  margin-top: 6px;
}

.auth-form .primary-button[disabled] {
  opacity: 0.6;
  cursor: wait;
}

.auth-alt {
  margin-top: 22px;
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-alt a {
  color: var(--cyan);
  border-bottom: 1px dashed var(--cyan);
}

/* =========================================================
   Account + privacy pages (Phase 7)
   ---------------------------------------------------------
   These pages carry the GDPR surface of the app, so they are
   built from plain tables and text: readable, printable, and
   honest about being the notice rather than a marketing page.
   ========================================================= */

.auth-panel--wide {
  max-width: 900px;
  width: 100%;
}

.privacy-h2 {
  margin: 30px 0 12px;
  font-family: "Press Start 2P", monospace;
  font-size: 0.78rem;
  letter-spacing: 1px;
  color: var(--cyan);
}

.privacy-h2.privacy-danger {
  color: var(--pink);
}

.privacy-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.privacy-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.privacy-table th,
.privacy-table td {
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.privacy-table thead th {
  font-family: "Press Start 2P", monospace;
  font-size: 0.6rem;
  letter-spacing: 1px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
}

.privacy-table tbody tr:last-child th,
.privacy-table tbody tr:last-child td {
  border-bottom: none;
}

.privacy-table code {
  color: var(--cyan);
  word-break: break-all;
}

.privacy-list {
  margin: 10px 0 10px 18px;
  line-height: 1.7;
}

.privacy-list li {
  margin-bottom: 8px;
}

.privacy-note {
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 3px solid var(--purple);
  background: rgba(155, 92, 255, 0.08);
  border-radius: 0 8px 8px 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.privacy-rule {
  margin: 40px 0 10px;
  border: none;
  border-top: 1px solid var(--border);
}

/* Deleting your own account is the one destructive action in the
   app: it looks different from every other button on purpose. */
.danger-button {
  background: linear-gradient(90deg, #ff3cac, #b3123f);
  border-color: #ff3cac;
  color: #fff;
}

.danger-button:hover {
  filter: brightness(1.12);
}
