:root {
  --bg: #070605;
  --bg-elev: #0e0b09;
  --panel: rgba(16, 12, 10, 0.84);
  --panel-solid: #120e0b;
  --panel-hover: rgba(26, 20, 16, 0.94);
  --ink: #efe6d5;
  --ink-soft: #cbbda6;
  --mute: #8d7f6a;
  --line: rgba(212, 168, 83, 0.18);
  --line-strong: rgba(212, 168, 83, 0.38);
  --brass: #d4a853;
  --brass-bright: #f2cf7e;
  --brass-dim: rgba(212, 168, 83, 0.14);
  --blood: #b8292f;
  --blood-bright: #e6464d;
  --blood-dim: rgba(184, 41, 47, 0.18);
  --cash: #52a368;
  --cash-bright: #7bd693;
  --cash-dim: rgba(82, 163, 104, 0.16);
  --btn: linear-gradient(180deg, #e0b863 0%, #b88b35 100%);
  --btn-hover: linear-gradient(180deg, #edd085 0%, #cfa042 100%);
  --btnink: #120c07;
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.78);
  --shadow-card: 0 10px 28px rgba(0, 0, 0, 0.55);
  --font-display: "Cinzel", Georgia, serif;
  --font-serif: "Playfair Display", Georgia, serif;
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  color-scheme: dark;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 14.5px/1.55 var(--font-sans);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(10, 8, 6, 0.8); }
::-webkit-scrollbar-thumb { background: rgba(212, 168, 83, 0.32); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--brass); }

/* Atmospheric Noir Backdrop */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(ellipse 65% 75% at 80% 38%, rgba(190, 108, 32, 0.24), transparent 68%),
    radial-gradient(ellipse 55% 65% at 10% 95%, rgba(135, 22, 28, 0.22), transparent 65%),
    linear-gradient(180deg, #050403 0%, #0b0806 50%, #060403 100%);
}

.hero {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  aspect-ratio: 880 / 1530;
  background-image: url(hero.jpg);
  background-size: cover;
  background-position: center;
  filter: contrast(1.12) brightness(0.86) saturate(0.85);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.45) 18%, #000 42%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,0.45) 18%, #000 42%);
}

@media (max-aspect-ratio: 4/5) {
  .hero {
    left: 0;
    aspect-ratio: auto;
    background-position: center top;
    opacity: 0.45;
    -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 95%);
    mask-image: linear-gradient(180deg, #000 30%, transparent 95%);
  }
}

.vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 62% 45%, transparent 25%, rgba(4, 3, 2, 0.88) 95%),
    linear-gradient(90deg, rgba(6, 5, 4, 0.92) 0%, rgba(6, 5, 4, 0.42) 55%, rgba(6, 5, 4, 0.25) 100%);
  pointer-events: none;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.045;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

#smoke {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* Main Container */
.wrap {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  padding: 22px 20px 44px;
}

/* Masthead / Header */
.masthead {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.masthead::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 140px;
  height: 2px;
  background: linear-gradient(90deg, var(--brass), transparent);
}

.eyebrow {
  font: 600 10.5px/1 var(--font-mono);
  letter-spacing: 2.6px;
  color: var(--brass);
  text-transform: uppercase;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--brass);
}

h1 {
  font: 800 clamp(30px, 5.5vw, 48px)/1.02 var(--font-display);
  margin: 0;
  letter-spacing: 2px;
  background: linear-gradient(180deg, #fff5dc 0%, #d4a853 62%, #8f6822 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 22px rgba(212, 168, 83, 0.28));
}

.sub {
  color: var(--ink-soft);
  margin: 6px 0 0;
  font-size: 13.5px;
  max-width: 560px;
}

.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-soft);
  border-color: var(--line-strong);
  background: rgba(14, 11, 9, 0.72);
}

.btn-logout:hover {
  border-color: var(--blood-bright);
  color: #fff;
  background: var(--blood-dim);
}

