:root {
  --bg: #0b1220;
  --bg-soft: #0f172a;
  --panel: #111827;
  --panel-2: #1f2937;
  --panel-3: #0f1a2d;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --line: rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.14);
  --blue: #3b82f6;
  --orange: #f97316;
  --green: #16a34a;
  --danger: #ef4444;
  --shadow: 0 18px 50px rgba(0,0,0,0.25);
  --shadow-soft: 0 10px 30px rgba(0,0,0,0.16);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(59,130,246,0.10), transparent 28%),
    radial-gradient(circle at top right, rgba(249,115,22,0.08), transparent 24%),
    linear-gradient(180deg, #081120 0%, #0b1220 35%, #0f172a 100%);
  color: var(--text);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.container,
.landing-container {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.main-area {
  padding: 24px 0;
}

/* =========================
   HEADER / NAV
========================= */

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(17,24,39,0.85);
  position: sticky;
  top: 0;
  backdrop-filter: blur(10px);
  z-index: 50;
}

.modern-header {
  background: rgba(8, 15, 30, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 10px 30px rgba(0,0,0,0.14);
}

.header-shell,
.header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand,
.brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 45%, #f97316 100%);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.22),
    0 10px 22px rgba(37,99,235,0.26);
}

.brand-text-group {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.brand-subtext {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 3px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-nav,
nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-nav a,
nav a {
  color: #dbeafe;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 10px 14px;
  border-radius: 12px;
  transition: 0.2s ease;
  margin-left: 0;
}

.site-nav a:hover,
nav a:hover {
  background: rgba(255,255,255,0.07);
  color: #fff;
}

.site-nav .nav-cta {
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
  color: #fff;
  box-shadow: 0 10px 20px rgba(37,99,235,0.22);
}

.site-nav .nav-cta:hover {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
}

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  border-radius: 14px;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 999px;
  transition: 0.2s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =========================
   BUTTONS / UI BASICS
========================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn.primary {
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
  color: white;
  box-shadow: 0 10px 20px rgba(37,99,235,0.22);
}

.btn.primary:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #3b82f6, #2563eb);
}

.btn.secondary {
  background: linear-gradient(180deg, #334155, #1f2937);
  color: white;
}

.btn.secondary:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #475569, #334155);
}

.btn-row,
.mode-buttons,
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.alert {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 14px;
}

.alert.error {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.25);
}

.alert.success {
  background: rgba(22,163,74,0.12);
  border: 1px solid rgba(22,163,74,0.25);
}

/* =========================
   SHARED CARDS
========================= */

.hero-card,
.auth-card,
.profile-card,
.board-card,
.side-card,
.feature-card,
.showcase-box,
.mini-stat,
.info-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card,
.auth-card,
.profile-card {
  padding: 28px;
}

.auth-card {
  max-width: 460px;
  margin: 40px auto;
}

/* =========================
   FORMS
========================= */

.auth-form {
  display: grid;
  gap: 12px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="color"],
select,
textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(15,23,42,0.7);
  color: white;
  padding: 12px 14px;
  font: inherit;
}

input[type="color"] {
  min-height: 46px;
  padding: 4px;
}

input::placeholder,
textarea::placeholder {
  color: #8ea1b8;
}

/* =========================
   LANDING PAGE
========================= */

.landing-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 48px;
  min-height: calc(100vh - 90px);
  display: flex;
  align-items: center;
}

.landing-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(59,130,246,0.24), transparent 30%),
    radial-gradient(circle at 85% 25%, rgba(249,115,22,0.20), transparent 28%),
    linear-gradient(135deg, #081120 0%, #0f172a 45%, #111827 100%);
  z-index: 0;
}

.landing-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.03), rgba(255,255,255,0)),
    repeating-linear-gradient(
      90deg,
      rgba(255,255,255,0.02) 0,
      rgba(255,255,255,0.02) 1px,
      transparent 1px,
      transparent 80px
    );
  opacity: 0.45;
  z-index: 1;
}

.landing-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}

