:root{
  --bg0:#0b0f15;
  --bg1:#111722;
  --bg2:#172030;

  --text:#f3f6ff;
  --muted:rgba(243,246,255,.62);

  --line:#000;
  --lineSoft:rgba(255,255,255,.08);

  --blue1:#83a0ff;
  --blue2:#526cf0;

  --gold1:#f8e8b2;
  --gold2:#e0c26f;
  --gold3:#b78f46;

  --good:#37df88;
  --bad:#ff7e95;

  --cardA:rgba(255,255,255,.06);
  --cardB:rgba(255,255,255,.024);

  --shadow-xl:0 36px 84px rgba(0,0,0,.52);
  --shadow-lg:0 20px 44px rgba(0,0,0,.40);
  --shadow-md:0 12px 26px rgba(0,0,0,.28);
}

*{box-sizing:border-box}
html,body{height:100%}

html{
  width:100%;
  overflow-x:hidden;
  -webkit-text-size-adjust:100%;
}

body{
  margin:0;
  min-height:100%;
  overflow-x:hidden;
  font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 820px at 16% 0%, rgba(67,99,255,.10), transparent 54%),
    radial-gradient(1000px 720px at 100% 100%, rgba(40,190,255,.06), transparent 50%),
    linear-gradient(180deg, var(--bg0), var(--bg1) 44%, var(--bg2));
}

.bg{
  position:fixed;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(900px 520px at 50% -10%, rgba(255,255,255,.02), transparent 60%),
    radial-gradient(1000px 720px at 50% 120%, rgba(255,255,255,.015), transparent 70%);
}

.noise{
  position:fixed;
  inset:0;
  pointer-events:none;
  opacity:.04;
  background-image:
    radial-gradient(1px 1px at 10% 18%, rgba(255,255,255,.24), transparent 60%),
    radial-gradient(1px 1px at 70% 32%, rgba(255,255,255,.18), transparent 60%),
    radial-gradient(1px 1px at 34% 76%, rgba(255,255,255,.15), transparent 60%);
}

a{color:inherit;text-decoration:none}
button,input{font:inherit}

.app{
  width:min(1180px, calc(100% - 16px));
  margin:8px auto 14px;
}

.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  min-height:68px;
  padding:10px 12px;
  border-radius:20px;
  border:1px solid var(--line);
  background:linear-gradient(180deg, rgba(27,36,50,.96), rgba(18,24,36,.96));
  box-shadow:var(--shadow-md), inset 0 1px 0 rgba(255,255,255,.05);
}

.topbar__left,
.topbar__right{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.backBtn{
  width:42px;
  height:42px;
  border-radius:13px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.05);
  display:grid;
  place-items:center;
  font-size:20px;
  font-weight:900;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
  flex:0 0 42px;
}

.brandRow{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.brandLogo{
  width:44px;
  height:44px;
  border-radius:14px;
  border:1px solid var(--line);
  background:linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:var(--shadow-md), inset 0 1px 0 rgba(255,255,255,.05);
  flex:0 0 44px;
}

.brandLogo svg{
  width:24px;
  height:24px;
  display:block;
}

.brandText{
  min-width:0;
}

.title{
  font-size:26px;
  line-height:1;
  font-weight:1000;
}

.subtitle{
  margin-top:4px;
  font-size:10px;
  font-weight:900;
  letter-spacing:1.6px;
  text-transform:uppercase;
  color:var(--muted);
  white-space:nowrap;
}

.pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:42px;
  padding:0 14px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.05);
  color:var(--text);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
}

.pill--balance{
  min-width:108px;
}

.dot{
  width:8px;
  height:8px;
  border-radius:99px;
  background:#26d47b;
  box-shadow:0 0 0 3px rgba(38,212,123,.14);
}

.layout{
  margin-top:10px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 330px;
  gap:10px;
  align-items:start;
}

.panel{
  min-width:0;
  border-radius:22px;
  border:1px solid var(--line);
  background:linear-gradient(180deg, var(--cardA), var(--cardB));
  box-shadow:var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,.04);
  padding:12px;
}