.dot-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cash-bright);
  box-shadow: 0 0 8px var(--cash-bright);
}

/* HUD & Player Dossier Strip */
.hud-area { margin-bottom: 16px; }

.dossier-head {
  background: linear-gradient(135deg, rgba(24, 18, 14, 0.92) 0%, rgba(13, 10, 8, 0.88) 100%);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--brass);
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: 12px;
}

.dossier-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.rank-emblem {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: radial-gradient(circle at 30% 30%, rgba(212, 168, 83, 0.28), rgba(212, 168, 83, 0.06));
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 0 12px rgba(212, 168, 83, 0.15);
}

.rank {
  font: 700 20px/1.15 var(--font-display);
  color: var(--ink);
  letter-spacing: 0.5px;
}

.rank-title {
  color: var(--brass-bright);
  font-weight: 600;
}

.rank-progress-text {
  font: 500 12px var(--font-mono);
  color: var(--mute);
}

.rank-progress-text em {
  font-style: normal;
  color: var(--ink-soft);
}

.rbar {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(212, 168, 83, 0.16);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 10px;
}

.rbar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #9c7225, var(--brass), var(--brass-bright));
  box-shadow: 0 0 12px rgba(212, 168, 83, 0.5);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Stat Cards */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 9px;
  margin: 0 0 12px;
}

.st {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.2s, transform 0.2s;
}

.st:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.st b {
  display: flex;
  align-items: center;
  gap: 5px;
  font: 600 11px/1.2 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--mute);
  margin-bottom: 5px;
}

.st span {
  display: block;
  font: 600 17px/1.15 var(--font-mono);
  color: var(--ink);
  letter-spacing: -0.3px;
}

.st.st-cash span { color: var(--cash-bright); }
.st.st-heat span { color: var(--blood-bright); }
.st.st-resp span { color: var(--brass-bright); }

.bar {
  height: 5px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 99px;
  margin-top: 7px;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  transition: width 0.35s ease;
}

/* Navigation Tabs */
.tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  margin-bottom: 12px;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tabs button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(18, 14, 11, 0.78);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  padding: 9px 15px;
  border-radius: 6px;
  font: 600 13px/1 var(--font-sans);
  letter-spacing: 0.2px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.18s ease;
}

.tabs button:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: rgba(32, 24, 18, 0.9);
}

.tabs button[aria-selected="true"] {
  background: linear-gradient(180deg, rgba(212, 168, 83, 0.24) 0%, rgba(212, 168, 83, 0.1) 100%);
  color: var(--brass-bright);
  border-color: var(--brass);
  box-shadow: 0 0 18px rgba(212, 168, 83, 0.18), inset 0 1px 0 rgba(255, 245, 210, 0.2);
}

/* Grid & Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(275px, 1fr));
  gap: 12px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 1px solid rgba(212, 168, 83, 0.26);
  border-radius: 8px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  position: relative;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--panel-hover);
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 2.5px;
  background: var(--brass);
  border-radius: 0 2px 2px 0;
  opacity: 0.75;
}

.card.card-danger::before { background: var(--blood-bright); }
.card.card-success::before { background: var(--cash-bright); }

.card h3 {
  margin: 0;
  font: 700 15.5px/1.25 var(--font-sans);
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.ic {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: radial-gradient(circle at 30% 30%, rgba(212, 168, 83, 0.22), rgba(212, 168, 83, 0.05));
  border: 1px solid var(--line-strong);
  font-style: normal;
  font-size: 18px;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.meta {
  color: var(--mute);
  font-size: 13px;
  line-height: 1.5;
}

.meta em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.pill {
  font: 500 11.5px/1 var(--font-mono);
  padding: 5px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--ink-soft);
}

.pill.gold { color: var(--brass-bright); border-color: rgba(212, 168, 83, 0.25); background: rgba(212, 168, 83, 0.08); }
.pill.green { color: var(--cash-bright); border-color: rgba(82, 163, 104, 0.28); background: rgba(82, 163, 104, 0.08); }
.pill.red { color: var(--blood-bright); border-color: rgba(184, 41, 47, 0.3); background: rgba(184, 41, 47, 0.1); }

/* Buttons & Form Inputs */
.go {
  background: var(--btn);
  color: var(--btnink);
  border: 1px solid rgba(255, 236, 179, 0.45);
  border-radius: 6px;
  padding: 10px 14px;
  font: 700 13.5px/1 var(--font-sans);
  letter-spacing: 0.3px;
  cursor: pointer;
  margin-top: auto;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  transition: all 0.16s ease;
}

