/* ============ FONTS ============ */
@font-face { font-family: 'PARI'; src: url('/fonts/PARIFont-57Extrabold.ttf') format('truetype'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'HeadingNow'; src: url('/fonts/Heading-Now-65-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'HeadingNow'; src: url('/fonts/Heading-Now-64-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Descriptor'; src: url('/fonts/DescriptorFont-v2Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/Inter-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

/* ============ TOKENS ============ */
:root {
  --bg:        #ffffff;   /* plain canvas */
  --ink:       #0a0a14;
  --ink-dim:   #1a3540;
  --ink-soft:  #3a5560;
  --neon:      #d8ff3a;
  --purple:    #6b30c8;
  --purple-2:  #8b5cf6;
  --purple-deep:#3d1a78;
  --teal:      #2dd4bf;
  --teal-deep: #14b8a6;
  --cyan:      #00d4ff;
  --pink:      #ff3cad;
  --danger:    #ff4760;
}

/* ============ RESET ============ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  background: var(--bg);
  color: var(--ink); font-family: 'Inter', system-ui, sans-serif; min-height: 100%; overflow-x: hidden;
}
body { min-height: 100%; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: none; }
input, textarea { font: inherit; color: inherit; }

/* ============ CUSTOM CURSOR ============ */
html, body, * { cursor: none !important; }
.cursor-hand {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 99999;
  width: 36px; height: 36px;
  margin-left: -7px; margin-top: -3px;
  transition: transform .15s cubic-bezier(.2,.9,.3,1.3), filter .15s;
  transform: rotate(-12deg);
  filter: drop-shadow(0 4px 10px rgba(0,180,220,0.55));
  will-change: top, left;
}
.cursor-hand svg { width: 100%; height: 100%; display: block; }
.cursor-hand.hover { transform: rotate(-18deg) scale(1.2); filter: drop-shadow(0 6px 14px rgba(0,212,255,0.8)) brightness(1.05); }
.cursor-hand.click { transform: rotate(-8deg) scale(0.85); }

/* ============ BACKGROUND ============ */
body::after {
  content: ''; position: fixed; inset: -80px; z-index: -8; pointer-events: none;
  background-image:
    linear-gradient(rgba(10,30,40,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10,30,40,0.08) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px;
  animation: gridSlide 28s linear infinite;
  opacity: 0.7;
}
@keyframes gridSlide { 0% { transform: translate(0,0); } 100% { transform: translate(64px, 64px); } }

/* Ghost watermark */
.ghost-text {
  position: fixed; left: 50%; top: 40%;
  transform: translate(-50%, -50%);
  font-family: 'PARI'; font-size: clamp(220px, 30vw, 460px);
  letter-spacing: -10px; line-height: 0.85;
  color: rgba(10,30,40,0.04);
  text-transform: uppercase;
  pointer-events: none; z-index: -7;
  white-space: nowrap;
  user-select: none;
}

/* === DECORATION HOST === */
.deco-layer { position: fixed; inset: 0; pointer-events: none; z-index: -5; overflow: hidden; }

.deco {
  position: absolute;
  pointer-events: none;
  animation: floatDrift var(--dur, 8s) ease-in-out infinite;
  animation-delay: var(--del, 0s);
  transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
  --tx: 0px; --ty: 0px;
}
@keyframes floatDrift {
  0%, 100% { transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) translateY(0) translateX(0) scale(1); }
  50%      { transform: translate(-50%, -50%) rotate(calc(var(--rot, 0deg) + 4deg)) translateY(-18px) translateX(6px) scale(1.03); }
}

/* Blob — soft colored cloud */
.deco.blob {
  border-radius: 50%;
  filter: blur(var(--bl, 110px));
}

/* Bubble — liquid glass circle with optional inner image */
.deco.bubble {
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.22) 45%, rgba(20,200,180,0.1) 100%);
  backdrop-filter: blur(var(--bl, 20px)) saturate(1.6);
  -webkit-backdrop-filter: blur(var(--bl, 20px)) saturate(1.6);
  border: 1.5px solid rgba(255,255,255,0.7);
  box-shadow:
    0 16px 36px rgba(20,80,90,0.18),
    inset 0 1px 1px rgba(255,255,255,0.85),
    inset 0 -1px 2px rgba(20,80,90,0.06);
  overflow: hidden;
}
.deco.bubble img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.deco.bubble::after {
  content: ''; position: absolute; top: 8%; left: 12%;
  width: 35%; height: 25%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.85), transparent 70%);
  border-radius: 50%;
  z-index: 2;
}
.deco.bubble.empty::before {
  content: ''; position: absolute; inset: 22%;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.45), rgba(255,255,255,0.05));
}

