/* RustyRoam — dark industrial + blue theme (re-themed from the original
   rust/orange look; CSS vars below are still named --gold/--orange/--rust
   for minimal churn across every file that references them — only their
   hex values changed) */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #0a0d13;
  --bg-panel: #131826;
  --bg-panel-2: #1a2033;
  --bg-panel-3: #1f2740;
  --border: #262d40;
  --border-soft: #1c2235;
  --gold: #2f7dfd;
  --orange: #1b56c9;
  --rust: #123a7a;
  --text: #eceff5;
  --text-dim: #8a91a6;
  --trash: #6b6459;
  --common: #9e9e9e;
  --uncommon: #4fc3f7;
  --rare: #b452f0;
  --epic: #f5c518;
  --legendary: #ff3d3d;
  --mythic: #ff2fd4;
  --good: #35d07f;
  --bad: #ff5c5c;
  --display-font: 'Oswald', 'Segoe UI', Arial, sans-serif;
  --body-font: 'Inter', 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scrollbar-color: var(--rust) var(--bg); }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1a2f52; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--rust); }

body {
  margin: 0;
  font-family: var(--body-font);
  background:
    repeating-linear-gradient(135deg, rgba(47,125,253,0.025) 0px, rgba(47,125,253,0.025) 2px, transparent 2px, transparent 26px),
    radial-gradient(ellipse 900px 600px at 50% -10%, rgba(47,125,253,0.10) 0%, transparent 60%),
    radial-gradient(circle at top, #131826 0%, #0b0e14 55%, #050609 100%);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

a { color: var(--gold); text-decoration: none; }

h1, h2, h3 {
  font-family: var(--display-font);
  font-weight: 700;
  letter-spacing: 0.4px;
  margin: 0 0 8px;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: linear-gradient(180deg, #171d2e 0%, #0d1119 100%);
  border-bottom: 2px solid var(--gold);
  box-shadow: 0 1px 0 rgba(0,0,0,0.6) inset, 0 6px 22px rgba(0,0,0,0.55);
  flex-wrap: wrap;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand { display: flex; align-items: center; }
.brand-logo {
  height: 40px;
  width: auto;
  display: block;
  /* the source PNG has a solid black background (no alpha) — screen blend
     makes pure black vanish into the navbar's near-black gradient so only
     the logo mark/text show, instead of a visible dark rectangle */
  mix-blend-mode: screen;
}

.nav-links { display: flex; gap: 22px; flex-wrap: wrap; }
.nav-links a {
  font-family: var(--display-font);
  color: var(--text-dim);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color .12s ease, border-color .12s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); border-color: var(--gold); }

.nav-right { display: flex; align-items: center; gap: 14px; }

.balance-pill {
  font-family: var(--display-font);
  background: linear-gradient(180deg, var(--bg-panel-3), var(--bg-panel-2));
  border: 1px solid var(--gold);
  border-radius: 20px;
  padding: 6px 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--gold);
  box-shadow: 0 0 12px rgba(47,125,253,0.2) inset, 0 2px 6px rgba(0,0,0,0.3);
}

.btn {
  font-family: var(--display-font);
  background:
    repeating-linear-gradient(-45deg, rgba(0,0,0,0.06) 0px, rgba(0,0,0,0.06) 6px, transparent 6px, transparent 12px),
    linear-gradient(180deg, var(--orange), #0d3f8f);
  color: #051220;
  border: none;
  border-radius: 8px;
  padding: 11px 20px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 3px 0 #082243, 0 0 16px rgba(27,86,201,0.3);
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 #082243, 0 0 20px rgba(27,86,201,0.45); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #082243; }
.btn.secondary {
  background: linear-gradient(180deg, var(--bg-panel-3), var(--bg-panel-2));
  color: var(--text);
  box-shadow: 0 3px 0 #05070c;
  border: 1px solid var(--border);
}
.btn.secondary:hover { box-shadow: 0 4px 0 #05070c; border-color: var(--gold); }
.btn.danger { background: linear-gradient(180deg,#ff5c5c,#b32323); color:#fff; box-shadow:0 3px 0 #7a1717;}
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn-steam {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #1b2838, #0b0f14);
  color: #c7d5e0;
  box-shadow: 0 3px 0 #05070a;
}
.btn-steam:hover { box-shadow: 0 4px 0 #05070a; }

.container { max-width: 1100px; margin: 0 auto; padding: 28px 20px 80px; }

.panel {
  background: linear-gradient(165deg, var(--bg-panel-2) 0%, var(--bg-panel) 100%);
  border: 1px solid var(--border);
  border-top-color: #313a54;
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 22px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.4);
}

.hero {
  text-align: center;
  padding: 60px 20px;
}
.hero h1 { font-size: 42px; margin-bottom: 6px; }
.hero p { color: var(--text-dim); font-size: 17px; }

.hero-home {
  position: relative;
  overflow: hidden;
  padding: 84px 20px 58px;
  border-bottom: 1px solid var(--border);
  /* real procedurally-generated Rust map (img/rust-map.jpg) as the backdrop,
     darkened so the logo/text/buttons on top stay legible */
  background:
    linear-gradient(180deg, rgba(5,7,12,0.72) 0%, rgba(5,7,12,0.88) 65%, rgba(5,7,12,1) 100%),
    url('../img/rust-map.jpg') center 30% / cover no-repeat;
}
.hero-glow {
  position: absolute;
  top: -220px; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 420px;
  background: radial-gradient(ellipse at center, rgba(47,125,253,0.28) 0%, rgba(47,125,253,0) 70%);
  pointer-events: none;
}
.hero-home h1 {
  position: relative;
  font-size: 58px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 30px rgba(47,125,253,0.45);
}
.hero-home p { position: relative; max-width: 560px; margin: 0 auto; }
.hero-home #hero-cta { position: relative; margin-top: 26px; }

.section-title {
  font-family: var(--display-font);
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text);
  border-left: 4px solid var(--gold);
  padding-left: 12px;
  margin-bottom: 16px;
}

.showcase-strip {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.showcase-strip .card { padding: 14px; }
.showcase-strip img { filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5)); }

.game-card { display: flex; flex-direction: column; }
.game-card .btn { margin-top: auto; }

.odds-btn {
  position: absolute;
  top: 10px; right: 10px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg-panel-3);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--display-font);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.odds-btn:hover { background: var(--gold); color: #051220; border-color: var(--gold); }

/* true popup overlays for case-opening / odds modals, instead of inline panels */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 10, 0.78);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}
.modal-box {
  position: relative;
  background: linear-gradient(165deg, var(--bg-panel-2) 0%, var(--bg-panel) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px;
  max-width: 620px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 24px 70px rgba(0,0,0,0.65), 0 0 0 1px rgba(47,125,253,0.08);
}
.modal-box::before {
  content: '';
  position: absolute;
  top: 0; left: 14px; right: 14px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 0 0 3px 3px;
}
.modal-box h3 { font-size: 19px; text-transform: uppercase; letter-spacing: 0.5px; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.card {
  position: relative;
  background: linear-gradient(165deg, var(--bg-panel-2) 0%, var(--bg-panel) 100%);
  border: 1px solid var(--border);
  border-top-color: #313a54;
  border-radius: 12px;
  padding: 18px 16px 16px;
  text-align: center;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.card::before, .card::after {
  content: '';
  position: absolute;
  top: 8px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  box-shadow: inset 0 1px 1px rgba(0,0,0,0.5);
}
.card::before { left: 8px; }
.card::after { right: 8px; }
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(47,125,253,0.18); border-color: var(--gold); }
.card h3 {
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.case-emoji, .item-emoji {
  font-size: 30px;
  margin: 0 auto 12px;
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle, rgba(47,125,253,0.16) 0%, rgba(47,125,253,0) 72%);
  border: 1px solid var(--border);
  border-radius: 50%;
}
.item-emoji { background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 72%); }
.item-emoji img { border-radius: 6px; }
.case-price {
  font-family: var(--display-font);
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.3px;
  margin: 6px 0 12px;
}

/* small inline coin icon (used where the 🪙 emoji glyph isn't reliably supported) */
.coin-icon-sm {
  width: 30px; height: 30px; border-radius: 50%;
  background: conic-gradient(from 90deg, var(--gold), var(--orange));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display-font);
  font-weight: 700; font-size: 13px; color: #051220;
  box-shadow: 0 0 10px rgba(47,125,253,0.4);
}

/* rarity colors */
.rarity-trash { border-color: var(--trash) !important; box-shadow: 0 0 6px rgba(107,100,89,0.3); }
.rarity-common { border-color: var(--common) !important; box-shadow: 0 0 10px rgba(158,158,158,0.35); }
.rarity-uncommon { border-color: var(--uncommon) !important; box-shadow: 0 0 10px rgba(79,195,247,0.4); }
.rarity-rare { border-color: var(--rare) !important; box-shadow: 0 0 10px rgba(180,82,240,0.4); }
.rarity-epic { border-color: var(--epic) !important; box-shadow: 0 0 12px rgba(245,197,24,0.5); }
.rarity-legendary { border-color: var(--legendary) !important; box-shadow: 0 0 16px rgba(255,61,61,0.55); }
.rarity-mythic { border-color: var(--mythic) !important; box-shadow: 0 0 18px rgba(255,47,212,0.6); }

.tag-rarity {
  display: inline-block;
  font-family: var(--display-font);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 10px;
  margin-top: 6px;
}
.tag-trash { background: rgba(107,100,89,0.25); color: var(--trash); }
.tag-common { background: rgba(158,158,158,0.2); color: var(--common); }
.tag-uncommon { background: rgba(79,195,247,0.2); color: var(--uncommon); }
.tag-rare { background: rgba(180,82,240,0.2); color: var(--rare); }
.tag-epic { background: rgba(245,197,24,0.2); color: var(--epic); }
.tag-legendary { background: rgba(255,61,61,0.2); color: var(--legendary); }
.tag-mythic { background: rgba(255,47,212,0.22); color: var(--mythic); }

/* case opening spinner */
.spinner-viewport {
  position: relative;
  overflow: hidden;
  height: 150px;
  background: linear-gradient(180deg, #0d111c, var(--bg-panel-2));
  border: 1px solid var(--border);
  border-radius: 10px;
  margin: 20px 0;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
}
.spinner-viewport::before, .spinner-viewport::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 60px;
  z-index: 4;
  pointer-events: none;
}
.spinner-viewport::before { left: 0; background: linear-gradient(90deg, var(--bg-panel-2), transparent); }
.spinner-viewport::after { right: 0; background: linear-gradient(-90deg, var(--bg-panel-2), transparent); }
.spinner-track {
  position: absolute;
  top: 0; left: 0;
  display: flex;
  height: 100%;
  will-change: transform;
}
.spinner-item {
  flex: 0 0 130px;
  margin: 8px 6px;
  background: var(--bg-panel);
  border: 2px solid var(--common);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 34px;
}
.spinner-pointer {
  position: absolute;
  top: 0; bottom: 0; left: 50%;
  width: 3px;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
  transform: translateX(-50%);
  z-index: 5;
}

.win-banner {
  text-align: center;
  padding: 18px;
  border-radius: 10px;
  margin-top: 14px;
  font-size: 20px;
  font-weight: 800;
}

/* coinflip */
.coin {
  width: 90px; height: 90px; border-radius: 50%;
  background: conic-gradient(from 90deg, var(--gold), var(--orange));
  display: flex; align-items: center; justify-content: center;
  margin: 20px auto;
  font-family: var(--display-font);
  font-weight: 700; font-size: 14px; color: #051220;
  box-shadow: 0 0 20px rgba(47,125,253,0.5), inset 0 -6px 12px rgba(0,0,0,0.2);
}
.coin.flipping { animation: flip 1.1s ease-in-out; }
@keyframes flip {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(1800deg); }
}

.flip-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }

/* jackpot bar */
.jackpot-bar {
  display: flex; height: 34px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border); margin: 14px 0;
}
.jackpot-seg {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display-font);
  font-size: 11px; font-weight: 700; color: #0b0e14;
  white-space: nowrap; overflow: hidden;
}
.player-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }
.pct-dot { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:8px; }