.go:not(:disabled):hover {
  background: var(--btn-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(212, 168, 83, 0.28);
}

.go:not(:disabled):active { transform: translateY(0); }

.go:disabled {
  background: rgba(255, 255, 255, 0.06);
  color: var(--mute);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  cursor: not-allowed;
}

.go.btn-blood {
  background: linear-gradient(180deg, #cf363d 0%, #8f1d22 100%);
  color: #fff5f5;
  border-color: rgba(255, 140, 145, 0.35);
}

.go.btn-blood:not(:disabled):hover {
  background: linear-gradient(180deg, #e0434a 0%, #a8242a 100%);
  box-shadow: 0 6px 20px rgba(184, 41, 47, 0.35);
}

.ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 9px 14px;
  font: 600 13px/1 var(--font-sans);
  cursor: pointer;
  transition: all 0.16s ease;
}

.ghost:not(:disabled):hover {
  background: rgba(212, 168, 83, 0.12);
  border-color: var(--brass);
  color: var(--brass-bright);
}

.ghost:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--brass-bright);
  outline-offset: 2px;
}

input[type=text], input[type=password], input[type=number] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  background: rgba(9, 7, 6, 0.85);
  color: var(--ink);
  border-radius: 6px;
  font: 500 14px var(--font-sans);
  margin-top: 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type=number] { font-family: var(--font-mono); }

input:focus {
  border-color: var(--brass-bright);
  box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.14);
  outline: none;
}

.row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.row input[type=text] {
  flex: 1;
  min-width: 0;
  width: auto;
  margin-top: 0;
}

/* Auth Screen */
.auth-shell {
  max-width: 440px;
  margin: 26px auto;
  background: linear-gradient(160deg, rgba(22, 17, 13, 0.94) 0%, rgba(11, 8, 6, 0.92) 100%);
  border: 1px solid var(--line-strong);
  border-top: 2px solid var(--brass);
  border-radius: 10px;
  padding: 26px 24px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
}

.auth-shell h3 {
  font: 700 22px/1.2 var(--font-display);
  color: var(--brass-bright);
  margin: 0 0 6px;
  letter-spacing: 0.6px;
}

.auth-field {
  margin-top: 14px;
}

.auth-field label {
  display: block;
  font: 600 11px/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ink-soft);
}

/* Tables (Leaderboard & Admin) */
.scroll {
  overflow-x: auto;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  background: rgba(212, 168, 83, 0.08);
  color: var(--brass-bright);
  font: 600 11.5px/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 12px 12px;
  border-bottom: 1px solid var(--line-strong);
  text-align: left;
}

td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(212, 168, 83, 0.1);
  text-align: left;
  font-size: 14px;
}

tr:last-child td { border-bottom: 0; }
tr:hover td { background: rgba(255, 255, 255, 0.02); }
tr.me td {
  background: linear-gradient(90deg, rgba(212, 168, 83, 0.16), rgba(212, 168, 83, 0.05));
  font-weight: 600;
}

/* Notice & Police Cooldown Banner */
.note {
  background: linear-gradient(90deg, rgba(184, 41, 47, 0.22), rgba(20, 14, 12, 0.88));
  border: 1px solid rgba(230, 70, 77, 0.4);
  border-left: 4px solid var(--blood-bright);
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 13.5px;
  color: #fce8e8;
  backdrop-filter: blur(8px);
}