/* Flying logo */
.deco.flying-logo {
  filter: drop-shadow(0 8px 18px rgba(20,80,90,0.25));
}
.deco.flying-logo img { width: 100%; display: block; }

/* Hero logo decoration — big EZ Turbo logo */
.deco.hero-logo-deco {
  filter: drop-shadow(0 24px 50px rgba(20,80,90,0.3));
  animation: floatDrift var(--dur, 6s) ease-in-out infinite;
}
.deco.hero-logo-deco img { width: 100%; display: block; }

/* Shape — colored block */
.deco.shape { filter: blur(var(--bl, 0px)); }
.deco.shape[data-form="circle"]  { border-radius: 50%; }
.deco.shape[data-form="square"]  { border-radius: 4px; }
.deco.shape[data-form="rounded"] { border-radius: 16px; }

@media (max-width: 1100px) {
  .deco-layer { display: none; }
  .ghost-text { font-size: clamp(120px, 30vw, 240px); opacity: 0.5; }
}

/* ============ TOP BAR ============ */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 32px;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.25));
  border-bottom: 1px solid rgba(10,10,20,0.05);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand-logo { width: 50px; height: 50px; display: grid; place-items: center; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 2px 6px rgba(20,80,90,0.25)); }
.brand-text { font-family: 'PARI'; font-size: 22px; letter-spacing: -0.5px; }

.login-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 20px;
  background: rgba(10,10,20,0.06);
  border: 1px solid rgba(10,10,20,0.1);
  border-radius: 999px;
  font-family: 'PARI'; font-size: 14px; letter-spacing: 1px;
  backdrop-filter: blur(8px);
  transition: all .2s;
  color: var(--ink);
}
.login-btn:hover { background: var(--ink); color: var(--neon); border-color: var(--ink); }
.login-btn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.login-btn:hover .dot { background: var(--neon); box-shadow: 0 0 8px var(--neon); }
.login-btn.logged-in { background: var(--ink); color: var(--neon); border-color: var(--ink); }
.login-btn.logged-in .dot { background: var(--neon); box-shadow: 0 0 8px var(--neon); }

/* ============ HERO ============ */
.hero {
  padding: 150px 36px 70px;
  text-align: center;
  position: relative;
  z-index: 2;
  overflow: hidden;
}
.hero h1 {
  font-family: 'PARI'; font-size: clamp(58px, 11vw, 170px);
  line-height: 0.88; letter-spacing: -3px;
  text-transform: uppercase;
  color: var(--ink);
  position: relative; z-index: 2;
}
.hero h1 .stripe-bg {
  position: relative;
  display: inline-block;
  padding: 0 16px;
  background: var(--neon);
  transform: skewX(-8deg);
  box-shadow: 7px 7px 0 var(--ink);
}
.hero h1 .stripe-bg > span { display: inline-block; transform: skewX(8deg); }
.hero h1 .purple { color: var(--purple); }

