:root {
  --bg: #0a0611;
  --panel: rgba(18, 10, 28, 0.74);
  --panel-2: rgba(32, 18, 48, 0.7);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --text: #f4ecff;
  --muted: #a99bbd;
  --pink: #ff2e88;
  --green: #39ff88;
  --gold: #ffc83d;
  --cyan: #2ee6ff;
  --red: #ff4d4d;
  --radius: 16px;
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.8);
  --font: 'Inter', system-ui, sans-serif;
  --display: 'Bebas Neue', 'Impact', sans-serif;
  --tag: 'Permanent Marker', cursive;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; color: inherit; }
.hidden { display: none !important; }

/* ---------- Fond ---------- */
.bg {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(255, 46, 136, 0.25), transparent 60%),
    linear-gradient(180deg, rgba(10, 6, 17, 0.55) 0%, rgba(10, 6, 17, 0.88) 55%, rgba(10, 6, 17, 0.97) 100%),
    url('/assets/bg.jpg') center top / cover no-repeat;
  animation: bgDrift 60s ease-in-out infinite alternate;
}
@keyframes bgDrift { from { background-position: center, center, 50% 0%; } to { background-position: center, center, 50% 20%; } }
.grain {
  position: fixed; inset: -50%; z-index: -1; pointer-events: none; opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain { 0%,100% { transform: translate(0,0); } 20% { transform: translate(-3%,2%); } 40% { transform: translate(2%,-3%); } 60% { transform: translate(-2%,-1%); } 80% { transform: translate(3%,3%); } }

/* ---------- Logo ---------- */
.logo { display: inline-flex; flex-direction: column; align-items: center; line-height: 0.85; user-select: none; }
.logo-top {
  font-family: var(--tag); color: var(--gold); font-size: 28px; transform: rotate(-4deg) translateY(10px);
  text-shadow: 0 0 18px rgba(255, 200, 61, 0.6); z-index: 1;
}
.logo-main {
  font-family: var(--display); font-size: 120px; letter-spacing: 4px;
  background: linear-gradient(180deg, #fff 0%, #ffd1e8 40%, var(--pink) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px rgba(255, 46, 136, 0.55)) drop-shadow(4px 4px 0 #000);
}
.logo-tag {
  font-family: var(--display); letter-spacing: 10px; font-size: 22px; color: var(--green);
  background: #000; padding: 4px 14px 2px; transform: skew(-10deg); margin-top: 6px;
  box-shadow: 0 0 20px rgba(57, 255, 136, 0.4);
}
.logo-sm .logo-top { font-size: 15px; transform: rotate(-4deg) translateY(5px); }
.logo-sm .logo-main { font-size: 40px; letter-spacing: 2px; }

/* ---------- Auth ---------- */
.screen { min-height: 100vh; }
.auth-wrap { max-width: 900px; margin: 0 auto; padding: 48px 20px 30px; display: flex; flex-direction: column; align-items: center; gap: 28px; }
.hero { text-align: center; }
.hero-sub { color: var(--muted); font-size: 16px; margin: 18px 0 0; }
.parrains { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; width: 100%; }
.parrain {
  display: flex; gap: 16px; align-items: center; padding: 14px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(10px);
  box-shadow: var(--shadow); transition: transform 0.25s;
}
.parrain:hover { transform: translateY(-3px) rotate(-0.5deg); }
.parrain img { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; flex-shrink: 0; }
.parrain.hasheur { border-color: rgba(255, 200, 61, 0.35); }
.parrain.hasheur img { box-shadow: 0 0 0 2px var(--gold), 0 0 24px rgba(255, 200, 61, 0.4); }
.parrain.eric { border-color: rgba(57, 255, 136, 0.35); }
.parrain.eric img { box-shadow: 0 0 0 2px var(--green), 0 0 24px rgba(57, 255, 136, 0.4); }
.parrain-role { font-family: var(--tag); font-size: 13px; color: var(--muted); }
.parrain-name { font-family: var(--display); font-size: 32px; letter-spacing: 1px; line-height: 1; }
.parrain.hasheur .parrain-name { color: var(--gold); }
.parrain.eric .parrain-name { color: var(--green); }
.parrain blockquote { margin: 6px 0 0; font-style: italic; color: #e2d6f3; }

.auth-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 14px; padding: 22px; }
.auth-card label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.disclaimer { color: var(--muted); font-size: 12px; opacity: 0.7; text-align: center; }
.error { color: var(--red); min-height: 1em; margin: 0; font-weight: 600; text-align: center; }

input[type='text'], input[type='password'], input[type='number'], input:not([type]) {
  background: rgba(0, 0, 0, 0.45); border: 1px solid var(--line-2); border-radius: 10px;
  padding: 11px 13px; outline: none; transition: border-color 0.2s, box-shadow 0.2s; width: 100%;
}
input:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(255, 46, 136, 0.2); }
input[type='number'] { -moz-appearance: textfield; font-family: var(--mono); }
input[type='number']::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ---------- Boutons ---------- */
.btn {
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.05); border-radius: 10px;
  padding: 8px 14px; font-weight: 700; transition: transform 0.1s, background 0.2s, box-shadow 0.2s, opacity 0.2s;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); }
