/* ════════════════════════════════════════════
   GLÜCKS IMPERIUM v2 — Casino Dark Theme
   ════════════════════════════════════════════ */

:root {
  --bg-deep:     #05050e;
  --bg-dark:     #0c0c1a;
  --bg-panel:    #10101e;
  --bg-card:     #181830;
  --bg-hover:    #20203a;
  --border:      #252548;
  --border-lit:  #383870;
  --gold:        #d4af37;
  --gold-light:  #f0d060;
  --gold-dim:    #7a6018;
  --green:       #00c853;
  --green-dim:   #005c25;
  --red:         #f44336;
  --blue:        #4fc3f7;
  --purple:      #ce93d8;
  --text:        #e2e2f0;
  --text-dim:    #7a7a9a;
  --text-muted:  #454565;
  --shadow-lg:   0 8px 32px rgba(0,0,0,.7);
  --glow-gold:   0 0 20px rgba(212,175,55,.4);
  --glow-green:  0 0 20px rgba(0,200,83,.4);
  --radius:      10px;
  --radius-lg:   16px;
}

*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }

html,body {
  min-height:100vh;
  background:var(--bg-deep);
  color:var(--text);
  font-family:'Segoe UI',system-ui,sans-serif;
  font-size:14px;
  overflow-x:hidden;
}

/* Ambient glow */
body::before {
  content:'';
  position:fixed; inset:0; z-index:0; pointer-events:none;
  background:
    radial-gradient(ellipse 60% 40% at 20% 10%, rgba(212,175,55,.04) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 90%, rgba(0,200,83,.04) 0%, transparent 70%);
}

/* ════ HUD ════ */
#hud {
  position:sticky; top:0; z-index:200;
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 20px;
  background:rgba(5,5,14,.95);
  border-bottom:1px solid var(--border);
  backdrop-filter:blur(10px);
  box-shadow:0 2px 24px rgba(0,0,0,.6);
}

.hud-left,.hud-right { display:flex; gap:20px; }

.hud-stat { display:flex; flex-direction:column; gap:2px; }
.hud-lbl  { font-size:9px; letter-spacing:1.5px; color:var(--text-muted); text-transform:uppercase; font-weight:600; }
.hud-val  { font-size:17px; font-weight:800; letter-spacing:.3px; }
.gold  { color:var(--gold); }
.green { color:var(--green); }
.red   { color:var(--red); }

.hud-center { text-align:center; }
.logo-title {
  font-size:22px; font-weight:900; letter-spacing:3px; text-transform:uppercase;
  text-shadow:0 0 30px rgba(212,175,55,.3);
}

.jackpot-pill {
  margin-top:4px; padding:3px 12px;
  background:linear-gradient(90deg,#4a2000,#8a4000,#4a2000);
  border:1px solid #f59e0b; border-radius:20px;
  font-size:12px; font-weight:800; color:#f59e0b;
  letter-spacing:1px; text-align:center;
  animation:pulse-gold 1s ease infinite alternate;
}
@keyframes pulse-gold {
  from { box-shadow:none; }
  to   { box-shadow:0 0 16px rgba(245,158,11,.5); }
}

/* ════ TAB NAV ════ */
#tab-nav {
  display:flex; overflow-x:auto; scrollbar-width:none;
  background:var(--bg-dark); border-bottom:1px solid var(--border);
  position:sticky; top:56px; z-index:190;
}
#tab-nav::-webkit-scrollbar { display:none; }

.tab-btn {
  flex:0 0 auto; padding:12px 20px;
  background:none; border:none; border-bottom:3px solid transparent;
  color:var(--text-dim); font-size:13px; font-weight:600;
  cursor:pointer; transition:all .2s; white-space:nowrap;
}
.tab-btn:hover:not(.locked) { color:var(--text); background:var(--bg-hover); }
.tab-btn.active { color:var(--gold); border-bottom-color:var(--gold); }
.tab-btn.locked { color:var(--text-muted); cursor:default; }
.tab-btn.locked::after { content:'🔒'; font-size:10px; margin-left:4px; }