.cool {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding: 11px 15px;
  border: 1px solid rgba(230, 70, 77, 0.42);
  border-left: 4px solid var(--blood-bright);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(184, 41, 47, 0.2), rgba(16, 12, 10, 0.88));
  font: 600 13.5px var(--font-mono);
  color: #ffd6d8;
  backdrop-filter: blur(10px);
}

.cb {
  flex: 1;
  height: 6px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.cb i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blood), var(--blood-bright));
  box-shadow: 0 0 10px var(--blood-bright);
}

/* Chat Room */
.chat {
  background: rgba(12, 9, 7, 0.86);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 14px;
  height: 300px;
  overflow-y: auto;
  backdrop-filter: blur(12px);
  box-shadow: inset 0 2px 16px rgba(0, 0, 0, 0.6);
}

.chat p {
  margin: 0 0 8px;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
  border-left: 2px solid rgba(212, 168, 83, 0.35);
  font-size: 13.5px;
}

.chat b {
  color: var(--brass-bright);
  font-weight: 600;
}

/* Intelligence Dossier Log */
.dossier-log {
  margin-top: 22px;
  background: rgba(12, 9, 7, 0.88);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
}

.log-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px;
  background: rgba(212, 168, 83, 0.08);
  border-bottom: 1px solid var(--line);
  font: 600 11px/1 var(--font-mono);
  letter-spacing: 1.2px;
  color: var(--brass-bright);
}

.log-hdr span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blood-bright);
  box-shadow: 0 0 8px var(--blood-bright);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.log-tag {
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(184, 41, 47, 0.22);
  border: 1px solid rgba(230, 70, 77, 0.35);
  color: #ffb8bc;
  font-size: 10px;
}

.log {
  padding: 12px 14px;
  max-height: 210px;
  overflow-y: auto;
  font: 400 13px/1.5 var(--font-mono);
}

.log p {
  margin: 0 0 6px;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(212, 168, 83, 0.14);
}
.log p:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }

.ok { color: var(--cash-bright); }
.bad { color: var(--blood-bright); }
.inf { color: var(--brass-bright); }

/* Casino Picks & Roulette */
.pick {
  flex: 1;
  font-weight: 600;
  text-align: center;
}