.btn:active:not(:disabled) { transform: scale(0.96); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--pink), #b5179e); border-color: transparent; box-shadow: 0 8px 24px -8px rgba(255, 46, 136, 0.8); }
.btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, #ff5aa0, #c81fae); }
.btn-buy { background: rgba(57, 255, 136, 0.12); border-color: rgba(57, 255, 136, 0.4); color: var(--green); }
.btn-buy:hover:not(:disabled) { background: rgba(57, 255, 136, 0.22); }
.btn-sell { background: rgba(255, 46, 136, 0.12); border-color: rgba(255, 46, 136, 0.4); color: #ff7ab5; }
.btn-sell:hover:not(:disabled) { background: rgba(255, 46, 136, 0.22); }
.btn-gold { background: linear-gradient(135deg, var(--gold), #ff8a00); color: #1a0d00; border-color: transparent; }
.btn-danger { background: linear-gradient(135deg, #ff3d3d, #a1001f); border-color: transparent; box-shadow: 0 6px 20px -8px rgba(255, 61, 61, 0.9); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn-lg { padding: 13px 18px; font-size: 16px; font-family: var(--display); letter-spacing: 2px; font-weight: 400; }

/* ---------- Cards ---------- */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; backdrop-filter: blur(14px) saturate(1.2); box-shadow: var(--shadow);
}
.card-title {
  margin: 0 0 12px; font-family: var(--display); font-weight: 400; letter-spacing: 1.5px; font-size: 22px;
  display: flex; align-items: center; gap: 8px;
}
.card-title small { font-family: var(--font); font-size: 12px; color: var(--muted); letter-spacing: 0; margin-left: auto; }

.tabs { display: flex; gap: 6px; background: rgba(0, 0, 0, 0.35); padding: 4px; border-radius: 12px; }
.tab { flex: 1; border: 0; background: transparent; padding: 9px 10px; border-radius: 9px; font-weight: 700; color: var(--muted); transition: all 0.2s; }
.tab.active { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }
.tabs.small .tab { padding: 6px 8px; font-size: 12px; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 8px 20px;
  background: rgba(10, 6, 17, 0.8); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line);
}
.stats { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.stat {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); font-weight: 700;
}
.stat .lbl { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 600; }
.stat .val { font-family: var(--mono); }
.stat.cash .val { color: var(--green); }
.stat.bank .val { color: var(--cyan); }
.stat.flash { animation: flash 0.6s; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(255, 200, 61, 0.9); } 100% { box-shadow: 0 0 0 12px rgba(255, 200, 61, 0); } }
.hearts { letter-spacing: 1px; }
.topbar-right { display: flex; align-items: center; gap: 10px; }
.price-timer { font-size: 12px; color: var(--muted); padding: 6px 12px; border-radius: 999px; border: 1px dashed var(--line-2); }
.price-timer strong { color: var(--gold); font-family: var(--mono); }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: 300px minmax(0, 1fr) 330px; gap: 16px; padding: 16px 20px 40px; max-width: 1500px; margin: 0 auto; }
.col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* ---------- Carte ---------- */
.map { display: flex; flex-direction: column; gap: 12px; }
.tier { position: relative; padding-left: 12px; }
.tier::before { content: ''; position: absolute; left: 0; top: 4px; bottom: 4px; width: 3px; border-radius: 3px; background: var(--tc); box-shadow: 0 0 10px var(--tc); }
.tier-name { font-family: var(--display); letter-spacing: 2px; color: var(--tc); font-size: 15px; margin-bottom: 6px; display: flex; justify-content: space-between; }
.tier-name small { font-family: var(--font); color: var(--muted); letter-spacing: 0; font-size: 11px; }
.cities { display: flex; flex-direction: column; gap: 6px; }
.city-btn {
  display: flex; align-items: center; gap: 10px; text-align: left; width: 100%; padding: 9px 11px;
  border-radius: 11px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); transition: all 0.2s;
}
.city-btn:hover:not(:disabled) { border-color: var(--tc); background: rgba(255, 255, 255, 0.07); transform: translateX(3px); }
.city-btn:disabled { cursor: default; }
.city-btn .cn { flex: 1; font-weight: 700; font-size: 13px; }
.city-btn .meta { font-size: 11px; color: var(--muted); font-family: var(--mono); text-align: right; }
.city-btn.here { border-color: var(--tc); background: linear-gradient(90deg, color-mix(in srgb, var(--tc) 22%, transparent), transparent); box-shadow: inset 0 0 0 1px var(--tc); }
.city-btn.here .cn::after { content: ' • ICI'; color: var(--tc); font-size: 10px; letter-spacing: 1px; }
.city-btn.dest { border-style: dashed; border-color: var(--gold); }
.pcount { display: inline-flex; align-items: center; gap: 3px; }

