:root{
  --bg:#0b1020;
  --panel:#111a33;
  --panel2:#0f1630;
  --text:#e9efff;
  --muted:#a8b3d9;
  --accent:#7aa7ff;
  --win:#ffe37a;
  --danger:#ff6b7a;
  --good:#63e6be;
  --border:rgba(255,255,255,.10);
  --shadow: 0 18px 50px rgba(0,0,0,.45);
}
*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  background: radial-gradient(1200px 800px at 30% 10%, rgba(122,167,255,.22), transparent 55%),
              radial-gradient(900px 650px at 80% 40%, rgba(99,230,190,.14), transparent 55%),
              linear-gradient(180deg, #070a14, var(--bg));
  color:var(--text);
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
}
.app{
  width:min(1080px, 100%);
  display:grid;
  grid-template-columns: 1.3fr .9fr;
  gap:14px;
}
@media (max-width: 980px){
  .app{ grid-template-columns: 1fr; }
}
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow: var(--shadow);
  overflow:hidden;
}
.card .hd{
  padding:14px 14px 10px 14px;
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.title{
  display:flex; flex-direction:column; gap:2px;
}
.title h1{
  margin:0;
  font-size:16px;
  letter-spacing:.3px;
}
.title .sub{
  font-size:12px;
  color:var(--muted);
}
.gridWrap{ padding:14px; }
.stage{
  position:relative;
  background: linear-gradient(180deg, rgba(17,26,51,.75), rgba(15,22,48,.75));
  border:1px solid var(--border);
  border-radius:16px;
  padding:12px;
}
.reels{
  display:grid;
  grid-template-columns: repeat(5, 1fr);
  gap:10px;
  position:relative;
}
.reel{
  background: rgba(255,255,255,.04);
  border:1px solid var(--border);
  border-radius:14px;
  overflow:hidden;
  position:relative;
  height: 420px;
}
.cell{
  height: calc(420px / 5);
  display:flex;
  align-items:center;
  justify-content:center;
  border-bottom:1px solid rgba(255,255,255,.06);
  position:relative;
}
.cell:last-child{ border-bottom:0; }
.sym{
  width:58px;
  height:58px;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,.35));
  opacity:.95;
  transform: translateZ(0);
}
.overlay{
  pointer-events:none;
  position:absolute;
  inset:12px;
  border-radius:16px;
}
.controls{
  display:grid;
  grid-template-columns: 1fr 1fr 1.1fr;
  gap:10px;
  margin-top:12px;
  align-items:end;
}
.controls .box{
  padding:10px;
  background: rgba(255,255,255,.04);
  border:1px solid var(--border);
  border-radius:12px;
}
label{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin-bottom:6px;
}
input[type="number"]{
  width:100%;
  background: rgba(0,0,0,.25);
  border:1px solid rgba(255,255,255,.12);
  color:var(--text);
  border-radius:10px;
  padding:10px 10px;
  font-size:14px;
  outline:none;
}
input[type="number"]:focus{
  border-color: rgba(122,167,255,.45);
  box-shadow: 0 0 0 3px rgba(122,167,255,.18);
}
button{
  cursor:pointer;
  border:0;
  border-radius:12px;
  padding:12px 12px;
  font-weight:700;
  letter-spacing:.2px;
  background: linear-gradient(180deg, rgba(122,167,255,.95), rgba(122,167,255,.75));
  color:#071022;
  box-shadow: 0 14px 40px rgba(122,167,255,.22);
  transition: transform .08s ease, filter .12s ease;
  width:100%;
  font-size:14px;
}
button:active{ transform: translateY(1px) scale(.99); }
button.secondary{
  background: rgba(255,255,255,.06);
  color:var(--text);
  border:1px solid rgba(255,255,255,.12);
  box-shadow:none;
  font-weight:600;
}
button.danger{
  background: linear-gradient(180deg, rgba(255,107,122,.95), rgba(255,107,122,.72));
  color:#2b0810;
  box-shadow: 0 14px 40px rgba(255,107,122,.18);
}
button:disabled{ opacity:.5; cursor:not-allowed; }
.stats{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap:10px;
  margin-top:12px;
}
.pill{
  padding:10px;
  background: rgba(255,255,255,.04);
  border:1px solid var(--border);
  border-radius:12px;
}
.pill .k{ font-size:12px; color:var(--muted); }
.pill .v{ font-size:16px; font-weight:800; margin-top:4px; }
.winGlow{ animation: glow 900ms ease-in-out infinite alternate; }
@keyframes glow{
  from{ box-shadow: 0 0 0 rgba(255,227,122,.0), inset 0 0 0 rgba(255,227,122,.0); }
  to  { box-shadow: 0 0 28px rgba(255,227,122,.14), inset 0 0 0 rgba(255,227,122,.0); }
}
.side{
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.section{
  padding:12px;
  background: rgba(255,255,255,.04);
  border:1px solid var(--border);
  border-radius:12px;
}
.section h2{
  margin:0 0 8px 0;
  font-size:13px;
  letter-spacing:.2px;
}
.small{
  font-size:12px;
  color:var(--muted);
  line-height:1.35;
}
table{
  width:100%;
  border-collapse:collapse;
  font-size:12px;
  overflow:hidden;
  border-radius:10px;
}
th, td{
  text-align:left;
  padding:8px 8px;
  border-bottom:1px solid rgba(255,255,255,.08);
  vertical-align:middle;
}
th{ color: var(--muted); font-weight:700; }
tr:last-child td{ border-bottom:0; }
.row{ display:flex; gap:10px; }
.row > *{ flex:1; }
.note{ font-size:12px; color:var(--muted); margin-top:8px; }
.toast{
  position:fixed;
  bottom:16px;
  left:50%;
  transform:translateX(-50%);
  background: rgba(0,0,0,.55);
  border:1px solid rgba(255,255,255,.14);
  color:var(--text);
  padding:10px 12px;
  border-radius:12px;
  font-size:12px;
  backdrop-filter: blur(10px);
  display:none;
  box-shadow: 0 18px 50px rgba(0,0,0,.4);
  z-index:999;
  max-width:min(720px, calc(100% - 24px));
}