.pick.on {
  background: linear-gradient(180deg, #e0b863 0%, #b88b35 100%);
  color: var(--btnink);
  border-color: var(--brass-bright);
  box-shadow: 0 0 14px rgba(212, 168, 83, 0.3);
}

.dice .pick { padding: 9px 0; font-family: var(--font-mono); }

.badge.lock {
  filter: grayscale(1);
  opacity: 0.42;
}

.rl {
  grid-column: 1 / -1;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  background: radial-gradient(circle at 22% 50%, rgba(47, 122, 69, 0.14), rgba(16, 12, 10, 0.9) 65%);
}

.wheelbox {
  position: relative;
  width: min(100%, 300px);
  aspect-ratio: 1;
  margin: 12px auto 6px;
  flex: none;
}

.ptr {
  position: absolute;
  left: 50%;
  top: -8px;
  margin-left: -9px;
  border: 9px solid transparent;
  border-top: 15px solid var(--brass-bright);
  border-bottom: 0;
  z-index: 3;
  filter: drop-shadow(0 3px 5px #000);
}

.wh, .bl { position: absolute; inset: 0; }
.wh svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 10px 22px #000c); }

.ballc {
  position: absolute;
  left: 50%;
  width: 4.4%;
  aspect-ratio: 1;
  margin-left: -2.2%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #e3dac7 55%, #7d7463);
  box-shadow: 0 2px 5px #000;
}

.hubr {
  position: absolute;
  inset: 36%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 700 clamp(20px, 6vw, 30px) var(--font-display);
  color: #fff;
  z-index: 2;
  border: 2px solid var(--brass-bright);
  background: #140f0c;
  box-shadow: 0 0 18px #000d, inset 0 0 10px rgba(212, 168, 83, 0.25);
}

.hubr.rd, .chip.rd { background: #a8242a; }
.hubr.bk, .chip.bk { background: #17110e; }
.hubr.gr, .chip.gr { background: #266b3b; }

.rctl {
  flex: 1;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rtypes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.rtypes .pick { padding: 9px 4px; font-size: 12.5px; }

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

.chip {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font: 600 12px var(--font-mono);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

/* Toast Notifications */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  translate: -50% 0;
  max-width: min(92vw, 440px);
  padding: 12px 18px;
  border-radius: 8px;
  background: rgba(18, 14, 11, 0.95);
  border: 1px solid var(--line-strong);
  border-left: 4px solid var(--brass-bright);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.85);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  z-index: 60;
  animation: toast 3.2s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  backdrop-filter: blur(12px);
}

.toast.ok { border-left-color: var(--cash-bright); }
.toast.bad { border-left-color: var(--blood-bright); }

@keyframes toast {
  0% { opacity: 0; transform: translateY(14px) scale(0.97); }
  12%, 85% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(6px); }
}

@media (prefers-reduced-motion: reduce) {
  .toast, .pulse { animation: none; }
}

/* ---- Bölge haritası ve oyuncu renkleri ---- */
.pn { color: var(--pc); font-weight: 600; text-shadow: 0 0 12px color-mix(in srgb, var(--pc) 45%, transparent); }
.mapstage { position: relative; }
.mapbox { border: 1px solid var(--line-strong); border-radius: 10px; overflow-x: auto; overflow-y: hidden; background: #06100f; box-shadow: var(--shadow-card); }
.mapbox svg { display: block; width: 100%; height: auto; }
.mapcard { position: absolute; top: 14px; left: 14px; width: min(280px, 27%); min-width: 215px; z-index: 2; background: rgba(12, 9, 7, .9); backdrop-filter: blur(8px); }
.mapcard h3 { font-size: 15px; }
.mapbox text { paint-order: stroke; stroke: #050403; stroke-width: 4px; stroke-linejoin: round; text-anchor: middle; pointer-events: none; }
.mp-i { font-size: 36px; stroke-width: 0 !important; }
.mp-n { font: 700 22px var(--font-display); fill: var(--ink); }
.mp-o { font: 700 19px var(--font-sans); }
.mp-o.free { fill: #8d7f6a; font-size: 15px; letter-spacing: .14em; }
.mp-p { font: 600 17px var(--font-mono); fill: var(--brass-bright); }
.mp-p.cash { fill: var(--cash-bright); }
.mapbox .mp-t { font: 600 13px var(--font-mono); letter-spacing: .2em; fill: rgba(212, 168, 83, .6); stroke-width: 3px; text-anchor: start; }
.dg { cursor: pointer; }
.dg:hover .base { stroke-width: 5; stroke-opacity: 1; }
.dg.sel { filter: drop-shadow(0 0 9px rgba(242, 207, 126, .65)); }
.dg.sel .base { stroke: #fff4d6; stroke-opacity: 1; stroke-width: 4; stroke-dasharray: none; }
.ants { fill: none; stroke: #f2cf7e; stroke-width: 3; stroke-dasharray: 12 8; animation: ants 1.6s linear infinite; pointer-events: none; }
@keyframes ants { to { stroke-dashoffset: -40; } }
.wave { animation: drift 14s linear infinite; }
@keyframes drift { to { transform: translateX(-60px); } }
.legend { display: flex; flex-wrap: wrap; gap: 8px; }
.lg { display: inline-flex; align-items: center; gap: 8px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); font-size: 12.5px; color: var(--ink-soft); }
.lg i { width: 10px; height: 10px; border-radius: 50%; background: var(--pc); box-shadow: 0 0 8px var(--pc); flex: none; }
.card.card-owner::before { background: var(--pc); }
@media (max-width: 860px) {
  .mapbox svg { width: 800px; max-width: none; }
  .mapcard { position: static; width: auto; min-width: 0; margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) { .wave, .ants { animation: none; } }

/* ---- Ana menü: kaydırma yok, hepsi sığar ---- */
.tabs { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px; overflow: visible; padding: 4px 0 10px; }
.tabs button { flex: none; justify-content: center; gap: 6px; padding: 10px 4px; min-width: 0; white-space: nowrap; font-size: 12.5px; }
.tabs button i { font-style: normal; font-size: 14px; line-height: 1; }
@media (max-width: 900px) {
  .tabs { display: flex; flex-wrap: wrap; }
  .tabs button { flex: 1 1 calc(20% - 6px); flex-direction: column; gap: 5px; padding: 8px 2px; font-size: 10.5px; }
  .tabs button i { font-size: 19px; }
}

/* ---- Bölge fotoğrafları ---- */
.dph{filter:saturate(1.05) contrast(1.05);transition:filter .25s}
.dg.free .dph{filter:grayscale(.55) brightness(.8) contrast(1.05)}
.dg .shade{transition:fill-opacity .25s;pointer-events:none}
.dg.ph:hover .shade,.dg.ph.sel .shade{fill-opacity:.1}
.dg.ph.free:hover .dph,.dg.ph.free.sel .dph{filter:grayscale(.1) brightness(1)}
.dg.ph:hover .ring{stroke-width:5;stroke-opacity:1}
.dg.sel .ring{stroke:#fff4d6;stroke-opacity:1;stroke-width:4;stroke-dasharray:none}
.dg.ph .base{stroke:none}
.plate{fill:rgba(6,4,3,.5);stroke:rgba(212,168,83,.25);stroke-width:1;pointer-events:none}
.mapcard{overflow:hidden}
.mphoto{position:relative;height:130px;margin:-15px -15px 6px;background-size:cover;background-position:center;border-bottom:1px solid var(--line-strong)}
.mphoto::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 40%,rgba(10,7,5,.92))}
.mphoto span{position:absolute;left:14px;bottom:8px;z-index:1;font:700 13px var(--font-mono);letter-spacing:.18em;text-transform:uppercase;color:var(--brass-bright);text-shadow:0 1px 6px #000}

/* Fotoğrafları haritanın tonuna oturtma: luminosity ile kahve/oyuncu rengine boyanır */
.dph{mix-blend-mode:luminosity;opacity:.9;filter:brightness(.82) contrast(1.05)}
.dg.free .dph{filter:brightness(.66) contrast(1.1)}
.dg.ph:hover .dph,.dg.ph.sel .dph{mix-blend-mode:normal;opacity:1;filter:brightness(.8) saturate(.85)}
.dg.ph .vig{pointer-events:none}
.lshade{pointer-events:none}

/* ---- 3D harita ---- */
.m3d{position:relative;border:1px solid var(--line-strong);border-radius:10px;overflow:hidden;background:#040b0c;box-shadow:var(--shadow-card)}
.m3root{position:relative;width:100%;height:clamp(460px,68vh,700px);cursor:grab}
.m3root:active{cursor:grabbing}
.m3cv{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none}
.m3lab{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.m3l{position:absolute;left:0;top:0;transform-origin:50% 100%;pointer-events:auto;cursor:pointer;display:grid;justify-items:center;gap:1px;padding:3px 9px 4px;border-radius:8px;background:rgba(8,6,4,.5);border:1px solid color-mix(in srgb,var(--pc) 55%,transparent);backdrop-filter:blur(3px);white-space:nowrap;text-shadow:0 1px 4px #000}
.m3l::after{content:"";position:absolute;left:50%;bottom:-9px;width:1px;height:9px;background:var(--pc)}
.m3l i{font-style:normal;font-size:15px;line-height:1;margin-right:5px;vertical-align:-1px}
.m3l b{font:700 13px var(--font-display);color:var(--ink)}
.m3l span{font:600 9.5px var(--font-mono);letter-spacing:.1em;color:var(--pc)}
.m3l.sel{background:rgba(30,22,10,.82);border-color:#fff4d6;box-shadow:0 0 18px rgba(242,207,126,.45)}
.m3l.free span{color:#a09078}
.m3hint{position:absolute;right:12px;bottom:10px;font:500 11.5px var(--font-sans);color:rgba(230,215,185,.55);pointer-events:none;text-shadow:0 1px 3px #000}
.m3d + .mapcard,.mapstage .mapcard{z-index:5}
@media (max-width:860px){.m3root{height:420px}.m3hint{display:none}}

/* ===== Soygun butonu ikonu ===== */
.btn-raid {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px 7px 11px; font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase;
  position: relative; white-space: nowrap;
}
.btn-raid .ri { width: 20px; height: 20px; flex: none; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .45)); transition: transform .25s; }
.btn-raid:not(:disabled) { box-shadow: 0 0 0 0 rgba(230, 70, 77, .5); animation: raidPulse 2.4s ease-out infinite; }
.btn-raid:not(:disabled):hover .ri { transform: rotate(-12deg) scale(1.12); }
.btn-raid:disabled .ri { opacity: .6; }
.btn-raid.is-shield { color: var(--mute); }
@keyframes raidPulse { 0% { box-shadow: 0 0 0 0 rgba(230, 70, 77, .5); } 70%, 100% { box-shadow: 0 0 0 9px rgba(230, 70, 77, 0); } }
@media (prefers-reduced-motion: reduce) { .btn-raid:not(:disabled) { animation: none; } }

/* ===== 3D soygun simülatörü ===== */
body.rs-lock { overflow: hidden; }
.rs { position: fixed; inset: 0; z-index: 9999; background: #000; animation: rsIn .35s ease-out; }
@keyframes rsIn { from { opacity: 0; } to { opacity: 1; } }
.rs-cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.rs-ctl { position: absolute; top: max(10px, env(safe-area-inset-top)); right: 12px; display: flex; gap: 8px; z-index: 2; }
.rs-ctl button {
  background: rgba(10, 8, 6, .72); color: var(--ink); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 6px 14px; font: 600 12px/1 var(--font-mono); cursor: pointer;
}
.rs-ctl button:hover { border-color: var(--brass-bright); color: var(--brass-bright); }
.rs-card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3;
  width: min(92vw, 420px); text-align: center; padding: 28px 24px 24px;
  background: linear-gradient(180deg, rgba(20, 15, 11, .94), rgba(10, 8, 6, .96));
  border: 1px solid var(--line-strong); border-top: 3px solid var(--cash-bright);
  border-radius: 14px; box-shadow: 0 24px 70px rgba(0, 0, 0, .85); animation: rsCard .5s cubic-bezier(.2, .9, .3, 1.2);
}
.rs-card.lose { border-top-color: var(--blood-bright); }
@keyframes rsCard { from { opacity: 0; transform: translate(-50%, -44%) scale(.92); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.rs-card[hidden] { display: none; }
.rs-k { font: 700 13px/1 var(--font-display); letter-spacing: .22em; color: var(--cash-bright); }
.rs-card.lose .rs-k { color: var(--blood-bright); }
.rs-big { font: 800 clamp(36px, 9vw, 54px)/1.1 var(--font-display); color: var(--brass-bright); margin: 14px 0 6px; text-shadow: 0 0 28px rgba(242, 207, 126, .35); }
.rs-big.bad { color: var(--blood-bright); text-shadow: 0 0 28px rgba(230, 70, 77, .4); }
.rs-sub { color: var(--ink-soft); font-size: 13.5px; }
.rs-pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 16px 0 18px; }
.rs-pills span { font: 500 11.5px/1 var(--font-mono); padding: 6px 10px; border-radius: 999px; background: var(--brass-dim); color: var(--ink); border: 1px solid var(--line); }
.rs-card .go { width: 100%; margin: 0; }