.timer { font-family: var(--display-font); font-size: 30px; font-weight: 700; color: var(--gold); text-align: center; }

input, select {
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px;
  border-radius: 8px;
  font-family: var(--body-font);
  font-size: 14px;
}
input:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(47,125,253,0.15); }
label {
  display: block; margin: 10px 0 4px;
  color: var(--text-dim); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600;
}

.form-panel { max-width: 420px; margin: 60px auto; }

.msg { padding: 10px 14px; border-radius: 8px; margin: 10px 0; font-size: 14px; }
.msg.error { background: rgba(255,92,92,0.15); color: var(--bad); border: 1px solid var(--bad); }
.msg.success { background: rgba(53,208,127,0.15); color: var(--good); border: 1px solid var(--good); }

table { width: 100%; border-collapse: collapse; }
th {
  font-family: var(--display-font);
  text-transform: uppercase; font-size: 12px; letter-spacing: 0.4px;
  color: var(--text-dim);
}
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); font-size: 14px; }

.hidden { display: none !important; }

/* Striped backdrop strip at the top of the homepage, framing the actual
   ROAM button so it reads as a distinct clickable element, not page text. */
.roam-banner-wrap {
  text-align: center;
  padding: 20px;
  background:
    repeating-linear-gradient(-45deg, rgba(47,125,253,0.05) 0px, rgba(47,125,253,0.05) 8px, transparent 8px, transparent 16px),
    #05070c;
  border-bottom: 1px solid var(--border);
}
/* The button itself — same solid-fill/drop-shadow/lift language as .btn,
   just bigger, so it's unmistakably pressable rather than a text banner. */