.panel--game{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.statsRow{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:8px;
}

.statCard{
  border-radius:16px;
  border:1px solid rgba(0,0,0,.92);
  background:rgba(255,255,255,.04);
  padding:10px 12px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
  min-width:0;
}

.k{
  font-size:11px;
  color:var(--muted);
  font-weight:800;
}

.v{
  margin-top:5px;
  font-size:16px;
  line-height:1.15;
  font-weight:1000;
  word-break:break-word;
}

.goalWrap{
  border-radius:18px;
  border:1px solid rgba(0,0,0,.92);
  background:rgba(255,255,255,.04);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
  padding:10px;
}

.goalTop{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  margin-bottom:8px;
}

.goalTop__right{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.h1{
  font-size:18px;
  line-height:1;
  font-weight:1000;
}

.h2{
  font-size:14px;
  line-height:1;
  font-weight:950;
}

.hint{
  margin-top:5px;
  color:var(--muted);
  font-size:12px;
  line-height:1.4;
}

.muted{
  color:var(--muted);
  font-size:11px;
  line-height:1.35;
}

.miniBadge{
  min-height:30px;
  padding:0 10px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.92);
  background:rgba(255,255,255,.05);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:11px;
  color:#eef3ff;
  font-weight:800;
}

.goalFrame{
  position:relative;
  overflow:hidden;
  height:330px;
  border-radius:18px;
  border:1px solid rgba(0,0,0,.92);
  background:
    radial-gradient(420px 180px at 50% 16%, rgba(131,160,255,.16), transparent 72%),
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.18));
  box-shadow:var(--shadow-md), inset 0 1px 0 rgba(255,255,255,.04);
}

.goalGlow{
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 50% 25%, rgba(255,255,255,.08), transparent 40%),
    radial-gradient(circle at 25% 30%, rgba(255,126,149,.05), transparent 32%),
    radial-gradient(circle at 75% 30%, rgba(131,160,255,.07), transparent 34%);
  pointer-events:none;
}

.goalNet{
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px) 0 0/24px 24px,
    linear-gradient(0deg, rgba(255,255,255,.08) 1px, transparent 1px) 0 0/24px 24px;
  opacity:.16;
  pointer-events:none;
}

.zones{
  position:absolute;
  left:12px;
  right:12px;
  top:12px;
  bottom:68px;
  display:grid;
  grid-template-columns:repeat(5, 1fr);
  grid-template-rows:repeat(3, 1fr);
  gap:8px;
}

.zone{
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.04);
  cursor:pointer;
  transition:transform .08s ease, filter .14s ease, border-color .14s ease, background .14s ease;
}

.zone:hover{
  filter:brightness(1.05);
}

.zone:active{
  transform:scale(.985);
}

.zone.disabled{
  opacity:.55;
  cursor:not-allowed;
}

.gloves{
  position:absolute;
  left:12px;
  right:12px;
  top:12px;
  bottom:68px;
  pointer-events:none;
}

.glove{
  position:absolute;
  width:44px;
  height:44px;
  border-radius:13px;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(255,255,255,.20);
  box-shadow:0 10px 22px rgba(0,0,0,.28);
}

.glove::after{
  content:"";
  position:absolute;
  inset:8px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,.10);
  opacity:.35;
}

.g1{ left:calc(50% - 50px); top:calc(50% - 24px); }
.g2{ left:calc(50% + 6px); top:calc(50% - 24px); }

.ball{
  position:absolute;
  left:50%;
  top:calc(100% - 28px);
  width:28px;
  height:28px;
  border-radius:99px;
  transform:translate(-50%, -50%);
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.96), rgba(255,255,255,.34) 35%, rgba(0,0,0,.16) 70%),
    radial-gradient(circle at 70% 70%, rgba(0,0,0,.25), transparent 55%);
  border:1px solid rgba(255,255,255,.18);
  box-shadow:0 12px 22px rgba(0,0,0,.24);
  will-change:transform;
}

.ball.shoot{
  transition:transform 260ms cubic-bezier(.2,.8,.2,1);
}

.msg{
  margin-top:8px;
  min-height:18px;
  font-size:12px;
  line-height:1.4;
  color:rgba(255,255,255,.86);
}

.panel--control{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.controlHead{
  margin-bottom:2px;
}

.sectionBlock{
  border-radius:18px;
  border:1px solid rgba(0,0,0,.92);
  background:rgba(255,255,255,.04);
  padding:10px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
}

.row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}

.lab{
  font-size:11px;
  color:var(--muted);
  font-weight:800;
}

.val{
  font-size:12px;
  font-weight:900;
  white-space:nowrap;
}

.diffRow{
  margin-top:8px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}

.seg{
  min-height:42px;
  padding:0 12px;
  border-radius:14px;
  border:1px solid rgba(0,0,0,.92);
  background:rgba(255,255,255,.05);
  color:var(--text);
  cursor:pointer;
  font-size:13px;
  font-weight:900;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
}