/* ---------- Ville ---------- */
.city-header { position: relative; overflow: hidden; padding: 20px 22px; }
.city-header::after {
  content: ''; position: absolute; right: -40px; top: -40px; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, var(--tc), transparent 70%); opacity: 0.3;
}
.city-tier { font-family: var(--tag); color: var(--tc); font-size: 14px; }
.city-name { font-family: var(--display); font-size: 52px; line-height: 0.95; letter-spacing: 2px; margin: 2px 0 6px; text-shadow: 3px 3px 0 #000; }
.city-tag { color: var(--muted); font-style: italic; margin: 0; }

/* Marché */
.market { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.market th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 600; padding: 0 8px; }
.market td { padding: 9px 8px; background: rgba(255, 255, 255, 0.03); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.market td:first-child { border-left: 1px solid var(--line); border-radius: 10px 0 0 10px; }
.market td:last-child { border-right: 1px solid var(--line); border-radius: 0 10px 10px 0; }
.market tr:hover td { background: rgba(255, 255, 255, 0.06); }
.drug { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.drug .emo { font-size: 22px; width: 34px; height: 34px; display: grid; place-items: center; background: rgba(0, 0, 0, 0.35); border-radius: 9px; }
.drug small { display: block; font-weight: 500; color: var(--muted); font-size: 11px; }
.price { font-family: var(--mono); font-weight: 700; font-size: 15px; }
.delta { font-family: var(--mono); font-size: 11px; display: block; }
.delta.cheap { color: var(--green); }
.delta.pricey { color: var(--pink); }
.badge { display: inline-block; font-size: 9px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; margin-left: 4px; vertical-align: middle; }
.badge.up { background: var(--pink); color: #fff; }
.badge.down { background: var(--green); color: #002a12; }
.owned { font-family: var(--mono); color: var(--gold); font-weight: 700; }
.trade { display: flex; gap: 5px; align-items: center; justify-content: flex-end; }
.trade input { width: 64px; padding: 6px 8px; text-align: center; border-radius: 8px; }
.max-btns { display: flex; flex-direction: column; gap: 2px; }
.max-btns .btn { padding: 1px 6px; font-size: 9px; border-radius: 5px; }

/* Voyage */
.travel-card { text-align: center; padding: 26px 10px; }
.travel-card .road { font-size: 40px; display: inline-block; animation: drive 1.2s ease-in-out infinite alternate; }
@keyframes drive { from { transform: translateX(-30px) rotate(-2deg); } to { transform: translateX(30px) rotate(2deg); } }
.travel-card h3 { font-family: var(--display); font-weight: 400; font-size: 34px; letter-spacing: 2px; margin: 10px 0 4px; }
.progress { height: 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.5); overflow: hidden; margin: 18px auto 8px; max-width: 480px; border: 1px solid var(--line); }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--pink), var(--gold)); box-shadow: 0 0 20px var(--pink); transition: width 0.5s linear; }
.countdown-big { font-family: var(--mono); font-size: 28px; color: var(--gold); }
.quote-box {
  display: flex; gap: 12px; align-items: center; text-align: left; max-width: 480px; margin: 18px auto 0;
  padding: 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 200, 61, 0.3);
}
.quote-box img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.quote-box.eric { border-color: rgba(57, 255, 136, 0.3); }
.quote-box b { font-family: var(--display); letter-spacing: 1px; font-weight: 400; font-size: 16px; display: block; }
.quote-box i { color: #e2d6f3; }

/* Quartier */
.hood { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.thug { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.thug .av { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-family: var(--display); font-size: 20px; color: #000; flex-shrink: 0; }
.thug .info { flex: 1; min-width: 0; }
.thug .nm { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thug .sub { font-size: 11px; color: var(--muted); }
.empty { color: var(--muted); text-align: center; padding: 14px; font-style: italic; }

/* Matos */
.gear { display: flex; flex-direction: column; gap: 8px; }
.gear-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); }
.gear-row .ic { font-size: 20px; width: 28px; text-align: center; }
.gear-row .tx { flex: 1; }
.gear-row .tx small { display: block; color: var(--muted); font-size: 11px; }
.gear-row .num { font-family: var(--mono); font-weight: 700; color: var(--gold); }
.inv-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.inv-chip { font-size: 12px; padding: 4px 8px; border-radius: 999px; background: rgba(255, 200, 61, 0.1); border: 1px solid rgba(255, 200, 61, 0.3); font-family: var(--mono); }
.inv-chip.nosell { opacity: 0.45; }
.capbar { height: 6px; border-radius: 6px; background: rgba(0, 0, 0, 0.5); overflow: hidden; margin-top: 6px; }
.capbar > div { height: 100%; background: linear-gradient(90deg, var(--green), var(--gold), var(--pink)); background-size: 300% 100%; }

/* Boss buttons */
.boss-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.boss-btn {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: stretch; padding: 0;
  border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--panel); text-align: left;
  transition: transform 0.2s, box-shadow 0.2s;
}
.boss-btn img { width: 100%; aspect-ratio: 1.25; object-fit: cover; object-position: top; transition: transform 0.4s; }
.boss-btn span { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 12px 10px; font-family: var(--display); font-size: 24px; letter-spacing: 1px; line-height: 1; background: linear-gradient(transparent, rgba(0, 0, 0, 0.92)); }
.boss-btn small { display: block; font-family: var(--tag); font-size: 12px; letter-spacing: 0; margin-bottom: 2px; }
.boss-btn.hasheur small { color: var(--gold); }
.boss-btn.eric small { color: var(--green); }
.boss-btn:hover { transform: translateY(-3px); }
.boss-btn:hover img { transform: scale(1.06); }
.boss-btn.hasheur:hover { box-shadow: 0 0 0 1px var(--gold), 0 14px 40px -10px rgba(255, 200, 61, 0.6); }
.boss-btn.eric:hover { box-shadow: 0 0 0 1px var(--green), 0 14px 40px -10px rgba(57, 255, 136, 0.6); }

/* Feed */
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; }
.feed li { display: flex; gap: 8px; font-size: 12.5px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.03); border-left: 3px solid var(--line-2); animation: slideIn 0.35s ease-out; }
.feed li.kill { border-left-color: var(--green); background: rgba(57, 255, 136, 0.05); }
.feed li.news { border-left-color: var(--cyan); }
.feed li.system { border-left-color: var(--gold); }
.feed img { width: 26px; height: 26px; border-radius: 7px; object-fit: cover; flex-shrink: 0; }
.feed .ic { width: 26px; text-align: center; font-size: 16px; flex-shrink: 0; }
.feed time { display: block; color: var(--muted); font-size: 10px; font-family: var(--mono); }
@keyframes slideIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