.roam-banner {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-family: var(--display-font);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 14px;
  text-indent: 14px; /* re-center despite the trailing letter-spacing gap */
  color: #051220;
  background:
    repeating-linear-gradient(-45deg, rgba(0,0,0,0.06) 0px, rgba(0,0,0,0.06) 6px, transparent 6px, transparent 12px),
    linear-gradient(180deg, var(--gold), var(--orange));
  padding: 16px 40px;
  border-radius: 12px;
  box-shadow: 0 5px 0 #082243, 0 0 24px rgba(47,125,253,0.4);
  cursor: pointer;
  transition: transform .1s ease, box-shadow .1s ease;
}
.roam-banner::after {
  content: '→';
  font-size: 24px;
  text-indent: 0;
  letter-spacing: 0;
}
.roam-banner:hover { transform: translateY(-2px); box-shadow: 0 7px 0 #082243, 0 0 32px rgba(47,125,253,0.6); }
.roam-banner:active { transform: translateY(3px); box-shadow: 0 2px 0 #082243; }

/* Manage Crates loot editor — squares instead of a plain list, each showing
   the item's image, value, and live % chance alongside its weight input. */
.loot-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.loot-square { position: relative; padding-top: 30px; }
.loot-remove-btn {
  position: absolute;
  top: 8px; right: 8px;
  padding: 2px 8px !important;
  font-size: 11px !important;
  line-height: 1.6;
  box-shadow: none !important;
}

/* Manage Crates — top-level tab bar (Crates / Items & Prices), reuses
   .btn/.btn.secondary for the active/inactive look, same toggle pattern as
   the Plinko / Crate Drop risk buttons. */
.admin-tabs { display: flex; gap: 10px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }

/* Manage Crates — Item Prices rarity filter pills, reuses .btn/.btn.secondary
   for the active/inactive look, same toggle pattern as the tab bar above. */
.price-rarity-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.price-filter-btn, .catalog-filter-btn { padding: 6px 14px !important; font-size: 12px !important; }

/* Manage Crates — "Edit a Crate" picker rows (click to open the editor) */
.crate-picker-row { cursor: pointer; transition: background .12s ease; }
.crate-picker-row:hover { background: var(--bg-panel-3); }

/* Manage Crates — single-crate editor screen */
.editor-header { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.editor-cover-wrap { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.editor-cover-preview {
  width: 72px; height: 72px; border-radius: 10px;
  background: var(--bg-panel-3); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 32px; overflow: hidden;
}
.editor-cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.editor-cover-btn { font-size: 11px !important; padding: 6px 10px !important; }
.editor-name-input {
  width: 100%; background: transparent; border: 1px solid transparent; border-radius: 6px;
  padding: 6px 8px; margin: -6px 0 0 -8px;
  font-family: var(--display-font); font-size: 24px; font-weight: 700; color: var(--text);
}
.editor-name-input:hover { border-color: var(--border); }
.editor-name-input:focus { outline: none; border-color: var(--gold); background: var(--bg-panel-3); box-shadow: 0 0 0 3px rgba(47,125,253,0.15); }

.editor-stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px;
  margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border);
}
.editor-stat-tile { background: var(--bg-panel-3); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; }
.editor-stat-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.editor-stat-value { font-family: var(--display-font); font-size: 19px; font-weight: 700; color: var(--text); }

/* ---------- Arcade (testgame/) ---------- */

/* Plinko buckets */
.plinko-bucket {
  flex: 1;
  text-align: center;
  padding: 8px 2px;
  background: var(--bg-panel-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--display-font);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.plinko-bucket.landed { background: var(--gold); color: #051220; border-color: var(--gold); box-shadow: 0 0 12px rgba(47,125,253,0.5); }
.plinko-peg {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-dim);
  box-shadow: 0 0 4px rgba(255,255,255,0.15);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Crate Drop (plinko, rarity-themed) buckets */
.cratedrop-bucket {
  flex: 1;
  min-width: 0;
  text-align: center;
  padding: 6px 2px;
  background: var(--bg-panel-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.cratedrop-bucket img { width: 100%; max-width: 34px; aspect-ratio: 1; object-fit: contain; display: block; margin: 0 auto 4px; }
.cratedrop-bucket-mult { display: block; font-family: var(--display-font); font-size: 11px; font-weight: 700; color: var(--text-dim); }
.cratedrop-bucket.landed { transform: translateY(-3px) scale(1.06); box-shadow: 0 0 14px rgba(255,255,255,0.25); }
.cratedrop-bucket.landed .cratedrop-bucket-mult { color: var(--text); }

/* Radiation Mines grid */
.mines-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.mine-tile {
  aspect-ratio: 1 / 1;
  font-size: 22px;
  background: var(--bg-panel-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .12s ease, border-color .12s ease, transform .08s ease;
}
.mine-tile:hover:not(:disabled) { border-color: var(--gold); transform: translateY(-1px); }
.mine-tile:disabled { cursor: not-allowed; }
.mine-tile.mine-safe { background: rgba(53,208,127,0.18); border-color: var(--good); }
.mine-tile.mine-hit { background: rgba(255,92,92,0.28); border-color: var(--bad); }
.mine-tile.mine-revealed { background: rgba(255,92,92,0.1); border-color: var(--bad); opacity: 0.6; }

/* Excavator Dig grid — same tile-button conventions as Radiation Mines,
   adapted for a 6x6 board and 4 tile types instead of 2 */
.dig-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.dig-tile {
  aspect-ratio: 1 / 1;
  font-size: 20px;
  background: var(--bg-panel-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .12s ease, border-color .12s ease, transform .08s ease;
}
.dig-tile:hover:not(:disabled) { border-color: var(--gold); transform: translateY(-1px); }
.dig-tile:disabled { cursor: not-allowed; }
.dig-tile.dig-hit { background: rgba(255,92,92,0.28); border-color: var(--bad); }
.dig-tile.dig-revealed-wood { background: rgba(53,208,127,0.10); border-color: var(--good); }
.dig-tile.dig-revealed-stone { background: rgba(53,208,127,0.16); border-color: var(--good); }
.dig-tile.dig-revealed-metal { background: rgba(53,208,127,0.22); border-color: var(--good); }
.dig-tile.dig-revealed-sulfur { background: rgba(53,208,127,0.30); border-color: var(--good); }
.dig-tile.dig-bust-reveal { background: rgba(255,92,92,0.1); border-color: var(--bad); opacity: 0.6; }
.dig-tile.dig-safe-reveal { background: rgba(53,208,127,0.1); border-color: var(--good); opacity: 0.6; }
.dig-tile img { width: 62%; height: 62%; object-fit: contain; pointer-events: none; }
.mat-icon-inline { width: 18px; height: 18px; object-fit: contain; vertical-align: -4px; margin-right: 2px; }

/* "if your next click is..." live preview — styled like the dig grid's
   tiles (same background/border language) rather than plain paragraph text,
   so it reads as part of the game board, not a footnote. */
.dig-legend-tile {
  background: var(--bg-panel-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 14px;
}
.dig-legend-title {
  font-family: var(--display-font);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-dim);
  margin-bottom: 8px;
}
.dig-legend-tabs { display: flex; gap: 8px; }
.dig-legend-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  border-bottom: 2px solid var(--border);
  border-radius: 8px 8px 4px 4px;
  transition: border-color .12s ease, background .12s ease;
}
.dig-legend-tab:hover { border-color: var(--gold); border-bottom-color: var(--gold); background: var(--bg-panel-3); }
.dig-legend-tab img { width: 26px; height: 26px; object-fit: contain; }
.dig-legend-tab-name { font-family: var(--display-font); font-size: 11px; text-transform: uppercase; letter-spacing: 0.3px; color: var(--text-dim); }
.dig-legend-pct { color: var(--good); font-weight: 700; font-family: var(--display-font); font-size: 13px; }

/* Airdrop Roulette wheel */
.roulette-slot {
  flex: 1 0 40px;
  text-align: center;
  padding: 10px 4px;
  border-radius: 6px;
  font-family: var(--display-font);
  font-weight: 700;
  font-size: 13px;
  color: #0b0e14;
  transition: transform .15s ease, box-shadow .15s ease;
}
.roulette-gold { background: var(--gold); }
.roulette-green { background: var(--good); }
.roulette-red { background: var(--bad); }
.roulette-slot.landed { transform: translateY(-4px) scale(1.08); box-shadow: 0 0 16px rgba(47,125,253,0.7); outline: 2px solid var(--text); }

/* Roam Mode — travel map grid overlay (rust-map.jpg placeholder; grid
   dimensions come entirely from JS, this CSS makes no assumption about
   GRID_SIZE beyond "however many cells JS renders fills the wrap") */
.roam-map-zoom-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}
.roam-map-zoom-controls span {
  font-family: var(--display-font);
  font-size: 13px;
  color: var(--text-dim);
  min-width: 42px;
  text-align: center;
}
/* Fixed-size scrollable window onto the (possibly zoomed-larger) map wrap —
   zoom grows .roam-map-wrap's actual pixel size via JS, this viewport is
   what keeps that from blowing out the page layout. */
.roam-map-viewport {
  max-width: 500px;
  max-height: 500px;
  margin: 14px auto;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.roam-map-wrap {
  position: relative;
  width: 500px;
  height: 500px;
  overflow: hidden;
}
.roam-map-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.roam-map-grid {
  position: absolute;
  inset: 0;
  display: grid;
}
.roam-map-cell {
  position: relative;
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  transition: background .1s ease, border-color .1s ease;
}
.roam-map-cell:hover { background: rgba(47,125,253,0.25); border-color: var(--gold); }
.roam-map-cell.current {
  background: rgba(255,255,255,0.06);
  border-color: var(--orange);
  cursor: default;
}
.roam-map-cell.water {
  background: rgba(4,10,20,0.45);
  cursor: not-allowed;
}
.roam-map-cell.water:hover { background: rgba(4,10,20,0.45); border-color: rgba(255,255,255,0.08); }
.roam-map-cell.current::after {
  content: "";
  position: absolute;
  width: 40%;
  height: 40%;
  top: 30%;
  left: 30%;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}

/* Dedicated crate-opening page (case-open.html) */
.back-link {
  display: inline-block;
  font-family: var(--display-font);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-dim);
  margin-bottom: 16px;
  transition: color .12s ease;
}
.back-link:hover { color: var(--gold); }

.case-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  background: linear-gradient(165deg, var(--bg-panel-2) 0%, var(--bg-panel) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 26px;
  margin-bottom: 20px;
}
.case-hero-image { flex: 0 0 auto; }
.case-hero-image img { border-radius: 10px; }
.case-hero-info h2 { font-size: 25px; margin-bottom: 4px; }

.case-open-panel { text-align: center; }

/* bigger reel for the full page (base .spinner-viewport/.spinner-item from
   the shared modal styles above still apply — these just scale them up) */
.spinner-viewport-lg { height: 190px; }
.spinner-viewport-lg .spinner-item { flex: 0 0 150px; margin: 10px 7px; font-size: 40px; }
.spinner-track { transition: filter .5s ease-out; }
.spinner-track.is-spinning { filter: blur(3px); }

/* small top/bottom carets on the pointer line, instead of a bare bar */
.spinner-pointer::before, .spinner-pointer::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border: 7px solid transparent;
}
.spinner-pointer::before { top: -1px; border-top-color: var(--gold); }
.spinner-pointer::after { bottom: -1px; border-bottom-color: var(--gold); }

/* landing impact on the winning tile — same "pop" language as
   .cratedrop-bucket.landed / .roulette-slot.landed elsewhere in the site */
.spinner-item.landed {
  animation: spinner-land .45s ease-out;
  box-shadow: 0 0 18px currentColor;
}
@keyframes spinner-land {
  0% { transform: scale(1); }
  45% { transform: scale(1.12) translateY(-4px); }
  100% { transform: scale(1); }
}

/* rarity-colored glow burst behind the viewport the instant it lands */
.burst-flash {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}
.burst-flash.burst-active { animation: burst-fade .9s ease-out; }
@keyframes burst-fade {
  0% { opacity: 0; }
  25% { opacity: 1; }
  100% { opacity: 0; }
}

/* whole-screen flash for the big legendary/mythic pulls only */
.screen-flash {
  position: fixed;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  z-index: 2000;
  mix-blend-mode: screen;
}
.screen-flash.flash-active { animation: screen-flash-fade .65s ease-out; }
@keyframes screen-flash-fade {
  0% { opacity: 0; }
  15% { opacity: 0.55; }
  100% { opacity: 0; }
}

.win-reveal { min-height: 0; margin-top: 18px; }
.win-reveal.show {
  position: relative;
  padding: 24px;
  border-width: 2px;
  border-style: solid;
  border-radius: 12px;
  overflow: hidden;
  animation: reveal-pop .5s cubic-bezier(0.26, 1.4, 0.44, 1);
}
@keyframes reveal-pop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.win-reveal-icon { margin-bottom: 8px; }
.win-reveal-name { font-family: var(--display-font); font-size: 22px; font-weight: 800; }
.win-reveal-value { color: var(--text-dim); font-size: 13px; margin-top: 8px; }

/* drifting sparkle glyphs over rare+ reveal cards */
.sparkle {
  position: absolute;
  bottom: 14%;
  font-size: 16px;
  animation-name: sparkle-drift;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
  pointer-events: none;
}
@keyframes sparkle-drift {
  0% { transform: translateY(0) scale(0.6) rotate(0deg); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(-90px) scale(1.1) rotate(90deg); opacity: 0; }
}

.case-open-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; }
.btn-open-crate { min-width: 230px; font-size: 15px; padding: 13px 24px; }
.btn-open-crate:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }
