/* FOOTBALL LIFE — UI (mobile-first, iPhone) */
:root {
  --bg: #070b14; --bg2: #0d1424; --card: #121b2e; --card2: #18233a; --line: #22304c;
  --tx: #e9eef8; --tx2: #9aa8c2; --tx3: #6b7a96;
  --gold: #e3b341; --gold2: #f5d77a; --gold-d: rgba(227, 179, 65, .14);
  --green: #3ccf7a; --red: #f0545c; --blue: #4f9cf9; --orange: #f39c3d; --purple: #a77bf3;
  --r: 14px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  --nav-h: 62px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--tx); font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; min-height: 100dvh; overscroll-behavior-y: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--gold); }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--tx2); } .dim { color: var(--tx3); } .gold { color: var(--gold); } .pos { color: var(--green); } .neg { color: var(--red); }
.small { font-size: 12.5px; } .tiny { font-size: 11px; } .b { font-weight: 700; } .c { text-align: center; } .r { text-align: right; }

/* ---------- shell ---------- */
#app { min-height: 100vh; min-height: 100dvh; }
.top { position: sticky; top: 0; z-index: 30; background: rgba(7, 11, 20, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); padding: calc(var(--safe-t) + 8px) 16px 8px; display: flex; align-items: center; gap: 10px; }
.top .t1 { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .t2 { font-size: 12px; color: var(--tx2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .grow { flex: 1; min-width: 0; }
.top .cash { text-align: right; font-size: 13px; font-weight: 700; color: var(--gold); white-space: nowrap; }
.main { padding: 14px 16px calc(var(--nav-h) + var(--safe-b) + 24px); max-width: 860px; margin: 0 auto; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(10, 15, 27, .96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); display: flex; padding-bottom: var(--safe-b); }
.nav button { flex: 1; height: var(--nav-h); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--tx3); font-size: 10.5px; font-weight: 600; }
.nav button svg { width: 23px; height: 23px; }
.nav button.on { color: var(--gold); }
.side { display: none; }
@media (min-width: 900px) {
  .nav { display: none; }
  .side { display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; width: 220px; background: var(--bg2); border-right: 1px solid var(--line); padding: 18px 10px; gap: 2px; z-index: 40; }
  .side .logo { padding: 4px 10px 18px; }
  .side button { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: var(--tx2); font-weight: 600; text-align: left; }
  .side button svg { width: 20px; height: 20px; }
  .side button.on { background: var(--gold-d); color: var(--gold); }
  .side button:hover:not(.on) { background: var(--card); }
  .top, .main { margin-left: 220px; }
  .main { padding-bottom: 40px; }
}

/* ---------- cards & layout ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 12px; }
.card.pad0 { padding: 0; overflow: hidden; }
.card h3 { font-size: 15px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.card h3 .sp { flex: 1; }
.sec-t { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--tx3); font-weight: 700; margin: 18px 2px 8px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.sb { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 640px) { .grid-auto { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .grid-auto > .card { margin-bottom: 0; } .grid-auto { margin-bottom: 12px; } }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--tx2); }
.stat { background: var(--card2); border-radius: 12px; padding: 10px; text-align: center; }
.stat .v { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 11px; color: var(--tx2); margin-top: 2px; }
.list-i { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-i:last-child { border-bottom: 0; }
.empty { text-align: center; color: var(--tx3); padding: 18px 8px; font-size: 14px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 11px 16px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line); font-weight: 650; font-size: 14px; color: var(--tx); min-height: 44px; transition: transform .08s, background .15s; }
.btn:active { transform: scale(.97); }
.btn.gold { background: linear-gradient(180deg, var(--gold2), var(--gold)); color: #1a1405; border-color: transparent; }
.btn.red { background: rgba(240, 84, 92, .14); color: var(--red); border-color: rgba(240, 84, 92, .3); }
.btn.green { background: rgba(60, 207, 122, .14); color: var(--green); border-color: rgba(60, 207, 122, .3); }
.btn.sm { padding: 7px 11px; min-height: 34px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; pointer-events: none; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.adv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.adv .btn { flex-direction: column; gap: 2px; padding: 10px 6px; font-size: 13px; }
.adv .btn small { font-size: 10.5px; color: var(--tx2); font-weight: 500; }
.adv .btn.gold small { color: #4a3a0c; }
.adv .main-b { grid-column: span 3; flex-direction: row; font-size: 16px; min-height: 54px; }

/* ---------- tabs / chips ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px 2px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; padding: 8px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--tx2); font-weight: 650; font-size: 13.5px; white-space: nowrap; }
.tabs button.on { background: var(--gold); color: #1a1405; border-color: var(--gold); }
.seg { display: flex; background: var(--card2); border-radius: 11px; padding: 3px; gap: 3px; }
.seg button { flex: 1; padding: 8px 4px; border-radius: 9px; font-size: 13px; font-weight: 650; color: var(--tx2); }
.seg button.on { background: var(--gold); color: #1a1405; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); font-size: 12px; font-weight: 650; color: var(--tx2); white-space: nowrap; }
.chip.gold { background: var(--gold-d); color: var(--gold); border-color: rgba(227, 179, 65, .35); }
.chip.green { background: rgba(60, 207, 122, .12); color: var(--green); border-color: rgba(60, 207, 122, .3); }
.chip.red { background: rgba(240, 84, 92, .12); color: var(--red); border-color: rgba(240, 84, 92, .3); }
.chip.blue { background: rgba(79, 156, 249, .12); color: var(--blue); border-color: rgba(79, 156, 249, .3); }
.res { display: inline-flex; width: 22px; height: 22px; border-radius: 6px; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: #fff; }
.res.W { background: var(--green); } .res.D { background: #6b7a96; } .res.L { background: var(--red); }

/* ---------- bars ---------- */
.bar { height: 7px; background: var(--card2); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--gold); }
.meter { margin-bottom: 10px; }
.meter .row { font-size: 13px; margin-bottom: 5px; }
.attr { display: grid; grid-template-columns: 1fr 34px; gap: 4px 10px; align-items: center; padding: 5px 0; font-size: 13.5px; }
.attr .bar { grid-column: 1 / -1; height: 5px; }
.attr.key .n { color: var(--gold2); font-weight: 650; }
.ov { display: inline-flex; min-width: 30px; height: 24px; padding: 0 5px; border-radius: 7px; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: #0a0f1a; font-variant-numeric: tabular-nums; }

/* ---------- player card ---------- */
.pcard { background: radial-gradient(120% 140% at 100% 0%, rgba(227, 179, 65, .22), transparent 55%), linear-gradient(160deg, #182543, #0f1729 70%); border: 1px solid rgba(227, 179, 65, .3); border-radius: 18px; padding: 16px; margin-bottom: 12px; position: relative; overflow: hidden; }
.pcard .top-r { display: flex; gap: 14px; align-items: center; }
.pcard .big { font-size: 46px; font-weight: 900; line-height: 1; color: var(--gold2); font-variant-numeric: tabular-nums; }
.pcard .nm { font-size: 20px; font-weight: 800; }
.pcard .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.avatar { width: 74px; height: 74px; flex: none; }
.crest { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; align-items: center; justify-content: center; font-size: 9.5px; font-weight: 800; flex: none; border: 2px solid; letter-spacing: -.02em; }
.crest.lg { width: 44px; height: 44px; font-size: 13px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }

/* ---------- tables ---------- */
.tbl-w { overflow-x: auto; margin: 0 -14px; padding: 0 14px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tbl th { text-align: right; color: var(--tx3); font-weight: 650; font-size: 11.5px; padding: 6px 5px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { text-align: right; padding: 7px 5px; border-bottom: 1px solid rgba(34, 48, 76, .6); white-space: nowrap; }
.tbl th.l, .tbl td.l { text-align: left; }
.tbl td.nm { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.tbl tr.me td { background: var(--gold-d); color: var(--gold2); font-weight: 700; }
.tbl tr.z1 td:first-child { box-shadow: inset 3px 0 var(--blue); }
.tbl tr.z2 td:first-child { box-shadow: inset 3px 0 var(--orange); }
.tbl tr.z3 td:first-child { box-shadow: inset 3px 0 var(--green); }
.tbl tr.zr td:first-child { box-shadow: inset 3px 0 var(--red); }
.tbl tr.click { cursor: pointer; }

/* ---------- forms ---------- */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12.5px; color: var(--tx2); margin-bottom: 5px; font-weight: 600; }
.inp, select.inp { width: 100%; background: var(--bg2); border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; font-size: 16px; min-height: 44px; outline: none; -webkit-appearance: none; appearance: none; }
select.inp { background-image: linear-gradient(45deg, transparent 50%, var(--tx2) 50%), linear-gradient(135deg, var(--tx2) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
.inp:focus { border-color: var(--gold); }
input[type=range] { width: 100%; accent-color: var(--gold); }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opts button { padding: 8px 12px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--tx2); }
.opts button.on { border-color: var(--gold); color: var(--gold); background: var(--gold-d); }
.opts.col button { text-align: left; width: 100%; }
.opts.col button small { display: block; font-weight: 500; color: var(--tx3); font-size: 12px; margin-top: 2px; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid transparent; padding: 0 !important; }
.swatch.on { border-color: var(--gold) !important; box-shadow: 0 0 0 2px var(--bg) inset; }
.tgl { position: relative; width: 50px; height: 30px; flex: none; }
.tgl input { opacity: 0; width: 0; height: 0; position: absolute; }
.tgl i { position: absolute; inset: 0; border-radius: 99px; background: var(--card2); border: 1px solid var(--line); transition: .2s; }
.tgl i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--tx2); transition: .2s; }
.tgl input:checked + i { background: var(--gold); border-color: var(--gold); }
.tgl input:checked + i::after { left: 23px; background: #1a1405; }

/* ---------- modal / sheet ---------- */
.ov-bg { position: fixed; inset: 0; z-index: 100; background: rgba(2, 5, 12, .72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; animation: fade .18s; }
.sheet { background: var(--bg2); border: 1px solid var(--line); border-bottom: 0; width: 100%; max-width: 620px; max-height: 92vh; max-height: 92dvh; overflow-y: auto; border-radius: 22px 22px 0 0; padding: 8px 16px calc(var(--safe-b) + 18px); animation: up .24s cubic-bezier(.2, .9, .3, 1); -webkit-overflow-scrolling: touch; }
.sheet .grab { width: 40px; height: 5px; background: var(--line); border-radius: 9px; margin: 4px auto 12px; }
.sheet h2 { font-size: 19px; margin-bottom: 4px; }
@media (min-width: 700px) { .ov-bg { align-items: center; } .sheet { border-radius: 20px; border-bottom: 1px solid var(--line); padding-bottom: 18px; } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--safe-b) + 14px); z-index: 200; background: #1d2a45; border: 1px solid var(--line); padding: 11px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); max-width: calc(100% - 32px); animation: up .2s; }
.toast.err { border-color: rgba(240, 84, 92, .5); color: #ffb3b7; }
.loading { position: fixed; inset: 0; z-index: 150; background: rgba(2, 5, 12, .6); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 14px; font-weight: 600; }
.spin { width: 38px; height: 38px; border: 3px solid var(--line); border-top-color: var(--gold); border-radius: 50%; animation: rot .8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------- match ---------- */
.score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 10px 0 14px; }
.score .tm { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; font-weight: 700; font-size: 14px; }
.score .sc { font-size: 38px; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.cmp { margin: 8px 0; }
.cmp .row { font-size: 13px; margin-bottom: 4px; }
.cmp .dbar { display: flex; height: 6px; border-radius: 9px; overflow: hidden; background: var(--card2); gap: 2px; }
.cmp .dbar i { display: block; height: 100%; }
.ev { display: flex; gap: 10px; padding: 7px 0; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.ev .m { width: 30px; color: var(--tx3); font-weight: 700; text-align: right; flex: none; }
.ev.u { color: var(--gold2); }
.rating { display: inline-flex; min-width: 38px; height: 26px; border-radius: 8px; align-items: center; justify-content: center; font-weight: 800; color: #0a0f1a; padding: 0 6px; font-variant-numeric: tabular-nums; }
.moment { text-align: center; padding: 10px 0 6px; }
.moment .big { font-size: 22px; font-weight: 800; margin: 6px 0 4px; }
.tbar { position: relative; height: 54px; border-radius: 14px; background: linear-gradient(90deg, #3a1d24, #2a2230 30%, #2a2230 70%, #3a1d24); border: 1px solid var(--line); margin: 18px 0; overflow: hidden; }
.tbar .gz { position: absolute; top: 0; bottom: 0; background: rgba(60, 207, 122, .35); }
.tbar .pz { position: absolute; top: 0; bottom: 0; background: rgba(245, 215, 122, .85); }
.tbar .nd { position: absolute; top: -4px; bottom: -4px; width: 4px; margin-left: -2px; background: #fff; border-radius: 3px; box-shadow: 0 0 10px #fff; }
.hit { font-size: 20px; font-weight: 900; min-height: 30px; }

/* ---------- start / create ---------- */
.hero { text-align: center; padding: calc(var(--safe-t) + 34px) 16px 18px; }
.logo-t { font-size: 30px; font-weight: 900; letter-spacing: .04em; }
.logo-t b { color: var(--gold); }
.logo-s { font-size: 12px; letter-spacing: .3em; color: var(--tx3); margin-top: 4px; font-weight: 700; }
.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px calc(var(--safe-b) + 30px); }
.slot { display: flex; align-items: center; gap: 12px; }
.steps { display: flex; gap: 6px; margin: 4px 0 16px; }
.steps i { flex: 1; height: 4px; border-radius: 9px; background: var(--line); }
.steps i.on { background: var(--gold); }
.news-i { padding: 11px 0; border-bottom: 1px solid var(--line); }
.news-i:last-child { border-bottom: 0; }
.news-i .t { font-weight: 650; font-size: 14.5px; }
.news-i.u .t { color: var(--gold2); }
.news-i .b2 { font-size: 13px; color: var(--tx2); margin-top: 2px; }
.news-i .d { font-size: 11.5px; color: var(--tx3); margin-top: 4px; display: flex; gap: 6px; align-items: center; }
svg.chart { width: 100%; height: auto; display: block; }
.legend { display: flex; gap: 12px; font-size: 12px; color: var(--tx2); margin-top: 6px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }
.alert { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 13px; margin-bottom: 10px; background: var(--gold-d); border: 1px solid rgba(227, 179, 65, .35); font-size: 14px; font-weight: 600; width: 100%; text-align: left; color: var(--tx); }
.alert.red { background: rgba(240, 84, 92, .1); border-color: rgba(240, 84, 92, .35); }
.alert.blue { background: rgba(79, 156, 249, .1); border-color: rgba(79, 156, 249, .35); }
.alert .grow { min-width: 0; }
.alert svg { width: 20px; height: 20px; flex: none; }
.btn svg, .alert svg { width: 18px; height: 18px; flex: none; }
.adv .main-b svg { width: 22px; height: 22px; }
.dim { opacity: .55; }