/* ════ MAIN ════ */
#main-content {
  max-width:960px; margin:0 auto;
  padding:24px 16px; position:relative; z-index:1;
}

/* ════ PANELS ════ */
.panel { display:flex; flex-direction:column; gap:14px; }
.panel.hidden { display:none; }

.panel-header {
  display:flex; align-items:center; justify-content:space-between;
  flex-wrap:wrap; gap:10px;
}
.panel-header h2 { font-size:22px; font-weight:800; color:var(--gold); letter-spacing:.5px; }

/* ════ TIER SELECTOR ════ */
.tier-selector { display:flex; gap:6px; flex-wrap:wrap; }

.tier-btn {
  display:flex; flex-direction:column; align-items:center;
  padding:6px 14px; border-radius:20px;
  border:1px solid var(--border); background:var(--bg-card);
  color:var(--text-dim); font-size:12px; font-weight:700;
  cursor:pointer; transition:all .2s; gap:1px;
}
.tier-btn small { font-size:10px; font-weight:400; opacity:.7; }
.tier-btn:hover:not(:disabled) { border-color:var(--gold-dim); color:var(--text); }
.tier-btn.active { background:rgba(212,175,55,.15); border-color:var(--gold); color:var(--gold); box-shadow:var(--glow-gold); }
.tier-btn:disabled { opacity:.35; cursor:not-allowed; }

/* ════ SCRATCH INFO BAR ════ */
.scratch-info-bar {
  display:flex; align-items:center; justify-content:space-between;
  padding:8px 14px; background:var(--bg-card);
  border:1px solid var(--border); border-radius:var(--radius);
  font-size:12px; color:var(--text-dim);
}
.market-badge { display:flex; align-items:center; gap:4px; font-size:11px; }

/* ════ SCRATCH ACTIVE ZONE ════ */
.scratch-active-zone {
  min-height:240px; padding:16px;
  background:var(--bg-panel); border:1px solid var(--border);
  border-radius:var(--radius-lg);
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap:12px; align-content:start;
  position:relative;
}

.scratch-empty-state {
  width:100%; text-align:center; padding:40px 20px;
  color:var(--text-muted); display:flex; flex-direction:column;
  align-items:center; gap:8px;
}
.empty-icon { font-size:40px; }
.empty-sub  { font-size:11px; margin-top:4px; }

/* ════ SCRATCH TICKET WRAP ════ */
.scratch-ticket-wrap {
  min-height:190px;
  border-radius:14px; overflow:hidden; position:relative;
  border:2px solid var(--border);
  box-shadow:var(--shadow-lg);
  transition:box-shadow .3s;
}
.scratch-ticket-wrap.compact { min-height:150px; }
.scratch-ticket-wrap:hover { box-shadow:var(--shadow-lg), 0 0 20px rgba(212,175,55,.15); }