/* ============ SECTION HEADER ============ */
.section { padding: 50px 36px; max-width: 1400px; margin: 0 auto; position: relative; z-index: 2; }
.section-title-wrap {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  margin-bottom: 40px;
  border-bottom: 2.5px solid var(--ink);
  padding-bottom: 18px;
}
.section-title {
  font-family: 'PARI'; font-size: clamp(42px, 7vw, 90px);
  text-transform: uppercase; letter-spacing: -2px;
  color: var(--ink);
}
.section-title .accent {
  display: inline-block;
  background: var(--neon);
  padding: 0 8px;
  transform: skewX(-8deg);
}
.section-title .accent > span { display: inline-block; transform: skewX(8deg); }
.section-meta { font-family: 'Descriptor'; font-size: 12px; letter-spacing: 3px; color: var(--ink-dim); white-space: nowrap; }

/* ============ TEAMS GRID (unchanged) ============ */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

.team-card {
  position: relative;
  background: linear-gradient(180deg, #1a1428, #0e0a18);
  border-radius: 18px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(139,92,246,0.18);
  transition: transform .25s, border-color .25s, box-shadow .25s;
  box-shadow: 0 14px 36px rgba(20,40,60,0.18);
}
.team-card:hover { border-color: rgba(216,255,58,0.5); box-shadow: 0 18px 44px rgba(20,40,60,0.28); transform: translateY(-3px); }
.team-card::before {
  content: '';
  position: absolute; top: 0; right: 0; width: 140px; height: 100%;
  background-image: repeating-linear-gradient(-45deg, transparent 0 12px, rgba(216,255,58,0.07) 12px 24px);
  pointer-events: none;
}

.team-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; position: relative; z-index: 2; }
.team-logo {
  width: 56px; height: 56px; border-radius: 12px;
  background: linear-gradient(135deg, var(--purple-deep), var(--purple-2));
  display: grid; place-items: center; flex-shrink: 0;
  font-family: 'PARI'; font-size: 22px;
  border: 1px solid rgba(255,255,255,0.1);
  overflow: hidden; color: #fff;
}
.team-logo img { width: 100%; height: 100%; object-fit: cover; }
.team-meta { flex: 1; min-width: 0; }
.team-eyebrow { font-family: 'Descriptor'; font-size: 10px; letter-spacing: 3px; color: var(--neon); }
.team-name { font-family: 'PARI'; font-size: 26px; text-transform: uppercase; letter-spacing: -0.5px; line-height: 1; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #fff; }

.player-row { position: relative; margin-bottom: 10px; padding: 0; }
.player-row.clickable { cursor: none; }
.player-row.clickable:hover .pill { background: #7c3edd; }
.player-row::after {
  content: ''; position: absolute; left: 6px; right: -6px; bottom: -4px; height: 100%;
  background: var(--teal); transform: skewX(-12deg); border-radius: 4px; z-index: 0; opacity: 0.85;
}
.player-row .pill {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 12px;
  background: var(--purple); transform: skewX(-12deg);
  padding: 12px 16px; border-radius: 4px; transition: background .2s;
}
.player-row .pill > * { transform: skewX(12deg); }
.player-check {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.7); background: transparent;
  flex-shrink: 0; display: grid; place-items: center; transition: all .2s;
}
.player-check.hidden { visibility: hidden; }
.player-check.selected { background: var(--neon); border-color: var(--neon); box-shadow: 0 0 16px rgba(216,255,58,0.7); }
.player-check.selected::after { content: '✓'; color: #000; font-size: 14px; font-weight: 900; }
.player-check.disabled { opacity: 0.3; }
.player-name { font-family: 'PARI'; font-size: 18px; text-transform: uppercase; letter-spacing: -0.3px; color: var(--teal); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-rating { font-family: 'Descriptor'; font-size: 14px; color: #fff; padding: 3px 10px; background: rgba(0,0,0,0.25); border-radius: 4px; flex-shrink: 0; }

/* ============ SELECTION BAR ============ */
.selection-bar {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(150%);
  z-index: 60;
  display: flex; align-items: center; gap: 20px;
  padding: 14px 22px;
  background: var(--ink); border: 2px solid var(--neon); border-radius: 999px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25), 0 0 30px rgba(216,255,58,0.25);
  transition: transform .35s cubic-bezier(.2,.9,.3,1.3);
  max-width: 92vw;
}
.selection-bar.visible { transform: translateX(-50%) translateY(0); }
.selection-info { font-family: 'Inter'; font-weight: 600; font-size: 13px; color: #fff; white-space: nowrap; }
.selection-info b { color: var(--neon); font-family: 'PARI'; font-size: 18px; margin-right: 4px; }
.selection-chips { display: flex; gap: 6px; flex-wrap: wrap; max-width: 50vw; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: rgba(216,255,58,0.15); border: 1px solid rgba(216,255,58,0.4); border-radius: 999px; font-size: 12px; color: var(--neon); font-family: 'PARI'; letter-spacing: 0.5px; }
.chip .x { opacity: 0.7; }
.chip .x:hover { opacity: 1; color: var(--danger); }
.submit-btn { padding: 10px 24px; background: var(--neon); color: var(--ink); border-radius: 999px; font-family: 'PARI'; font-size: 14px; letter-spacing: 1.5px; text-transform: uppercase; transition: transform .15s, box-shadow .15s; }
.submit-btn:hover { transform: scale(1.04); box-shadow: 0 0 25px rgba(216,255,58,0.7); }
.submit-btn:disabled { opacity: 0.4; }

/* ============ FAQ ============ */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: rgba(255,255,255,0.7);
  border: 1.5px solid rgba(10,10,20,0.1);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .2s, background .2s, box-shadow .25s;
  backdrop-filter: blur(10px);
}
.faq-item:hover { border-color: rgba(10,10,20,0.25); background: rgba(255,255,255,0.85); }
.faq-item.open { background: #ffffff; border-color: var(--ink); box-shadow: 0 12px 30px rgba(20,40,50,0.12); }
.faq-q { width: 100%; text-align: left; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 24px; font-family: 'HeadingNow'; font-weight: 500; font-size: 17px; color: var(--ink); transition: color .2s; }
.faq-q .plus { font-family: 'PARI'; color: var(--purple); font-size: 22px; transition: transform .25s, color .2s; }
.faq-item.open .plus { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s; font-family: 'Inter'; color: var(--ink-dim); line-height: 1.6; font-size: 15px; }
.faq-a-inner { padding: 0 24px 22px; }
.faq-item.open .faq-a { max-height: 600px; }

/* ============ FOOTER ============ */
.footer {
  padding: 60px 36px 40px;
  text-align: center;
  border-top: 1px solid rgba(10,10,20,0.1);
  color: var(--ink-dim);
  font-size: 13px;
  margin-top: 40px;
  position: relative; z-index: 2;
}

/* ============ MODAL ============ */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20,40,50,0.55);
  backdrop-filter: blur(10px);
  display: grid; place-items: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }

.modal {
  position: relative;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 20px;
  padding: 36px 32px;
  max-width: 440px; width: 100%;
  transform: scale(0.95); transition: transform .25s;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.3);
}
.modal-backdrop.open .modal { transform: scale(1); }
.modal::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 8px;
  background: linear-gradient(90deg, var(--purple-2), var(--neon), var(--teal));
}
.modal h2 { font-family: 'PARI'; font-size: 28px; text-transform: uppercase; line-height: 1.05; margin-bottom: 18px; color: var(--ink); }
.modal p { color: var(--ink-dim); margin-bottom: 22px; line-height: 1.5; font-size: 15px; }
.modal label { display: block; font-family: 'Descriptor'; font-size: 11px; letter-spacing: 2px; color: var(--ink-soft); margin-bottom: 6px; text-transform: uppercase; }
.modal input[type="text"], .modal input[type="password"] {
  width: 100%; padding: 14px 16px;
  background: #f5f5f8;
  border: 1.5px solid rgba(10,10,20,0.12);
  border-radius: 10px;
  font-family: 'Inter'; font-size: 15px;
  margin-bottom: 16px;
  transition: border-color .2s;
  color: var(--ink);
}
.modal input:focus { outline: none; border-color: var(--ink); background: #fff; }
.modal-actions { display: flex; gap: 10px; margin-top: 14px; }
.btn { flex: 1; padding: 14px 18px; border-radius: 10px; font-family: 'PARI'; font-size: 14px; letter-spacing: 1.5px; text-transform: uppercase; transition: all .2s; }
.btn-primary { background: var(--ink); color: var(--neon); }
.btn-primary:hover { background: var(--neon); color: var(--ink); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(216,255,58,0.5); }
.btn-ghost { background: #f0f0f4; color: var(--ink); border: 1.5px solid rgba(10,10,20,0.1); }
.btn-ghost:hover { background: #e0e0e8; }
.btn-danger { background: var(--danger); color: #fff; }
.modal-error { color: var(--danger); font-size: 13px; margin-bottom: 12px; min-height: 18px; }
.modal-close { position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; border-radius: 50%; background: #f0f0f4; display: grid; place-items: center; font-size: 16px; color: var(--ink); transition: background .2s, color .2s; z-index: 2; }
.modal-close:hover { background: var(--danger); color: #fff; }

.modal.welcome { max-width: 560px; text-align: center; padding: 40px 40px 44px; }
.modal.welcome .welcome-logo {
  width: 130px; height: 130px;
  margin: 0 auto 14px;
  display: grid; place-items: center;
}
.modal.welcome .welcome-logo img { width: 100%; height: 100%; object-fit: contain; }
.modal.welcome h2 { font-size: 30px; line-height: 1.1; }
.modal.welcome .purple { color: var(--purple); }
.modal.welcome p { font-size: 16px; }

.confirm-list { background: #fafffe; border: 1.5px solid var(--teal); border-radius: 10px; padding: 14px 16px; margin: 14px 0; }
.confirm-list .player { font-family: 'PARI'; color: var(--ink); padding: 4px 0; display: flex; justify-content: space-between; }
.confirm-list .player span:last-child { color: var(--ink-soft); font-family: 'Inter'; font-size: 13px; }

/* ============ TOAST ============ */
.toast {
  position: fixed; top: 90px; right: 24px; z-index: 300;
  padding: 14px 20px;
  background: var(--ink); color: var(--neon);
  border: 2px solid var(--neon); border-radius: 12px;
  font-size: 14px; font-family: 'Inter'; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  transform: translateX(120%); transition: transform .3s;
  max-width: 320px;
}
.toast.show { transform: translateX(0); }
.toast.error { border-color: var(--danger); color: var(--danger); }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  /* Hide all decorations on smaller screens for clean mobile */
  .deco-layer { display: none; }
  .ghost-text { display: none; }
}

@media (max-width: 720px) {
  .topbar { padding: 12px 14px; }
  .brand-text { font-size: 17px; }
  .brand-logo { width: 38px; height: 38px; }
  .login-btn { padding: 9px 14px; font-size: 12px; }
  .hero { padding: 100px 16px 40px; }
  .hero h1 { font-size: clamp(40px, 14vw, 80px); letter-spacing: -2px; }
  .hero h1 .stripe-bg { box-shadow: 4px 4px 0 var(--ink); padding: 0 10px; }
  .section { padding: 36px 16px; }
  .section-title { font-size: clamp(32px, 12vw, 60px); }
  .section-meta { font-size: 10px; }
  .teams-grid { grid-template-columns: 1fr; gap: 16px; }
  .team-card { padding: 18px; }
  .team-name { font-size: 22px; }
  .selection-bar { flex-direction: column; padding: 14px 18px; border-radius: 18px; gap: 12px; }
  .selection-chips { max-width: 100%; justify-content: center; }
  .ghost-text { display: none; }
  html, body, * { cursor: auto !important; }
  .cursor-hand { display: none; }
  button { cursor: pointer; }
  .chip .x { cursor: pointer; }
  .faq-q { padding: 16px 18px; font-size: 15px; }
  .modal { padding: 28px 22px; }
  .modal h2 { font-size: 22px; }
  .modal.welcome h2 { font-size: 24px; }
  .modal.welcome .welcome-logo { width: 100px; height: 100px; }
}