.leaderboard { list-style: none; margin: 10px 0 0; padding: 0; counter-reset: lb; display: flex; flex-direction: column; gap: 4px; }
.leaderboard li { counter-increment: lb; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; background: rgba(255, 255, 255, 0.03); }
.leaderboard li::before { content: counter(lb); font-family: var(--display); font-size: 18px; width: 20px; color: var(--muted); }
.leaderboard li:nth-child(1)::before { color: var(--gold); }
.leaderboard li:nth-child(2)::before { color: #d7d7e0; }
.leaderboard li:nth-child(3)::before { color: #e09a5a; }
.leaderboard li.me { box-shadow: inset 0 0 0 1px var(--pink); }
.leaderboard .nm { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.leaderboard .v { font-family: var(--mono); font-size: 12px; color: var(--green); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5, 2, 10, 0.75); backdrop-filter: blur(6px); animation: fade 0.2s; }
.modal-box {
  position: relative; width: min(720px, 100%); max-height: calc(100vh - 40px); overflow-y: auto;
  background: linear-gradient(180deg, rgba(36, 20, 52, 0.97), rgba(14, 8, 22, 0.98));
  border: 1px solid var(--line-2); border-radius: 20px; padding: 24px; box-shadow: 0 40px 100px -20px #000;
  animation: pop 0.25s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.modal-close { position: absolute; top: 12px; right: 12px; border: 0; background: rgba(255, 255, 255, 0.06); width: 32px; height: 32px; border-radius: 50%; z-index: 2; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.92) translateY(10px); } }

.modal-head { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.modal-head img { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; }
.modal-head h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 38px; letter-spacing: 2px; line-height: 1; }
.modal-head p { margin: 4px 0 0; color: var(--muted); font-style: italic; }
.modal-head.hasheur h2 { color: var(--gold); }
.modal-head.eric h2 { color: var(--green); }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 14px; }
.item {
  display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); transition: border-color 0.2s, transform 0.2s;
}
.item:hover { border-color: var(--line-2); transform: translateY(-2px); }
.item.owned { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.item .emo { font-size: 32px; }
.item .nm { font-weight: 800; }
.item .st { font-size: 12px; color: var(--muted); }
.item .pr { font-family: var(--mono); color: var(--gold); font-weight: 700; margin-top: auto; }
.row { display: flex; gap: 8px; align-items: center; }
.row > input { flex: 1; }

.bank-balances { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.balance { padding: 16px; border-radius: 14px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); }
.balance .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.balance .amt { font-family: var(--mono); font-size: 24px; font-weight: 700; }
.balance.c .amt { color: var(--green); }
.balance.b .amt { color: var(--cyan); }
.bank-ops { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bank-ops h4 { margin: 0 0 8px; font-family: var(--display); font-weight: 400; letter-spacing: 1px; font-size: 18px; }
.quick { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }

/* Combat */
.fight-title { text-align: center; font-family: var(--display); font-size: 44px; letter-spacing: 3px; margin: 0; line-height: 1; }
.fight-vs { display: flex; justify-content: center; align-items: center; gap: 16px; margin: 10px 0 16px; font-weight: 800; }
.fight-vs .vs { font-family: var(--tag); color: var(--pink); font-size: 22px; }
.rolls { display: flex; flex-direction: column; gap: 6px; max-width: 380px; margin: 0 auto; }
.roll { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 6px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.03); opacity: 0; animation: rollIn 0.35s forwards; }
.roll.hit { background: rgba(255, 46, 136, 0.12); }
.roll .res { font-size: 12px; font-weight: 800; text-align: center; min-width: 70px; }
.roll.hit .res { color: var(--pink); }
.roll .res.miss { color: var(--muted); }
.die {
  width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; font-family: var(--mono); font-weight: 800; font-size: 20px;
  background: #fff; color: #111; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25), 0 4px 10px rgba(0, 0, 0, 0.5); justify-self: end;
}
.die.def { background: #222; color: #fff; justify-self: start; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.5), 0 0 0 1px var(--line-2); }
.roll.hit .die:not(.def) { background: var(--pink); color: #fff; }
@keyframes rollIn { from { opacity: 0; transform: scale(0.6) rotate(-8deg); } to { opacity: 1; transform: none; } }
.fight-outcome { text-align: center; margin-top: 16px; opacity: 0; animation: fade 0.4s reverse forwards; }
.fight-outcome.show { animation: rollIn 0.4s forwards; }
.wasted {
  font-family: var(--display); font-size: 96px; letter-spacing: 6px; color: #ff3d3d; text-align: center; line-height: 1;
  text-shadow: 0 0 30px rgba(255, 0, 0, 0.6), 4px 4px 0 #000; animation: wasted 1.4s ease-out;
}
@keyframes wasted { 0% { opacity: 0; transform: scale(2.2); filter: blur(8px); } 60% { opacity: 1; transform: scale(1); filter: none; } }
.tally { font-family: var(--tag); color: var(--green); font-size: 26px; text-align: center; margin: 6px 0; }

/* Toasts */
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  padding: 10px 16px; border-radius: 12px; background: rgba(20, 12, 30, 0.95); border: 1px solid var(--line-2);
  box-shadow: var(--shadow); font-weight: 600; animation: toastIn 0.3s ease-out; max-width: 90vw;
}
.toast.err { border-color: var(--red); color: #ffb3b3; }
.toast.ok { border-color: var(--green); }
.toast.warn { border-color: var(--gold); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .layout { grid-template-columns: 280px minmax(0, 1fr); }
  .col-right { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: start; }
}
@media (max-width: 820px) {
  .logo-main { font-size: 72px; }
  .layout { grid-template-columns: 1fr; padding: 12px; }
  .col-right { display: flex; }
  .col-center { order: -1; }
  .parrains { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
  .topbar .logo-sm { display: none; }
  .stats { order: 2; width: 100%; }
  .stat { padding: 4px 9px; }
  .city-name { font-size: 38px; }
  .market th:nth-child(3), .market td:nth-child(3) { display: none; }
  .bank-ops { grid-template-columns: 1fr; }
  .wasted { font-size: 64px; }
}
