:root {
  --bg: #070711;
  --panel: #151526;
  --panel-2: #10101d;
  --line: rgba(255,255,255,.08);
  --text: #efeff9;
  --muted: #9b98b6;
  --pink: #ff2f86;
  --pink-2: #ff5a4a;
  --purple: #8738ff;
  --yellow: #ffde44;
  --green: #36f386;
  --field: #159451;
  --field-dark: #0d7f45;
  --field-light: #1aa45d;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 78% 9%, rgba(120, 45, 255, .16), transparent 32rem),
    radial-gradient(circle at 20% 90%, rgba(20, 60, 150, .12), transparent 34rem),
    var(--bg);
  overflow-x: hidden;
}

button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.app-shell { min-height: 100vh; position: relative; }
.top-glow {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(142,77,255,.75), rgba(255,47,134,.75), transparent);
  pointer-events: none;
}

.app-header {
  height: 76px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 9, 20, .68);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand-mini { display: flex; align-items: center; gap: 12px; color: var(--muted); text-decoration: none; }
.brand-mini strong { display: block; color: var(--text); letter-spacing: .02em; }
.brand-mini span { font-size: 13px; }
.brand-logo-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,.35));
}
.game-brand .brand-logo-img { width: 104px; height: 70px; }
.mini-ball {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: #141426;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.header-actions { display: flex; align-items: center; gap: 12px; }
.support-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  border: 1px solid rgba(46, 166, 255, .34);
  border-radius: 999px;
  padding: 11px 17px;
  color: #eef9ff;
  font-weight: 1000;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(42, 171, 238, .96), rgba(0, 119, 181, .78));
  box-shadow: 0 14px 36px rgba(42, 171, 238, .22), inset 0 1px 0 rgba(255,255,255,.28);
  transition: transform .18s ease, border-color .18s ease, filter .18s ease, box-shadow .18s ease;
}
.support-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(154, 221, 255, .72);
  filter: brightness(1.08);
  box-shadow: 0 18px 42px rgba(42, 171, 238, .30), inset 0 1px 0 rgba(255,255,255,.36);
}
.support-btn-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: currentColor;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.25));
}
.round-pill {
  border: 0;
  border-radius: 999px;
  padding: 13px 20px;
  background: rgba(255,47,134,.20);
  color: var(--text);
  font-weight: 850;
}
.icon-btn {
  width: 42px; height: 42px;
  border-radius: 13px;
  border: 1px solid rgba(255,255,255,.06);
  background: #151526;
  color: #c8c5dc;
  font-size: 18px;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.icon-btn:hover { transform: translateY(-1px); border-color: rgba(255,255,255,.16); background: #1b1b30; }

.screen { width: 100%; }
.start-screen {
  min-height: calc(100vh - 76px);
  display: grid;
  place-items: center;
  padding: 42px 20px 70px;
}
.hero-card {
  width: min(980px, 100%);
  text-align: center;
  padding: 20px;
}
.logo-mark { display: inline-grid; place-items: center; margin-bottom: 18px; position: relative; }
.logo-ball {
  width: 92px; height: 92px; display: grid; place-items: center;
  font-size: 45px; border-radius: 50%;
  background: #111827;
  box-shadow: 0 0 0 5px #e73845, 0 22px 60px rgba(0,0,0,.42);
}
.logo-score {
  margin-top: -38px;
  padding: 5px 14px 6px;
  font-size: 34px;
  line-height: 1;
  font-weight: 1000;
  letter-spacing: -0.08em;
  color: #fff4df;
  text-shadow: 0 3px 0 #162032;
}
.logo-ribbon {
  margin-top: 4px;
  padding: 5px 18px;
  border-radius: 4px;
  border: 3px solid #e73845;
  background: #111827;
  font-weight: 1000;
  font-size: 13px;
  color: #fff4df;
}
.hero-card h1 { margin: 0; font-size: clamp(42px, 6vw, 64px); line-height: 1; letter-spacing: -.055em; }
.hero-card > p { margin: 18px auto 36px; max-width: 760px; color: var(--muted); font-size: clamp(18px, 2vw, 24px); line-height: 1.45; }
.mode-row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; margin: 0 auto 34px; max-width: 950px; }
.mode-row.single-mode { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
.mode-card {
  text-align: left;
  min-height: 138px;
  border-radius: 22px;
  padding: 26px 30px;
  background: rgba(22,22,39,.88);
  border: 2px solid rgba(255,255,255,.08);
  box-shadow: 0 24px 90px rgba(0,0,0,.28);
}
.mode-card.active { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255,47,134,.18), 0 24px 90px rgba(0,0,0,.28); }
.mode-card h3 { margin: 0 0 12px; font-size: 27px; }
.mode-card p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 18px; }
.formation-title { color: var(--yellow); font-weight: 1000; letter-spacing: .28em; margin-bottom: 20px; text-transform: uppercase; }
.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 0;
  min-width: 164px;
  border-radius: 15px;
  padding: 16px 28px;
  color: white;
  font-weight: 1000;
  letter-spacing: .05em;
  background: linear-gradient(135deg, var(--pink), var(--pink-2));
  box-shadow: 0 16px 46px rgba(255,47,134,.28), inset 0 1px 0 rgba(255,255,255,.23);
  transition: transform .18s ease, filter .18s ease, opacity .18s ease;
}
.primary-btn.big { min-width: 350px; padding: 22px 36px; font-size: 25px; border-radius: 18px; background: linear-gradient(135deg, var(--pink), #9238ff); }
.primary-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.primary-btn:active { transform: translateY(0); }
.primary-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.start-hero-layout {
  width: min(1680px, 100%);
  display: grid;
  grid-template-columns: minmax(580px, 1fr) minmax(360px, 440px);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.start-hero-layout .hero-card { justify-self: center; }
.home-leaderboards {
  display: grid;
  gap: 18px;
  width: 100%;
  position: sticky;
  top: 104px;
}
.home-feed-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 24px;
  padding: 22px;
  text-align: left;
  background:
    radial-gradient(circle at 100% 0%, rgba(255,222,68,.14), transparent 34%),
    linear-gradient(145deg, rgba(31, 25, 54, .92), rgba(10, 10, 21, .88));
  box-shadow: 0 28px 80px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.08);
}
.home-feed-card.live-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(54,243,134,.11), transparent 34%),
    linear-gradient(145deg, rgba(22, 25, 49, .92), rgba(10, 10, 21, .88));
}
.home-feed-kicker {
  color: var(--yellow);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.home-feed-card h2 {
  margin: 8px 0 6px;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1;
  letter-spacing: -.045em;
}
.home-feed-subtitle {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.35;
}
.home-feed-list {
  display: grid;
  gap: 9px;
}
.home-feed-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 15px;
  background: rgba(255,255,255,.035);
}
.home-feed-player,
.home-feed-result {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.home-feed-player strong,
.home-feed-result strong {
  overflow: hidden;
  color: #fff;
  font-size: 16px;
  font-weight: 1000;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-feed-result { text-align: right; }
.home-feed-result strong { color: var(--yellow); }
.home-feed-player span,
.home-feed-result span,
.home-feed-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.home-feed-empty {
  padding: 18px 12px;
  border: 1px dashed rgba(255,255,255,.14);
  border-radius: 15px;
  text-align: center;
}

.about-inner {
  width: min(980px, 100%);
  margin-top: 36px;
  padding: clamp(26px, 4vw, 42px);
  text-align: left;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255,47,134,.10), transparent 36%),
    rgba(21,21,38,.86);
  box-shadow: 0 28px 90px rgba(0,0,0,.34);
}
.about-inner h2,
.about-inner h3 {
  color: var(--text);
  line-height: 1.1;
}
.about-inner h2 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -.04em;
}
.about-inner h3 {
  margin: 30px 0 12px;
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: -.025em;
}
.about-inner p,
.about-inner li,
.faq-a {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}
.about-inner p { margin: 0; }
.about-inner strong { color: var(--text); }
.about-inner ol,
.about-inner ul {
  margin: 0;
  padding-left: 24px;
}
.about-inner li + li { margin-top: 10px; }
.faq {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.faq-q {
  padding: 16px 18px 0;
  border-top: 1px solid rgba(255,255,255,.08);
  color: var(--yellow);
  font-weight: 1000;
}
.faq-a {
  padding: 0 18px 14px;
}

.game-screen { padding: 34px min(4vw, 48px) 50px; }
.game-grid {
  display: grid;
  grid-template-columns: minmax(430px, 710px) minmax(500px, 650px);
  gap: clamp(38px, 6vw, 110px);
  justify-content: center;
  align-items: start;
}
.game-grid.flipped { grid-template-columns: minmax(500px, 650px) minmax(430px, 710px); }
.game-grid.flipped .control-panel { order: 2; }
.game-grid.flipped .pitch-wrap { order: 1; }
.control-panel { min-width: 0; }
.draw-card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
.draw-top { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.draw-stat {
  width: 145px; height: 102px;
  border-radius: 15px;
  display: grid; place-items: center;
  background: linear-gradient(180deg, rgba(26,26,45,.72), rgba(16,16,30,.86));
  box-shadow: 0 24px 64px rgba(0,0,0,.33);
}
.draw-stat span { font-size: 12px; font-weight: 1000; letter-spacing: .12em; }
.draw-stat strong { font-size: 37px; line-height: .86; letter-spacing: -.07em; }
.neon-pink { border: 2px solid var(--pink); box-shadow: 0 0 26px rgba(255,47,134,.32); }
.neon-pink span { color: var(--pink); }
.neon-purple { border: 2px solid var(--purple); box-shadow: 0 0 26px rgba(135,56,255,.32); }
.neon-purple span { color: #9e5dff; }
.hint { width: min(380px, 100%); color: var(--muted); text-align: center; line-height: 1.35; margin: 0; }

.players-card, .finished-card {
  background: rgba(21,21,38,.96);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 26px 80px rgba(0,0,0,.38);
}
.players-head {
  min-height: 78px;
  padding: 16px 20px;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  background: #19192b;
  border-bottom: 1px solid var(--line);
}
.players-head h2 { margin: 0; font-size: 22px; }
.players-head span { color: var(--pink); font-weight: 850; }
.players-head input {
  width: 190px;
  border: 1px solid rgba(255,255,255,.08);
  background: #0c0c17;
  color: var(--text);
  padding: 12px 14px;
  border-radius: 10px;
  outline: none;
}
.players-head input:focus { border-color: rgba(255,47,134,.8); box-shadow: 0 0 0 3px rgba(255,47,134,.13); }
.draft-info {
  padding: 14px 20px;
  color: var(--yellow);
  font-weight: 1000;
  border-bottom: 1px solid var(--line);
}
.stat-head {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) repeat(7, 42px);
  gap: 6px;
  align-items: center;
  padding: 0 20px;
  height: 34px;
  color: #9c99b7;
  font-weight: 900;
  font-size: 12px;
  border-bottom: 1px solid var(--line);
}
.stat-head span:not(:first-child) { text-align: center; }
.players-list {
  max-height: 572px;
  overflow: auto;
  scrollbar-color: #303047 transparent;
  scrollbar-width: thin;
}
.player-row {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) repeat(7, 42px);
  gap: 6px;
  align-items: center;
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.045);
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 0 20px;
  transition: background .14s ease, box-shadow .14s ease;
}
.player-row:hover { background: rgba(255,255,255,.035); }
.player-row.selected { background: rgba(255,47,134,.2); box-shadow: inset 4px 0 0 var(--pink); }
.player-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.shirt {
  width: 40px; height: 40px;
  flex: 0 0 40px;
  display: grid; place-items: end center;
  color: var(--shirt-number-color, #192247);
  font-weight: 1000;
  font-size: 13px;
  line-height: 1;
  letter-spacing: -.03em;
  background:
    radial-gradient(circle at 50% 9%, rgba(255,255,255,.35) 0 7%, transparent 8%),
    linear-gradient(135deg, rgba(255,255,255,.18), transparent 34%),
    var(--shirt-color, #fff);
  clip-path: polygon(18% 10%, 33% 0, 67% 0, 82% 10%, 100% 24%, 87% 40%, 79% 34%, 79% 100%, 21% 100%, 21% 34%, 13% 40%, 0 24%);
  padding-bottom: 6px;
  overflow: hidden;
}
.player-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 18px; font-weight: 900; }
.player-meta { color: #9c99b7; font-size: 13px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pos-badge { background: #2c2c45; color: #dbd8ed; padding: 2px 7px; border-radius: 6px; font-weight: 900; font-size: 12px; }
.player-row .num { text-align: center; color: #d4d1e4; font-weight: 850; }
.player-row .ovr { color: var(--green); font-size: 20px; font-weight: 1000; }

.pitch-wrap { display: grid; place-items: center; gap: 14px; position: sticky; top: 104px; }
.pitch {
  width: min(650px, 42vw);
  min-width: 520px;
  aspect-ratio: 2 / 2.48;
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: var(--field);
  border: 2px solid rgba(255,255,255,.18);
  box-shadow: 0 26px 76px rgba(0,0,0,.42);
}
.stripe { position: absolute; inset-inline: 0; height: calc(100% / 6); }
.s1 { top: 0; background: var(--field); }
.s2 { top: calc(100% / 6); background: var(--field-light); opacity: .78; }
.s3 { top: calc(100% / 3); background: var(--field-dark); opacity: .64; }
.s4 { top: 50%; background: var(--field-light); opacity: .72; }
.s5 { top: calc(100% * 2 / 3); background: var(--field-dark); opacity: .75; }
.s6 { top: calc(100% * 5 / 6); background: var(--field-light); opacity: .62; }
.line, .circle, .box, .dot { position: absolute; pointer-events: none; }
.line { background: rgba(255,255,255,.36); }
.half { left: 0; right: 0; top: 50%; height: 2px; transform: translateY(-50%); }
.center-circle { width: 25%; aspect-ratio: 1; border: 2px solid rgba(255,255,255,.32); border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.box { left: 25%; right: 25%; border: 2px solid rgba(255,255,255,.36); }
.penalty.top { top: -1px; height: 14%; border-top: 0; }
.six.top { top: -1px; height: 0%; display:none; }
.penalty.bottom { bottom: -1px; height: 14%; border-bottom: 0; }
.six.bottom { bottom: -1px; height: 0%; display:none; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.48); left: 50%; transform: translateX(-50%); }
.top-dot { top: 10.4%; }
.bottom-dot { bottom: 10.4%; }
.slot {
  position: absolute;
  width: 60px;
  min-height: 54px;
  padding: 7px 5px;
  transform: translate(-50%, -50%);
  border-radius: 14px;
  border: 2px dashed rgba(255,255,255,.42);
  background: rgba(4, 63, 34, .2);
  color: #f0f4ed;
  font-weight: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.slot span { pointer-events: none; }
.slot:hover { transform: translate(-50%, -50%) scale(1.04); }
.slot.highlight {
  border-style: solid;
  border-color: var(--yellow);
  background: rgba(255,222,68,.16);
  box-shadow: 0 0 0 5px rgba(255,222,68,.12), 0 0 36px rgba(255,222,68,.55);
}
.slot.filled {
  width: 82px;
  min-height: 76px;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.slot.filled:hover { transform: translate(-50%, -50%); }
.slot.filled .placed-shirt-wrap { position: relative; display: grid; place-items: center; }
.slot.filled .shirt { width: 52px; height: 52px; font-size: 16px; filter: drop-shadow(0 8px 16px rgba(0,0,0,.35)); }
.slot.filled .rating-bubble {
  position: absolute;
  right: -8px; top: -4px;
  width: 24px; height: 24px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: #ffd849;
  color: #111827;
  font-weight: 1000;
  font-size: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,.28);
}
.slot.filled .placed-name {
  color: #fff;
  text-shadow: 0 2px 5px rgba(0,0,0,.6);
  font-weight: 850;
  font-size: 12px;
  max-width: 92px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.slot.filled .placed-pos { display: none; }

[data-slot="st"] { left: 50%; top: 13%; }
[data-slot="lw"] { left: 18%; top: 20%; }
[data-slot="rw"] { left: 82%; top: 20%; }
[data-slot="cm-left"] { left: 26%; top: 51%; }
[data-slot="cm-mid"] { left: 50%; top: 45%; }
[data-slot="cm-right"] { left: 74%; top: 51%; }
[data-slot="lb"] { left: 16%; top: 69%; }
[data-slot="cb-left"] { left: 40%; top: 72%; }
[data-slot="cb-right"] { left: 60%; top: 72%; }
[data-slot="rb"] { left: 84%; top: 69%; }
[data-slot="gk"] { left: 50%; top: 88%; }
.formation-pill {
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 999px;
  padding: 5px 18px;
  color: #9f9bb9;
  font-weight: 900;
  letter-spacing: .18em;
  background: rgba(10,10,19,.65);
}
.finished-card {
  padding: clamp(24px, 4vw, 38px);
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(135,56,255,.18), transparent 16rem),
    rgba(21,21,38,.96);
}
.finish-logo {
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
}
.finish-logo img {
  width: min(170px, 56vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 16px 34px rgba(0,0,0,.48));
}
.finished-card h2 {
  max-width: 520px;
  margin: 0 auto 10px;
  font-size: clamp(27px, 4vw, 34px);
  line-height: 1.12;
  letter-spacing: -.04em;
}
.finished-card > p {
  color: var(--muted);
  margin: 0 0 24px;
  font-weight: 850;
}
.projected-record-card {
  margin: 0 auto 24px;
  padding: clamp(20px, 4vw, 28px);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 24px;
  background: rgba(16,16,31,.92);
  box-shadow: 0 28px 80px rgba(0,0,0,.36), inset 0 1px 0 rgba(255,255,255,.08);
}
.projected-kicker {
  color: #9d9abc;
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: .28em;
  text-transform: uppercase;
}
.projected-record {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: clamp(8px, 2vw, 16px);
  margin: 12px 0 8px;
  font-weight: 1000;
  line-height: .9;
}
.projected-record strong {
  font-size: clamp(52px, 10vw, 76px);
  letter-spacing: -.08em;
}
.projected-record span {
  color: #777491;
  font-size: clamp(40px, 8vw, 62px);
  font-weight: 1000;
}
.record-win { color: var(--green); }
.record-draw { color: #a8a5c1; }
.record-loss { color: var(--pink); }
.projected-record-card p {
  margin: 0 0 16px;
  color: #b8b4ce;
  font-weight: 900;
}
.season-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(100%, 240px);
  border-radius: 999px;
  padding: 11px 22px;
  color: #1a0c13;
  font-weight: 1000;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ff5573, #9f2748);
  box-shadow: 0 14px 34px rgba(255,47,134,.24), inset 0 1px 0 rgba(255,255,255,.32);
}
.season-badge[data-tier="mid"] { background: linear-gradient(135deg, #ffde44, #ff8d3a); }
.season-badge[data-tier="europe"] { background: linear-gradient(135deg, #36f386, #1ebdff); }
.season-badge[data-tier="title"],
.season-badge[data-tier="perfect"] { background: linear-gradient(135deg, #ffef6a, #36f386); }
.empty-state { padding: 28px 20px; color: var(--muted); text-align: center; }

@media (max-width: 1180px) {
  .start-hero-layout { grid-template-columns: 1fr; }
  .home-leaderboards { width: min(760px, 100%); margin-inline: auto; position: static; }
  .game-grid, .game-grid.flipped { grid-template-columns: 1fr; gap: 34px; }
  .game-grid.flipped .control-panel, .game-grid.flipped .pitch-wrap { order: initial; }
  .pitch-wrap { position: static; }
  .pitch { width: min(650px, 94vw); min-width: 0; }
  .control-panel { width: min(760px, 100%); margin-inline: auto; }
}
@media (max-width: 720px) {
  .app-header { padding: 0 12px; height: 68px; }
  .brand-mini span { display: none; }
  .brand-mini strong { display: none; }
  .brand-logo-img { width: 48px; height: 48px; }
  .game-brand .brand-logo-img { width: 78px; height: 56px; }
  .mode-row { grid-template-columns: 1fr; }
  .start-screen { padding-inline: 12px; }
  .start-hero-layout { grid-template-columns: minmax(0, 1fr); }
  .home-feed-card { padding: 18px; border-radius: 20px; }
  .home-feed-row { grid-template-columns: 1fr; gap: 7px; }
  .home-feed-result { text-align: left; }
  .primary-btn.big { min-width: 0; width: 100%; }
  .game-screen { padding: 18px 10px 36px; }
  .players-head { align-items: stretch; flex-direction: column; }
  .players-head input { width: 100%; }
  .stat-head, .player-row { grid-template-columns: minmax(180px, 1fr) repeat(7, 34px); padding-inline: 10px; gap: 3px; }
  .player-name { font-size: 15px; }
  .player-meta { font-size: 11px; }
  .draw-stat { width: 132px; }
  .pitch { width: 96vw; border-radius: 14px; }
  .slot { width: 50px; min-height: 47px; font-size: 12px; border-radius: 12px; }
  .slot.filled .shirt { width: 45px; height: 45px; }
  .slot.filled .placed-name { font-size: 10px; max-width: 72px; }
}

.leaderboard-btn {
  border: 1px solid rgba(255,222,68,.28);
  border-radius: 999px;
  padding: 12px 18px;
  color: #fff8d9;
  font-weight: 1000;
  background: linear-gradient(135deg, rgba(255,222,68,.18), rgba(255,47,134,.18));
  box-shadow: 0 12px 34px rgba(255,222,68,.12), inset 0 1px 0 rgba(255,255,255,.18);
  transition: transform .18s ease, border-color .18s ease, filter .18s ease;
}
.leaderboard-btn:hover { transform: translateY(-1px); border-color: rgba(255,222,68,.58); filter: brightness(1.08); }
.logo-mark img {
  width: min(600px, 90vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 24px 52px rgba(0,0,0,.46));
}
.slot > span:first-child {
  display: inline-block;
  transform: scaleY(1.32);
  letter-spacing: .02em;
  line-height: 1.25;
}
.slot.filled > span:first-child { transform: none; }
.finish-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}
.finished-card .share-btn,
.secondary-finish-btn {
  min-width: min(100%, 210px);
  border-radius: 15px;
  padding: 16px 24px;
  color: #fff;
  font-weight: 1000;
  letter-spacing: .02em;
  text-transform: none;
}
.finished-card .share-btn {
  background: linear-gradient(135deg, var(--pink), #9238ff);
  box-shadow: 0 18px 48px rgba(255,47,134,.28), inset 0 1px 0 rgba(255,255,255,.23);
}
.secondary-finish-btn {
  border: 1px solid rgba(255,255,255,.08);
  background: #1b1b30;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
  cursor: pointer;
  transition: transform .18s ease, filter .18s ease, border-color .18s ease;
}
.secondary-finish-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.18);
  filter: brightness(1.08);
}
.share-btn {
  position: relative;
  isolation: isolate;
  min-width: min(100%, 330px);
  border: 0;
  border-radius: 18px;
  padding: 18px 30px;
  color: #14100a;
  font-weight: 1000;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ffef6a, #ffb52e 38%, #ff2f86 100%);
  box-shadow: 0 18px 48px rgba(255,181,46,.32), 0 0 0 6px rgba(255,222,68,.10), inset 0 1px 0 rgba(255,255,255,.45);
  animation: sharePulse 1.65s ease-in-out infinite;
  overflow: hidden;
}
.share-btn::after {
  content: "";
  position: absolute;
  inset: -45% auto -45% -30%;
  width: 38%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.72), transparent);
  animation: shareShine 2.2s ease-in-out infinite;
  z-index: -1;
}
.share-btn:hover { transform: translateY(-2px) scale(1.02); filter: brightness(1.08); }
.share-status {
  min-height: 20px;
  margin: 14px 0 0 !important;
  color: var(--yellow) !important;
  font-weight: 900;
}
@keyframes sharePulse {
  0%, 100% { box-shadow: 0 18px 48px rgba(255,181,46,.32), 0 0 0 6px rgba(255,222,68,.10), inset 0 1px 0 rgba(255,255,255,.45); }
  50% { box-shadow: 0 22px 62px rgba(255,47,134,.40), 0 0 0 10px rgba(255,222,68,.18), inset 0 1px 0 rgba(255,255,255,.55); }
}
@keyframes shareShine {
  0% { left: -40%; }
  55%, 100% { left: 125%; }
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3,3,10,.76);
  backdrop-filter: blur(10px);
}
.modal-card {
  width: min(560px, 100%);
  position: relative;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 26px;
  padding: clamp(24px, 4vw, 36px);
  background:
    radial-gradient(circle at 86% 0%, rgba(255,47,134,.22), transparent 17rem),
    linear-gradient(145deg, rgba(30,30,52,.98), rgba(13,13,25,.98));
  box-shadow: 0 34px 100px rgba(0,0,0,.58);
}
.modal-kicker {
  color: var(--yellow);
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 12px;
  margin-bottom: 10px;
}
.modal-card h2 { margin: 0 0 10px; font-size: clamp(30px, 4vw, 42px); letter-spacing: -.04em; }
.modal-card p { margin: 0 0 22px; color: var(--muted); line-height: 1.5; }
.modal-card label { display: block; margin-bottom: 8px; color: #dcd9ee; font-weight: 900; }
.modal-card input {
  width: 100%;
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: 15px 16px;
  color: var(--text);
  background: rgba(7,7,17,.82);
  outline: none;
}
.modal-card input:focus { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(255,47,134,.14); }
.form-error { min-height: 20px; margin: 0 0 16px !important; color: #ff8398 !important; font-weight: 850; }
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  color: #fff;
  background: rgba(255,255,255,.08);
  font-size: 28px;
  line-height: 1;
}
.leaderboard-card { width: min(760px, 100%); }
.leaderboard-card code { color: #fff; background: rgba(255,255,255,.08); padding: 2px 6px; border-radius: 6px; }
.leaderboard-table-wrap { overflow: auto; border: 1px solid rgba(255,255,255,.08); border-radius: 16px; }
.leaderboard-table { width: 100%; border-collapse: collapse; min-width: 520px; }
.leaderboard-table th,
.leaderboard-table td { padding: 15px 16px; border-bottom: 1px solid rgba(255,255,255,.07); text-align: left; }
.leaderboard-table th { color: #a9a6c0; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.leaderboard-table td { font-weight: 850; }
.leaderboard-table tr:last-child td { border-bottom: 0; }
.leaderboard-rank { color: var(--yellow); font-weight: 1000; }
.leaderboard-empty { text-align: center !important; color: var(--muted); padding: 28px 16px !important; }
@media (max-width: 720px) {
  .header-actions { gap: 8px; }
  .support-btn, .leaderboard-btn { padding: 10px 12px; font-size: 12px; }
  .support-btn { gap: 7px; }
  .support-btn-icon { width: 16px; height: 16px; }
  .finish-actions { display: grid; justify-items: stretch; }
  .share-btn, .secondary-finish-btn { min-width: 0; width: 100%; }
}

.share-page-body {
  min-height: 100vh;
  overflow-x: hidden;
}
.share-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(24px, 5vw, 64px) 18px;
}
.share-result-card {
  width: min(760px, 100%);
  position: relative;
  overflow: hidden;
  text-align: center;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 34px;
  padding: clamp(28px, 5vw, 54px);
  background:
    radial-gradient(circle at 50% 0%, rgba(255,222,68,.20), transparent 18rem),
    radial-gradient(circle at 90% 18%, rgba(255,47,134,.22), transparent 16rem),
    linear-gradient(145deg, rgba(30,30,52,.96), rgba(10,10,20,.98));
  box-shadow: 0 36px 120px rgba(0,0,0,.58);
}
.share-page-logo {
  display: inline-grid;
  place-items: center;
  margin-bottom: 18px;
}
.share-page-logo img {
  width: min(310px, 72vw);
  height: auto;
  filter: drop-shadow(0 18px 42px rgba(0,0,0,.42));
}
.share-result-card h1 {
  margin: 0 auto 24px;
  max-width: 620px;
  font-size: clamp(36px, 7vw, 68px);
  line-height: .96;
  letter-spacing: -.06em;
}
.share-player-card,
.share-score-card {
  width: min(440px, 100%);
  margin-inline: auto;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 24px;
  background: rgba(7,7,17,.54);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10);
}
.share-player-card {
  display: grid;
  gap: 4px;
  padding: 16px 20px;
  margin-bottom: 14px;
}
.share-player-card span,
.share-score-card span,
.share-score-card em {
  color: var(--muted);
  font-size: 13px;
  font-weight: 1000;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.share-player-card strong {
  color: #fff;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.1;
}
.share-score-card {
  display: grid;
  gap: 3px;
  padding: 22px 20px;
  margin-bottom: 20px;
}
.share-score-card strong {
  color: var(--yellow);
  font-size: clamp(72px, 18vw, 132px);
  line-height: .82;
  letter-spacing: -.08em;
  text-shadow: 0 8px 0 rgba(255,47,134,.28), 0 24px 70px rgba(255,222,68,.24);
}
.share-challenge-text {
  width: min(620px, 100%);
  margin: 0 auto 24px;
  color: #f6f3ff;
  font-size: clamp(18px, 3vw, 24px);
  line-height: 1.45;
  font-weight: 850;
}
.share-page-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: min(620px, 100%);
  margin: 0 auto;
}
.share-page-native-btn {
  min-width: 0;
  width: 100%;
  animation-duration: 2.2s;
}
.share-back-link {
  display: inline-block;
  margin-top: 22px;
  color: var(--muted);
  font-weight: 850;
  text-decoration: none;
}
.share-back-link:hover { color: #fff; }
.confetti-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.confetti-piece {
  position: absolute;
  top: -18px;
  left: var(--x);
  width: 9px;
  height: 16px;
  border-radius: 3px;
  background: var(--color);
  opacity: .92;
  animation: confettiFall var(--duration) linear var(--delay) infinite;
}
@keyframes confettiFall {
  0% { transform: translate3d(0, -20px, 0) rotate(0deg); opacity: 0; }
  10% { opacity: .95; }
  100% { transform: translate3d(42px, 112vh, 0) rotate(var(--rotate)); opacity: 0; }
}
@media (max-width: 640px) {
  .share-page-actions { grid-template-columns: 1fr; }
  .share-result-card { border-radius: 24px; }
}

.formation-grid {
  width: min(900px, 100%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 auto 28px;
}
.formation-card {
  min-height: 64px;
  border: 2px solid rgba(160, 157, 205, .22);
  border-radius: 13px;
  color: #f4f3ff;
  font-weight: 1000;
  font-size: 22px;
  letter-spacing: .04em;
  background: rgba(18,18,34,.82);
  text-shadow: 0 3px 0 rgba(28,54,104,.75);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.formation-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255,222,68,.44);
  background: rgba(28,28,50,.92);
}
.formation-card.active {
  border-color: var(--yellow);
  color: #fff;
  background: linear-gradient(135deg, rgba(255,222,68,.20), rgba(255,47,134,.18));
  box-shadow: 0 0 0 4px rgba(255,222,68,.12), 0 18px 44px rgba(0,0,0,.28);
}
@media (max-width: 820px) {
  .formation-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .formation-grid { grid-template-columns: 1fr; }
}