/* Tier border glow */
.scratch-ticket-wrap.tier-0 { border-color:#3a8a3a; }
.scratch-ticket-wrap.tier-1 { border-color:#8a3a3a; }
.scratch-ticket-wrap.tier-2 { border-color:var(--gold); }
.scratch-ticket-wrap.tier-3 { border-color:#8a40cc; }

.ticket-bg-content {
  width:100%; height:100%; padding:12px;
  display:flex; flex-direction:column; gap:8px;
  background:var(--bg-card);
}

.ticket-tier-badge {
  font-size:9px; letter-spacing:2px; text-transform:uppercase;
  color:var(--text-muted); font-weight:700; text-align:right;
}

.ticket-symbols-grid {
  display:grid; gap:4px; flex:1;
}
.ticket-symbols-grid.cols-3 { grid-template-columns:repeat(3,1fr); }
.ticket-symbols-grid.cols-5 { grid-template-columns:repeat(5,1fr); }

.sym-cell {
  aspect-ratio:1; background:var(--bg-deep);
  border-radius:8px; display:flex;
  align-items:center; justify-content:center;
  font-size:20px; border:1px solid var(--border);
  transition:transform .15s;
}
.scratch-ticket-wrap.compact .sym-cell { font-size:16px; border-radius:6px; }

/* Result overlay on top of cells */
.ticket-result-overlay {
  position:absolute; inset:0; border-radius:12px;
  display:flex; align-items:center; justify-content:center;
  pointer-events:none;
}
.win-overlay {
  background:rgba(0,60,20,.75);
  border:2px solid var(--green);
  box-shadow:var(--glow-green);
}
.lose-overlay { background:rgba(20,20,40,.6); }

.win-result-label {
  font-size:22px; font-weight:900; color:var(--green);
  text-shadow:0 0 16px rgba(0,200,83,.6);
  animation:pop-in .3s cubic-bezier(.175,.885,.32,1.275);
}

@keyframes pop-in {
  from { transform:scale(.6); opacity:0; }
  to   { transform:scale(1);  opacity:1; }
}

/* Pending bar */
.pending-bar {
  text-align:center; font-size:11px; color:var(--text-muted);
  min-height:16px;
}

/* ════ ACTION BAR ════ */
.action-bar { display:flex; gap:10px; flex-wrap:wrap; }

/* ════ STATS STRIP ════ */
.stats-strip { display:flex; gap:10px; flex-wrap:wrap; }
.stat-pill {
  padding:6px 12px; background:var(--bg-card);
  border:1px solid var(--border); border-radius:20px;
  font-size:12px; color:var(--text-dim);
}
.stat-pill b { color:var(--gold); }

/* ════ TICKET LEGEND ════ */
.ticket-legend {
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius); padding:14px 16px;
}
.legend-title {
  font-size:10px; letter-spacing:2px; text-transform:uppercase;
  color:var(--text-muted); margin-bottom:10px; font-weight:600;
}
.legend-items { display:flex; flex-direction:column; gap:6px; }
.legend-item { display:flex; align-items:center; gap:10px; font-size:13px; }
.legend-combo { font-size:16px; min-width:90px; }
.legend-prize { color:var(--gold); font-weight:800; min-width:40px; }
.legend-desc  { color:var(--text-dim); font-size:11px; }

/* ════ BUTTONS ════ */
.btn-primary {
  padding:12px 22px;
  background:linear-gradient(135deg,#7a6010,#d4af37);
  color:#000; font-weight:800; font-size:14px;
  border:none; border-radius:var(--radius);
  cursor:pointer; transition:all .2s; letter-spacing:.3px;
  box-shadow:0 2px 12px rgba(212,175,55,.25);
}
.btn-primary:hover:not(:disabled) {
  background:linear-gradient(135deg,#d4af37,#f0d060);
  box-shadow:0 4px 20px rgba(212,175,55,.5);
  transform:translateY(-1px);
}
.btn-primary:active { transform:translateY(0); }
.btn-primary:disabled { opacity:.4; cursor:not-allowed; transform:none; }
.btn-primary.big { font-size:16px; padding:15px 28px; }

.btn-secondary {
  padding:12px 18px; background:var(--bg-card);
  color:var(--text); font-weight:600; font-size:13px;
  border:1px solid var(--border); border-radius:var(--radius);
  cursor:pointer; transition:all .2s;
}
.btn-secondary:hover { background:var(--bg-hover); border-color:var(--border-lit); }
.btn-secondary:disabled { opacity:.4; cursor:not-allowed; }

.btn-danger {
  padding:12px 18px;
  background:linear-gradient(135deg,#7a1a16,#f44336);
  color:#fff; font-weight:700; font-size:13px;
  border:none; border-radius:var(--radius);
  cursor:pointer; transition:all .2s;
}
.btn-danger:hover { filter:brightness(1.15); transform:translateY(-1px); }

.btn-small {
  width:32px; height:32px; border-radius:8px;
  background:var(--bg-card); border:1px solid var(--border);
  color:var(--text); font-size:16px; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition:all .15s;
}
.btn-small:hover { background:var(--bg-hover); border-color:var(--gold-dim); }

.hidden { display:none !important; }

/* ════ GATE ════ */
.gate {
  background:var(--bg-panel); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:32px;
  text-align:center; display:flex; flex-direction:column;
  align-items:center; gap:12px;
}
.gate-icon { font-size:40px; }
.gate-text  { font-size:14px; color:var(--text-dim); }
.gate-text b { color:var(--gold); }

.gate-bar-wrap { width:100%; max-width:320px; }
.gate-bar { height:8px; background:var(--bg-deep); border-radius:4px; overflow:hidden; border:1px solid var(--border); margin-bottom:6px; }
.gate-fill { height:100%; background:linear-gradient(90deg,var(--gold-dim),var(--gold)); border-radius:4px; transition:width .5s ease; width:0%; }

/* ════ SLOT MACHINE ════ */
.slots-layout {
  display:grid; grid-template-columns:1fr auto 1fr; gap:20px; align-items:start;
}

.slot-machine-frame {
  background:linear-gradient(180deg,#180828,#280840);
  border:2px solid #6a30b0; border-radius:20px;
  padding:16px; box-shadow:0 0 40px rgba(100,40,160,.3),inset 0 0 20px rgba(0,0,0,.4);
}

.slot-machine-top-bar,.slot-machine-bottom-bar {
  height:8px; border-radius:4px; margin-bottom:12px;
  background:linear-gradient(90deg,#5a20a0,#c060f0,#5a20a0);
  animation:bar-pulse 2s ease infinite alternate;
}
.slot-machine-bottom-bar { margin-top:12px; margin-bottom:0; opacity:.7; }
@keyframes bar-pulse {
  from { opacity:.6; }
  to   { opacity:1; box-shadow:0 0 14px rgba(180,80,255,.5); }
}

.slot-reels-container {
  display:flex; align-items:center; gap:6px;
  background:#05050a; border-radius:12px; padding:12px;
  border:1px solid #4a2080;
}

.reel-box {
  flex:1; background:#0a0a18; border-radius:10px;
  border:1px solid #3a1060;
  overflow:hidden; height:80px;
  display:block;          /* NOT flex — reel strip scrolls from top */
  position:relative;
}

/* Reel top/bottom shadows */
.reel-box::before,
.reel-box::after {
  content:''; position:absolute; left:0; right:0; z-index:2;
  height:16px; pointer-events:none;
}
.reel-box::before { top:0; background:linear-gradient(to bottom,rgba(5,5,10,1),transparent); }
.reel-box::after  { bottom:0; background:linear-gradient(to top,rgba(5,5,10,1),transparent); }

.reel-separator { width:2px; height:50px; background:linear-gradient(180deg,transparent,#5a20a0,transparent); flex-shrink:0; }

.slot-result-line {
  height:28px; text-align:center; font-size:14px; font-weight:800;
  margin-top:8px; letter-spacing:1px; transition:all .3s;
}
.slot-win  { color:var(--green); text-shadow:0 0 12px rgba(0,200,83,.5); }
.slot-lose { color:var(--text-muted); }

.slot-controls-col {
  display:flex; flex-direction:column; gap:12px; align-items:center;
}

.ctrl-group    { display:flex; flex-direction:column; gap:6px; align-items:center; }
.ctrl-group.row { flex-direction:row; align-items:center; }
.ctrl-label    { font-size:9px; letter-spacing:2px; text-transform:uppercase; color:var(--text-muted); font-weight:600; }

.bet-row { display:flex; align-items:center; gap:8px; }
.bet-val  { min-width:54px; text-align:center; font-size:16px; font-weight:800; color:var(--gold); }

.autospin-row { display:flex; align-items:center; gap:6px; }
.toggle-wrap {
  display:flex; align-items:center; gap:6px; cursor:pointer;
  font-size:13px; color:var(--text-dim);
}

/* Gamble ladder */
.gamble-ladder-panel {
  background:linear-gradient(135deg,#1a0a2e,#2a1045);
  border:1px solid #7a40c0; border-radius:var(--radius);
  padding:16px; text-align:center; display:flex;
  flex-direction:column; gap:8px; animation:pop-in .3s ease;
}
.gamble-title { font-size:12px; letter-spacing:2px; color:#c080f0; font-weight:800; }
.gamble-prize { font-size:24px; font-weight:900; color:var(--gold); }
.gamble-step  { font-size:11px; color:var(--text-muted); }
.gamble-next  { font-size:12px; color:#c080f0; }
.gamble-btns  { display:flex; gap:8px; }

/* Paytable */
.slot-paytable {
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius); padding:14px; font-size:12px;
}
.pt-title {
  font-size:9px; letter-spacing:2px; color:var(--text-muted);
  text-transform:uppercase; margin-bottom:10px; font-weight:600;
}
.pt-row { display:flex; justify-content:space-between; padding:4px 0; border-bottom:1px solid var(--border); gap:8px; }
.pt-row:last-child { border-bottom:none; }
.pt-x { color:var(--gold); font-weight:800; }

/* ════ POKER ════ */
.poker-content { display:flex; flex-direction:column; align-items:center; gap:16px; }

.poker-table {
  width:100%; max-width:640px;
  background:radial-gradient(ellipse at center,#0c3820 0%,#061610 100%);
  border:3px solid #2a7048; border-radius:50px;
  padding:24px 20px; box-shadow:0 0 50px rgba(0,70,35,.4),inset 0 0 30px rgba(0,0,0,.4);
  display:flex; flex-direction:column; align-items:center; gap:14px;
}

.npc-row { display:flex; gap:16px; justify-content:center; }
.npc-seat { display:flex; flex-direction:column; align-items:center; gap:4px; }
.npc-avatar { font-size:22px; }
.npc-name   { font-size:9px; letter-spacing:1px; color:rgba(255,255,255,.4); text-transform:uppercase; }
.npc-cards  { display:flex; gap:3px; }

.table-felt  { width:100%; text-align:center; display:flex; flex-direction:column; gap:6px; align-items:center; }
.felt-label  { font-size:9px; letter-spacing:2px; color:rgba(255,255,255,.35); text-transform:uppercase; }
.pot-display { font-size:20px; font-weight:800; color:var(--gold); }
.status-line { font-size:13px; color:rgba(255,255,255,.6); max-width:340px; text-align:center; min-height:20px; }

.dealer-area { display:flex; flex-direction:column; align-items:center; gap:6px; }
.player-area { display:flex; flex-direction:column; align-items:center; gap:6px; width:100%; }

.card-row { display:flex; gap:6px; justify-content:center; min-height:86px; align-items:center; }

.playing-card {
  width:54px; height:78px; background:#fff;
  border-radius:7px; border:1px solid #ddd;
  display:flex; flex-direction:column; align-items:center;
  justify-content:center; gap:2px;
  box-shadow:0 2px 8px rgba(0,0,0,.4); position:relative;
}
.playing-card.sm { width:34px; height:50px; }
.playing-card.red   { color:#c0392b; }
.playing-card.black { color:#111; }
.playing-card.face-down {
  background:repeating-linear-gradient(
    45deg,#1a2060,#1a2060 5px,#2a3080 5px,#2a3080 10px);
}
.playing-card.empty-card { background:rgba(255,255,255,.05); border:1px dashed var(--border); }
.playing-card.peek-card  { box-shadow:0 0 12px rgba(212,175,55,.5); border-color:var(--gold); }

.card-rank { font-size:13px; font-weight:900; line-height:1; }
.card-suit { font-size:18px; line-height:1; }

.poker-ctrl {
  width:100%; max-width:420px;
  display:flex; flex-direction:column; gap:10px;
}
.poker-action-btns { display:flex; gap:8px; flex-wrap:wrap; justify-content:center; }

/* ════ HORSE RACING ════ */
.horses-layout { display:flex; flex-direction:column; gap:14px; }

.racetrack {
  background:linear-gradient(180deg,#162810,#0e1c08);
  border:2px solid #2a5018; border-radius:var(--radius-lg);
  padding:16px 12px;
  box-shadow:inset 0 0 30px rgba(0,0,0,.4);
  display:flex; gap:8px; align-items:stretch;
}

.track-finish {
  display:flex; flex-direction:column; align-items:center;
  font-size:24px; flex-shrink:0; position:relative; width:28px;
}
.finish-line-v {
  width:2px; flex:1; background:repeating-linear-gradient(
    180deg,#fff 0,#fff 6px,transparent 6px,transparent 12px);
  opacity:.7; margin-top:4px;
}
.track-start {
  writing-mode:vertical-rl; font-size:9px; letter-spacing:2px;
  color:rgba(255,255,255,.3); text-transform:uppercase;
  flex-shrink:0; padding:8px 0;
}

.racetrack-lanes { flex:1; display:flex; flex-direction:column; gap:6px; }

.race-lane-row {
  display:flex; align-items:center; gap:8px; height:40px;
}
.lane-label {
  font-size:11px; font-weight:700; min-width:80px; text-align:right;
  overflow:hidden; white-space:nowrap; text-overflow:ellipsis;
}
.lane-track-bg {
  flex:1; height:24px; background:rgba(255,255,255,.08);
  border-radius:12px; position:relative; overflow:hidden;
  border:1px solid rgba(255,255,255,.1);
}
.lane-fill {
  position:absolute; left:0; top:0; bottom:0;
  background:rgba(255,255,255,.2); border-radius:12px;
  transition:width .06s linear;
}
.lane-horse {
  position:absolute; right:0; top:50%;
  transform:scaleX(-1) translateY(-50%);
  font-size:20px; transition:left .06s linear; left:0%;
}
.lane-odds { font-size:11px; font-weight:800; min-width:36px; text-align:right; }

.race-result {
  padding:14px; text-align:center;
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius); font-size:16px; font-weight:700;
  animation:pop-in .3s ease;
}

.race-bet-panel {
  background:var(--bg-panel); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:18px;
  display:flex; flex-direction:column; gap:12px;
}
.pick-label { font-size:13px; color:var(--text-dim); font-weight:600; }

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

.horse-pick-btn {
  padding:8px 4px; background:var(--bg-card);
  border:1px solid var(--border); border-radius:var(--radius);
  cursor:pointer; text-align:center;
  transition:all .2s; display:flex; flex-direction:column;
  align-items:center; gap:3px;
}
.horse-pick-btn:hover  { border-color:var(--gold-dim); }
.horse-pick-btn.selected { border-color:var(--gold); background:rgba(212,175,55,.12); }
.horse-pick-btn:disabled { opacity:.5; cursor:not-allowed; }
.pick-emoji { font-size:20px; }
.pick-name  { font-size:10px; font-weight:700; }
.pick-odds  { font-size:10px; }

.race-bet-row { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }

/* ════ EMPIRE ════ */
.empire-content { display:flex; flex-direction:column; gap:18px; }

.empire-stats {
  display:grid; grid-template-columns:repeat(3,1fr); gap:12px;
}
.empire-stat-card {
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:18px; text-align:center;
  display:flex; flex-direction:column; gap:6px;
}
.es-icon { font-size:26px; }
.es-val  { font-size:22px; font-weight:800; color:var(--gold); }
.es-lbl  { font-size:10px; color:var(--text-muted); text-transform:uppercase; letter-spacing:1px; }

.section-title {
  font-size:14px; font-weight:700; color:var(--text-dim);
  letter-spacing:.5px; margin-top:4px;
}

/* Empire Map */
.map-section { display:flex; flex-direction:column; gap:10px; }
.empire-map {
  display:flex; gap:12px; overflow-x:auto; padding-bottom:8px;
  scrollbar-width:thin; scrollbar-color:var(--border) transparent;
}

.map-stage {
  min-width:120px; flex-shrink:0;
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius-lg); padding:14px;
  text-align:center; display:flex; flex-direction:column;
  gap:6px; transition:all .3s;
}
.map-stage.active { border-color:var(--gold-dim); background:rgba(212,175,55,.05); }
.map-stage.locked { opacity:.5; }

.map-city-icon { font-size:28px; }
.map-city-name { font-size:11px; font-weight:700; color:var(--text-dim); }
.map-venues    { display:flex; flex-wrap:wrap; gap:4px; justify-content:center; font-size:16px; }
.map-lock-req  { font-size:10px; color:var(--text-muted); }

/* Empire shop items */
.empire-shop { display:flex; flex-direction:column; gap:8px; }

.shop-item {
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius); padding:14px;
  display:flex; align-items:center; gap:14px;
  transition:border-color .2s;
}
.shop-item:hover { border-color:var(--border-lit); }
.shop-item.maxed { opacity:.5; }
.shop-item-icon  { font-size:28px; flex-shrink:0; }
.shop-item-info  { flex:1; }
.shop-item-name  { font-size:14px; font-weight:700; }
.shop-item-desc  { font-size:11px; color:var(--text-dim); margin-top:2px; }
.shop-item-count { font-size:18px; font-weight:800; color:var(--gold); min-width:40px; text-align:center; }
.shop-item-count small { font-size:11px; color:var(--text-muted); }

/* ════ UPGRADES ════ */
.cat-bar { display:flex; gap:8px; flex-wrap:wrap; }
.cat-btn {
  padding:8px 16px; background:var(--bg-card);
  border:1px solid var(--border); border-radius:20px;
  color:var(--text-dim); font-size:12px; font-weight:600;
  cursor:pointer; transition:all .2s;
}
.cat-btn:hover { color:var(--text); border-color:var(--border-lit); }
.cat-btn.active { background:rgba(212,175,55,.15); border-color:var(--gold); color:var(--gold); }
.cat-btn:disabled { opacity:.35; cursor:not-allowed; }

.upgrades-list { display:flex; flex-direction:column; gap:8px; }

.upgrade-card {
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius); padding:14px;
  display:flex; align-items:center; gap:14px; transition:all .2s;
}
.upgrade-card:hover:not(.bought):not(.cant-afford) { border-color:var(--border-lit); }
.upgrade-card.bought { opacity:.5; border-color:var(--green-dim); }
.upgrade-card.cant-afford { opacity:.6; }

.upg-icon  { font-size:22px; flex-shrink:0; }
.upg-info  { flex:1; }
.upg-name  { font-size:14px; font-weight:700; }
.upg-desc  { font-size:12px; color:var(--text-dim); margin-top:2px; }
.upg-right { display:flex; flex-direction:column; align-items:flex-end; gap:6px; }
.upg-price { font-size:14px; font-weight:700; color:var(--gold); }
.upg-price.red { color:var(--red); }
.upg-bought { font-size:12px; color:var(--green); }
.upg-locked-msg { padding:40px; text-align:center; color:var(--text-muted); }

/* ════ WIN POPUP ════ */
.win-popup {
  position:fixed; inset:0; display:flex;
  align-items:center; justify-content:center;
  z-index:600; pointer-events:none;
}
.win-popup.hidden { display:none; }

.win-inner {
  background:linear-gradient(135deg,#14100a,#2a2000);
  border:2px solid var(--gold); border-radius:var(--radius-lg);
  padding:24px 40px; text-align:center;
  box-shadow:0 0 60px rgba(212,175,55,.5);
  animation:pop-in .3s cubic-bezier(.175,.885,.32,1.275);
}
.win-amount { font-size:38px; font-weight:900; color:var(--gold); text-shadow:0 0 20px rgba(212,175,55,.5); }
.win-label  { font-size:11px; letter-spacing:3px; color:var(--text-muted); margin-top:4px; }

/* ════ UNLOCK BANNER ════ */
.unlock-banner {
  position:fixed; top:72px; left:50%;
  transform:translateX(-50%); z-index:500;
  background:linear-gradient(135deg,#18120a,#2c2000);
  border:2px solid var(--gold); border-radius:var(--radius-lg);
  padding:14px 28px; box-shadow:0 0 50px rgba(212,175,55,.4);
  animation:banner-drop .4s cubic-bezier(.175,.885,.32,1.275);
  transition:opacity .5s;
}
.unlock-banner.hidden { display:none; }
.unlock-inner { display:flex; align-items:center; gap:14px; }
.ul-icon  { font-size:28px; }
.ul-title { font-size:9px; letter-spacing:3px; color:var(--text-muted); text-transform:uppercase; }
.ul-name  { font-size:20px; font-weight:900; color:var(--gold); }

@keyframes banner-drop {
  from { transform:translateX(-50%) translateY(-40px); opacity:0; }
  to   { transform:translateX(-50%) translateY(0); opacity:1; }
}

/* ════ TOASTS ════ */
#toast-container {
  position:fixed; bottom:24px; right:24px;
  z-index:400; display:flex; flex-direction:column-reverse; gap:8px;
}
.toast {
  padding:10px 16px; background:var(--bg-card);
  border:1px solid var(--border); border-radius:var(--radius);
  font-size:13px; box-shadow:var(--shadow-lg);
  animation:slide-in .3s ease;
  max-width:280px; transition:opacity .35s, transform .35s;
}
.toast-win    { border-color:var(--green); color:var(--green); }
.toast-unlock { border-color:var(--gold);  color:var(--gold); }
.toast-info   { border-color:var(--blue);  color:var(--blue); }

@keyframes slide-in {
  from { transform:translateX(110%); opacity:0; }
  to   { transform:translateX(0);    opacity:1; }
}

/* ════ SCRATCH PARTICLES ════ */
.scratch-particle {
  position:fixed; pointer-events:none; z-index:500;
  border-radius:50%; background:rgba(212,175,55,.7);
  animation:scratch-fly 0.5s ease forwards;
}
@keyframes scratch-fly {
  0%   { opacity:.9; transform:translate(0,0) scale(1); }
  100% { opacity:0;  transform:translate(var(--dx),var(--dy)) scale(0.2); }
}

/* ════ UNLOCK ROADMAP ════ */
.unlock-roadmap {
  background:var(--bg-card); border:1px solid var(--border);
  border-radius:var(--radius); padding:14px 16px;
  display:flex; flex-direction:column; gap:12px;
}
.roadmap-title {
  font-size:9px; letter-spacing:2px; text-transform:uppercase;
  color:var(--text-muted); font-weight:600;
}
.roadmap-item {
  display:flex; align-items:center; gap:10px;
}
.roadmap-icon { font-size:20px; flex-shrink:0; }
.roadmap-bar-wrap { flex:1; display:flex; flex-direction:column; gap:4px; }
.roadmap-name-row {
  display:flex; justify-content:space-between; align-items:center;
}
.roadmap-name { font-size:12px; font-weight:700; color:var(--text); }
.roadmap-pct  { font-size:11px; font-weight:800; color:var(--gold); }
.roadmap-bar {
  height:10px; background:var(--bg-deep); border-radius:5px;
  overflow:hidden; border:1px solid var(--border-lit);
}
.roadmap-fill {
  height:100%;
  background:linear-gradient(90deg, #7a6018, #d4af37, #f0d060);
  border-radius:5px; transition:width .8s ease;
  box-shadow:0 0 6px rgba(212,175,55,.5);
}
.roadmap-label { font-size:10px; color:var(--text-muted); }
.roadmap-complete { text-align:center; color:var(--green); font-size:13px; font-weight:700; padding:8px 0; }

/* ════ MODAL FINE (police & daily) ════ */
.modal-fine {
  font-size:28px; font-weight:800; color:var(--red); margin:12px 0;
}
.daily-theme { border-color:var(--gold) !important; }
.daily-theme .modal-fine { color:var(--gold); }

/* ════ RESPONSIVE ════ */
@media (max-width:720px) {
  #hud { flex-wrap:wrap; gap:8px; padding:8px 12px; }
  .hud-center { order:-1; width:100%; }
  .logo-title { font-size:18px; }
  .slots-layout { grid-template-columns:1fr; }
  .slot-paytable { display:none; }
  .empire-stats { grid-template-columns:repeat(3,1fr); }
  .horse-pick-grid { grid-template-columns:repeat(4,1fr); }
}
@media (max-width:500px) {
  #main-content { padding:12px 8px; }
  .panel-header h2 { font-size:18px; }
  .scratch-active-zone { grid-template-columns:1fr; }
  .tier-btn { padding:5px 10px; font-size:11px; }
}