.seg.active{
  background:
    radial-gradient(180px 120px at 50% 15%, rgba(95,124,255,.18), transparent 70%),
    linear-gradient(180deg, rgba(95,124,255,.18), rgba(255,255,255,.04));
  box-shadow:0 12px 22px rgba(82,108,240,.14), inset 0 1px 0 rgba(255,255,255,.05);
}

.betRow{
  margin-top:8px;
  display:grid;
  grid-template-columns:40px minmax(0,1fr) 40px;
  gap:8px;
  align-items:center;
}

.btnSmall{
  height:40px;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.05);
  color:#fff;
  font-weight:950;
  font-size:18px;
  cursor:pointer;
}

.betInput{
  width:100%;
  min-width:0;
  height:40px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.92);
  background:rgba(255,255,255,.05);
  color:var(--text);
  font-weight:950;
  padding:0 12px;
  outline:none;
}

.chips{
  margin-top:8px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.chip{
  min-height:38px;
  padding:0 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.05);
  color:#fff;
  font-size:12px;
  font-weight:900;
  cursor:pointer;
}

.actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}

.btnPrimary,
.btnGhost,
.btnGhost2{
  min-height:46px;
  border-radius:14px;
  border:1px solid var(--line);
  color:#fff;
  font-weight:950;
  font-size:14px;
  cursor:pointer;
}

.btnPrimary{
  background:linear-gradient(180deg, var(--blue1), var(--blue2));
  box-shadow:0 14px 26px rgba(82,108,240,.24), inset 0 1px 0 rgba(255,255,255,.14);
}

.btnGhost{
  background:rgba(255,255,255,.05);
}

.btnGhost2{
  grid-column:1 / -1;
  background:rgba(255,255,255,.05);
}

.btnPrimary:disabled,
.btnGhost:disabled,
.btnGhost2:disabled,
.btnSmall:disabled,
.betInput:disabled,
.chip:disabled,
.seg:disabled{
  opacity:.55;
  cursor:not-allowed;
}

.ladderWrap{
  border-radius:18px;
  border:1px solid rgba(0,0,0,.92);
  background:rgba(255,255,255,.04);
  padding:10px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
}

.ladderHead{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:10px;
  margin-bottom:8px;
}

.ladder{
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:8px;
}

.lStep{
  border-radius:12px;
  padding:8px 6px;
  border:1px solid rgba(0,0,0,.92);
  background:rgba(255,255,255,.04);
  text-align:center;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
}

.lStep .t{
  font-size:10px;
  color:var(--muted);
  font-weight:800;
}

.lStep .x{
  margin-top:4px;
  font-size:12px;
  font-weight:1000;
}

.lStep.active{
  background:linear-gradient(180deg, rgba(95,124,255,.30), rgba(74,103,234,.16));
  box-shadow:0 10px 18px rgba(82,108,240,.16);
}

.tiny{
  margin-top:8px;
  font-size:11px;
  color:var(--muted);
}

@media (max-width: 980px){
  .layout{
    grid-template-columns:1fr;
  }
}

@media (max-width: 700px){
  .app{
    width:calc(100% - 14px);
    margin:8px auto 12px;
  }

  .topbar{
    min-height:auto;
    padding:10px;
    gap:8px;
    align-items:flex-start;
    flex-direction:column;
  }

  .topbar__left,
  .topbar__right{
    width:100%;
  }

  .topbar__right{
    justify-content:space-between;
    gap:8px;
  }

  .title{
    font-size:22px;
  }

  .subtitle{
    font-size:10px;
    letter-spacing:1.3px;
  }

  .panel{
    padding:10px;
    border-radius:18px;
  }

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

  .goalTop{
    flex-direction:column;
    align-items:flex-start;
  }

  .goalTop__right{
    width:100%;
    justify-content:flex-start;
  }

  .goalFrame{
    height:280px;
  }

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

@media (max-width: 420px){
  .backBtn{
    width:38px;
    height:38px;
    border-radius:10px;
  }

  .brandLogo{
    width:40px;
    height:40px;
    border-radius:12px;
    flex-basis:40px;
  }

  .brandLogo svg{
    width:22px;
    height:22px;
  }

  .title{
    font-size:20px;
  }

  .pill{
    min-height:38px;
    padding:0 10px;
    font-size:12px;
  }

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

  .zones{
    gap:6px;
  }

  .goalFrame{
    height:248px;
  }

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

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

  .betRow{
    grid-template-columns:38px minmax(0,1fr) 38px;
  }

  .btnSmall,
  .betInput{
    height:38px;
  }
}