.hero-copy {
  max-width: 640px;
}

.hero-badge,
.section-tag,
.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: #dbeafe;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.landing-hero h1,
.hero-card h1 {
  margin: 0 0 18px;
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.hero-lead,
.hero-card p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #cbd5e1;
  max-width: 600px;
  margin-bottom: 28px;
}

.hero-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.mini-stat {
  padding: 16px;
  border-radius: 18px;
  backdrop-filter: blur(8px);
}

.mini-stat strong {
  display: block;
  font-size: 15px;
  margin-bottom: 6px;
  color: #fff;
}

.mini-stat span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.hero-visual {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.visual-card {
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 24px 80px rgba(0,0,0,0.35);
}

.visual-main {
  width: 100%;
  max-width: 560px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  backdrop-filter: blur(12px);
}

.visual-topbar {
  display: flex;
  gap: 8px;
  padding: 6px 4px 14px;
}

.visual-topbar .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.visual-topbar .blue { background: #3b82f6; }
.visual-topbar .orange { background: #f97316; }
.visual-topbar .green { background: #22c55e; }

.pitch-preview {
  position: relative;
}

.pitch-glow {
  position: absolute;
  inset: 12% 8%;
  background: radial-gradient(circle, rgba(34,197,94,0.22), transparent 60%);
  filter: blur(34px);
  z-index: 0;
}

.pitch-frame {
  position: relative;
  z-index: 1;
  padding: 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, #0b1220, #101827);
  border: 1px solid rgba(255,255,255,0.06);
}

.ad-strip {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  padding: 10px 12px;
  border-radius: 12px;
  color: #e2e8f0;
  background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
  border: 1px solid rgba(255,255,255,0.08);
}

.ad-top {
  margin-bottom: 14px;
}

.ad-bottom {
  margin-top: 14px;
}

.mini-pitch {
  position: relative;
  height: 300px;
  border-radius: 26px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.01)),
    linear-gradient(180deg, #11853e 0%, #0f6f35 100%);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 25px 30px rgba(255,255,255,0.08), inset 0 -30px 50px rgba(0,0,0,0.18);
}

.mini-pitch::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(255,255,255,0.04) 0,
    rgba(255,255,255,0.04) 56px,
    rgba(255,255,255,0.01) 56px,
    rgba(255,255,255,0.01) 112px
  );
}

.mini-line.vertical-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  background: rgba(255,255,255,0.9);
  box-shadow: 0 0 12px rgba(255,255,255,0.18);
}

.mini-goal {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 100px;
  transform: translateY(-50%);
  border-radius: 8px;
  box-shadow: 0 0 16px rgba(0,0,0,0.25);
}

.left-goal {
  left: 0;
  background: linear-gradient(180deg, #60a5fa, #2563eb);
}

.right-goal {
  right: 0;
  background: linear-gradient(180deg, #fb923c, #ea580c);
}

.mini-disc,
.mini-ball {
  position: absolute;
  border-radius: 50%;
}

.mini-disc {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255,255,255,0.85);
  box-shadow:
    inset 0 4px 6px rgba(255,255,255,0.28),
    0 10px 18px rgba(0,0,0,0.25);
}

.mini-disc.blue {
  background: radial-gradient(circle at 30% 30%, #93c5fd, #2563eb 70%);
}

.mini-disc.orange {
  background: radial-gradient(circle at 30% 30%, #fdba74, #ea580c 70%);
}

.mini-ball {
  width: 16px;
  height: 16px;
  background: radial-gradient(circle at 35% 35%, #ffffff, #dbeafe 70%);
  border: 2px solid rgba(15,23,42,0.18);
  box-shadow: 0 8px 16px rgba(0,0,0,0.22);
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.d1 { left: 15%; top: 45%; }
.d2 { left: 26%; top: 26%; }
.d3 { left: 28%; top: 67%; }
.d4 { right: 15%; top: 45%; }
.d5 { right: 26%; top: 26%; }
.d6 { right: 28%; top: 67%; }

.visual-floating {
  position: absolute;
  padding: 14px 18px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  color: #fff;
  font-weight: 700;
  border-radius: 18px;
}

.floating-one {
  top: 8%;
  right: 0;
}

.floating-two {
  bottom: 8%;
  left: 0;
}

.landing-section {
  padding: 72px 0;
}

.alt-section {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.04));
  border-top: 1px solid rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 36px;
  text-align: center;
}

.section-heading h2 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.feature-grid,
.hero-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.feature-card,
.info-card {
  padding: 24px;
  border-radius: 22px;
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 22px;
  margin-bottom: 16px;
  background: rgba(255,255,255,0.08);
}

.feature-card h3,
.info-card h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.feature-card p,
.info-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 24px;
  align-items: center;
}

.showcase-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(1.8rem, 3vw, 3rem);
}

.showcase-copy p {
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 20px;
}

.showcase-list {
  margin: 0 0 24px;
  padding-left: 18px;
  color: #e2e8f0;
  line-height: 1.8;
}

.showcase-panel {
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.showcase-box {
  width: 100%;
  min-height: 260px;
  padding: 24px;
  border-radius: 28px;
  background:
    radial-gradient(circle at top left, rgba(59,130,246,0.22), transparent 30%),
    radial-gradient(circle at bottom right, rgba(249,115,22,0.18), transparent 30%),
    linear-gradient(135deg, #0f172a, #111827);
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  gap: 14px;
}

.showcase-pill {
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  font-weight: 700;
}

/* =========================
   PLAY PAGE
========================= */

.play-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 18px;
}

.board-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.canvas-wrap {
  padding: 16px;
}

canvas {
  width: 100%;
  height: auto;
  display: block;
  background: #0b5c2b;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.08);
}

.side-card {
  padding: 18px;
  display: grid;
  gap: 16px;
}

.score-row-box {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  text-align: center;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.score {
  font-size: 34px;
  font-weight: 800;
}

.vs {
  align-self: center;
  color: var(--muted);
  font-weight: 800;
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pill {
  padding: 12px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.pill label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}

.turn-box,
.status-box {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
}

.turn-box {
  background: rgba(34,197,94,0.08);
}

.status-box {
  background: rgba(255,255,255,0.03);
  line-height: 1.5;
}

.control-stack {
  display: grid;
  gap: 10px;
}

/* =========================
   PROFILE / TABLE
========================= */

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: #fff;
}

td {
  color: #d6dfeb;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 1100px) {
  .landing-hero-inner,
  .showcase-grid {
    grid-template-columns: 1fr 1fr;
  }

  .feature-grid,
  .hero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-visual {
    min-height: 500px;
  }
}

@media (max-width: 980px) {
  .play-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .header-shell,
  .header-inner {
    min-height: 74px;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 14px;
    background: rgba(15,23,42,0.96);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.28);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    width: 100%;
  }

  .brand-subtext {
    display: none;
  }

  .landing-hero {
    padding: 52px 0 36px;
    min-height: auto;
  }

  .landing-hero-inner,
  .showcase-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    max-width: 100%;
  }

  .hero-mini-stats,
  .feature-grid,
  .hero-grid,
  .grid-two {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: auto;
  }

  .visual-main {
    max-width: 100%;
  }

  .floating-one,
  .floating-two {
    position: static;
    margin-top: 12px;
  }

  .board-top {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .container,
  .landing-container {
    width: min(100% - 20px, 1280px);
  }

  .landing-hero h1,
  .hero-card h1 {
    font-size: 2.1rem;
  }

  .hero-actions,
  .btn-row,
  .mode-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn,
  .btn-row .btn,
  .mode-buttons .btn {
    width: 100%;
  }

  .mini-pitch {
    height: 220px;
  }

  .feature-card,
  .mini-stat,
  .showcase-box,
  .auth-card,
  .profile-card,
  .hero-card {
    padding: 18px;
  }

  .canvas-wrap {
    padding: 10px;
  }
}