/* ==========================================================================
   CS2: GLOBAL IDLER — Authentic Counter-Strike 2 Tactical Dark HUD Theme
   Zero external font or CDN dependencies — 100% self-contained!
   ========================================================================== */

:root {
  --bg-deep: #0b0f14;
  --bg-panel: #121821;
  --bg-card: #18212d;
  --bg-card-hover: #1f2b3b;
  --border: #263344;
  --border-bright: #3a4d66;

  --text-main: #e6edf5;
  --text-dim: #8b9bb0;
  --text-muted: #5e7087;

  --cs-orange: #f59e0b;
  --cs-gold: #ffd700;
  --cs-ct: #5d9cec;
  --cs-t: #e4ae39;
  --cs-green: #4ade80;
  --cs-red: #ef4444;

  --radius: 8px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: radial-gradient(circle at 20% 0%, #192434 0%, var(--bg-deep) 60%);
  color: var(--text-main);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

button {
  font-family: inherit;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

/* ── APP SHELL & TOP HUD ─────────────────────────────────────────────────── */
.app-shell {
  max-width: 1520px;
  margin: 0 auto;
  padding: 12px 16px 28px;
}

.hud-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: linear-gradient(135deg, #141c26 0%, #0f151d 100%);
  border: 1px solid var(--border);
  border-top: 3px solid var(--cs-orange);
  border-radius: var(--radius);
  padding: 12px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.brand-cluster {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rsg-logo-img {
  height: 54px;
  width: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 10px rgba(245, 158, 11, 0.32));
  flex-shrink: 0;
}

.brand-text h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1.4px;
  color: #fff;
}

.medal-pill {
  display: inline-block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--text-dim);
}

.hud-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}

.hud-stat {
  display: flex;
  flex-direction: column;
}

.hud-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-dim);
}

.hud-val {
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.cash-val {
  font-size: 24px;
  color: var(--cs-green);
  text-shadow: 0 0 14px rgba(74, 222, 128, 0.25);
}

/* Authentic CS2 Skewed Premier Rating Pill */
.premier-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 12px 3px 8px;
  background: rgba(156, 163, 175, 0.16);
  border-left: 4px solid #9ca3af;
  border-radius: 3px;
  transform: skewX(-10deg);
  font-weight: 900;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
  color: #e5e7eb;
}

.premier-badge > span {
  transform: skewX(10deg);
}

.premier-bars {
  display: flex;
  gap: 2px;
}

.premier-bars i {
  display: block;
  width: 3px;
  height: 14px;
  background: currentColor;
  opacity: 0.7;
}

.hud-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hud-btn {
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-bright);
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: background 0.15s, border-color 0.15s;
}

.hud-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--cs-orange);
}

.hud-btn.accent-btn {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--cs-orange);
  color: var(--cs-orange);
}

.hud-btn.active-toggle {
  background: rgba(74, 222, 128, 0.18);
  border-color: var(--cs-green);
  color: var(--cs-green);
}

/* ── TWO-COLUMN WORKSPACE ────────────────────────────────────────────────── */
.workspace {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 14px;
  align-items: start;
}

@media (max-width: 1020px) {
  .workspace {
    grid-template-columns: 1fr;
  }
}

/* ── LEFT COLUMN: TACTICAL ARENA ─────────────────────────────────────────── */
.arena-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.scoreboard-card,
.mini-loadout-card,
.killfeed-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: var(--shadow);
}

.score-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.map-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
  font-size: 14px;
}

.map-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cs-orange);
  box-shadow: 0 0 8px var(--cs-orange);
}

.map-code {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 600;
}

.mastery-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.14);
  color: var(--cs-orange);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.mr12-board {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  background: #0d1219;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 10px;
}

.team-score {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.team-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--text-dim);
}

.score-num {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.team-score.ct .score-num { color: var(--cs-ct); }
.team-score.tr .score-num { color: var(--cs-t); }

.score-mid {
  text-align: center;
}

.score-mode {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.streak-pill {
  margin-top: 3px;
  font-size: 11px;
  font-weight: 700;
  color: var(--cs-orange);
}

.round-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.progress-track {
  width: 100%;
  height: 8px;
  background: #0b1017;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  transition: width 0.12s linear;
}

.round-fill {
  background: linear-gradient(90deg, var(--cs-ct), #38bdf8, var(--cs-orange));
}

/* Interactive Aim / Firing Pad */
.aim-arena {
  position: relative;
  height: 245px;
  background: radial-gradient(circle at center, #1b2736 0%, #0e141d 75%);
  border: 2px solid var(--border-bright);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: crosshair;
  user-select: none;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, transform 0.06s;
}

.aim-arena:hover {
  border-color: var(--cs-orange);
}

.aim-arena.firing {
  border-color: #fde047;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.35);
}

.radar-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(93, 156, 236, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(93, 156, 236, 0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.aim-map-watermark {
  position: absolute;
  top: 10px;
  left: 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.22);
  pointer-events: none;
}

.aim-target {
  position: relative;
  width: 122px;
  height: 122px;
  pointer-events: none;
  transition: transform 0.07s ease-out;
}

.aim-arena:active .aim-target {
  transform: scale(0.92);
}

.target-svg {
  width: 100%;
  height: 100%;
}

.t-ring-outer {
  fill: rgba(245, 158, 11, 0.06);
  stroke: rgba(245, 158, 11, 0.45);
  stroke-width: 2;
  stroke-dasharray: 8 5;
}

.t-ring-mid {
  fill: none;
  stroke: rgba(93, 156, 236, 0.45);
  stroke-width: 1.5;
}

.t-head {
  fill: rgba(239, 68, 68, 0.3);
  stroke: #f87171;
  stroke-width: 2.2;
}

.t-body {
  fill: rgba(226, 232, 240, 0.14);
  stroke: #94a3b8;
  stroke-width: 2;
}

.t-cross {
  stroke: var(--cs-green);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.aim-prompt {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--cs-orange);
  pointer-events: none;
}

.aim-stats-strip {
  position: absolute;
  bottom: 8px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  pointer-events: none;
}

.float-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.float-pop {
  position: absolute;
  font-weight: 900;
  font-size: 15px;
  color: var(--cs-green);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
  pointer-events: none;
  animation: floatUp 0.78s ease-out forwards;
  white-space: nowrap;
}

.float-pop.hs {
  color: #fde047;
  font-size: 17px;
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.85);
}

@keyframes floatUp {
  0% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -52px) scale(1.12); }
}

/* Mini Loadout Bar */
.mini-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.9px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.mini-loadout-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.mini-slot {
  background: #0d1219;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 5px 4px;
  text-align: center;
  font-size: 10px;
  overflow: hidden;
}

.mini-slot-name {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-slot-sub {
  font-size: 9px;
  color: var(--text-muted);
}

/* Killfeed */
.killfeed-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 110px;
  max-height: 130px;
  overflow: hidden;
}

.kf-empty {
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
  padding: 24px 0;
}

.kf-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: rgba(11, 15, 20, 0.85);
  border-left: 3px solid var(--cs-ct);
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11.5px;
  animation: slideIn 0.18s ease-out;
}

.kf-row.hs {
  border-left-color: var(--cs-red);
  background: rgba(239, 68, 68, 0.12);
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}

.kf-killer { color: var(--cs-ct); font-weight: 700; }
.kf-weap { color: var(--text-dim); font-size: 10.5px; }
.kf-hs { color: #f87171; font-weight: 900; }
.kf-victim { color: var(--cs-t); font-weight: 600; }
.kf-cash { color: var(--cs-green); font-weight: 800; font-variant-numeric: tabular-nums; }

/* ── RIGHT COLUMN: 5-TIER TABS ───────────────────────────────────────────── */
.tiers-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tier-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: #0d121a;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 720px) {
  .tier-tabs {
    grid-template-columns: repeat(2, 1fr);
  }
}

.tier-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 11px 8px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-dim);
  transition: background 0.15s, color 0.15s;
}

.tier-tab:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-main);
}

.tier-tab.active {
  background: rgba(245, 158, 11, 0.09);
  border-bottom-color: var(--cs-orange);
  color: #fff;
}

.tier-tab.locked {
  opacity: 0.6;
}

.t-num {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--cs-orange);
}

.t-title {
  font-size: 13px;
  font-weight: 800;
}

.tab-badge {
  position: absolute;
  top: 6px;
  right: 8px;
  background: var(--cs-orange);
  color: #0b0f14;
  font-size: 10px;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 999px;
}

.tab-viewport {
  padding: 16px 18px 22px;
  min-height: 620px;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

.pane-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.pane-header h2 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #fff;
}

.pane-header p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-dim);
  max-width: 680px;
}

.section-subhead {
  margin: 18px 0 10px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--cs-orange);
  text-transform: uppercase;
}

/* Quantity Selector */
.qty-selector {
  display: inline-flex;
  background: #0c1118;
  border: 1px solid var(--border-bright);
  border-radius: 6px;
  overflow: hidden;
}

.qty-btn {
  background: transparent;
  color: var(--text-dim);
  border: none;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
}

.qty-btn.active {
  background: var(--cs-orange);
  color: #0b0f14;
}

/* ── GENERIC ITEM CARDS (BUY MENU, SQUAD, ORG, PRESTIGE) ─────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(275px, 1fr));
  gap: 10px;
}

.item-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.item-card.affordable {
  border-color: rgba(74, 222, 128, 0.45);
}

.item-card:hover {
  background: var(--bg-card-hover);
}

.item-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.item-title-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
}

.item-icon {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: #0f151f;
  border: 1px solid var(--border-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--cs-orange);
  font-weight: 900;
  font-size: 11px;
}

.item-name {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.item-cat {
  font-size: 10.5px;
  color: var(--text-dim);
  font-weight: 600;
}

.item-owned {
  background: #0d131c;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 800;
  color: var(--cs-ct);
}

.item-desc {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.buy-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border-bright);
  background: #121a25;
  color: var(--text-dim);
  font-size: 12.5px;
  font-weight: 800;
  transition: all 0.15s;
}

.buy-btn.can-buy {
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.2), rgba(16, 185, 129, 0.12));
  border-color: var(--cs-green);
  color: #fff;
}

.buy-btn.can-buy:hover {
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.34), rgba(16, 185, 129, 0.22));
  transform: translateY(-1px);
}

.buy-btn.can-buy-gold {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.26), rgba(217, 119, 6, 0.16));
  border-color: var(--cs-orange);
  color: #fff;
}

.buy-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ── TIER 2: MAPS GRID ───────────────────────────────────────────────────── */
.maps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 10px;
}

.map-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.map-card.active-map {
  border: 2px solid var(--cs-orange);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.22);
}

.map-banner {
  position: relative;
  height: 76px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  overflow: hidden;
}

.map-radar-svg {
  position: absolute;
  right: 8px;
  top: 4px;
  width: 74px;
  height: 68px;
  opacity: 0.35;
}

.map-banner-text {
  position: relative;
  z-index: 1;
}

.map-banner-name {
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.map-banner-loc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.8);
}

.map-mult-pill {
  position: relative;
  z-index: 1;
  background: rgba(11, 15, 20, 0.85);
  color: var(--cs-gold);
  font-weight: 900;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 5px;
  border: 1px solid rgba(255, 215, 0, 0.35);
}

.map-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.map-desc {
  font-size: 11.5px;
  color: var(--text-dim);
}

.map-callouts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.callout-chip {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #0e141d;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.map-mastery-row {
  font-size: 11px;
  color: var(--text-dim);
}

.map-mastery-row .progress-track {
  height: 5px;
  margin-top: 3px;
}

/* ── TIER 3: CASES, SKINS & TRADE-UPS ────────────────────────────────────── */
.skin-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.luck-pill {
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 6px;
}

.tactical-btn {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #0b0f14;
  border: none;
  border-radius: 6px;
  padding: 7px 13px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.4px;
}

.tactical-btn:hover {
  filter: brightness(1.1);
}

.tactical-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

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

.case-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--cs-orange);
  border-radius: var(--radius);
  padding: 11px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.case-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.case-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #fff;
}

.case-owned {
  font-size: 11px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: var(--cs-orange);
}

.case-desc {
  font-size: 11.5px;
  color: var(--text-dim);
}

.case-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.mini-btn {
  background: #101721;
  color: var(--text-main);
  border: 1px solid var(--border-bright);
  border-radius: 5px;
  padding: 6px 8px;
  font-size: 11.5px;
  font-weight: 700;
}

.mini-btn:hover:not(:disabled) {
  border-color: var(--cs-orange);
  background: #1a2433;
}

.mini-btn.open-btn {
  background: rgba(245, 158, 11, 0.18);
  border-color: var(--cs-orange);
  color: #fde68a;
}

.mini-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

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

.equip-slot-card {
  background: #0f151e;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.slot-header {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 800;
  color: var(--text-dim);
  text-transform: uppercase;
}

.slot-empty {
  font-size: 11.5px;
  color: var(--text-muted);
  padding: 10px 0;
  text-align: center;
}

.tradeup-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
  gap: 8px;
}

.tradeup-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 9px 11px;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: 7px;
  color: var(--text-main);
  text-align: left;
}

.tradeup-btn.ready {
  border-color: var(--cs-gold);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.16);
}

.tradeup-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.inv-header-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.inv-actions {
  display: flex;
  gap: 6px;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 9px;
  max-height: 460px;
  overflow-y: auto;
  padding-right: 4px;
}

.skin-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom: 4px solid #4b69ff;
  border-radius: 7px;
  padding: 9px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

.skin-visual {
  height: 78px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 4px;
}

.skin-visual img.skin-img {
  max-width: 94%;
  max-height: 70px;
  object-fit: contain;
  filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.75));
  transition: transform 0.16s ease-out;
}

.skin-card:hover .skin-visual img.skin-img {
  transform: scale(1.07);
}

.skin-visual svg.skin-svg-fallback {
  width: 82%;
  height: 44px;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.65));
}

.case-img-wrap {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06), transparent 72%);
  border-radius: 6px;
}

.case-img {
  max-height: 62px;
  max-width: 90%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.65));
}

.csfloat-link {
  color: #38bdf8;
  text-decoration: none;
  font-size: 10px;
  font-weight: 800;
  opacity: 0.85;
}

.csfloat-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.roulette-skin-img {
  max-width: 112px;
  max-height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.75));
}

.reveal-skin-img {
  max-width: 210px;
  max-height: 112px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.85));
}

/* ── ARMORY PASS CARRYOVER MANIFEST ──────────────────────────────────────── */
.manifest-card {
  margin-top: 10px;
  background: #0e141d;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.manifest-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.9px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.manifest-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.manifest-chip {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 5px;
  border: 1px solid var(--border);
}

.manifest-chip.kept {
  background: rgba(74, 222, 128, 0.14);
  border-color: rgba(74, 222, 128, 0.55);
  color: var(--cs-green);
}

.manifest-chip.wiped {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.carryover-card.unlocked-vault {
  border-color: rgba(74, 222, 128, 0.55);
  background: linear-gradient(135deg, rgba(74, 222, 128, 0.08), var(--bg-card));
}

.st-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(249, 115, 22, 0.9);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 3px;
}

.wear-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(11, 15, 20, 0.85);
  font-size: 9px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 3px;
}

.skin-weapon {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-dim);
}

.skin-name {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skin-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--text-dim);
}

.skin-bonus-line {
  font-size: 11px;
  font-weight: 800;
  color: var(--cs-green);
}

.skin-btns {
  display: flex;
  gap: 4px;
}

.skin-btns button {
  flex: 1;
  padding: 4px 5px;
  font-size: 10.5px;
  font-weight: 800;
  border-radius: 4px;
  border: 1px solid var(--border-bright);
  background: #101620;
  color: var(--text-main);
}

.skin-btns button.eq-btn {
  background: rgba(93, 156, 236, 0.2);
  border-color: var(--cs-ct);
  color: #bfdbfe;
}

.skin-btns button.lock-btn.locked {
  border-color: var(--cs-gold);
  color: var(--cs-gold);
}

/* ── TIER 4: PREMIER & TOURNAMENTS ───────────────────────────────────────── */
.power-pill, .credits-pill {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.45);
  border-radius: 6px;
  padding: 6px 12px;
  text-align: right;
}

.power-pill span, .credits-pill span {
  display: block;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--text-dim);
}

.power-pill strong, .credits-pill strong {
  font-size: 18px;
  color: var(--cs-gold);
}

.premier-ladder-card {
  background: #0f151e;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 12px;
}

.ladder-tiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 6px;
  margin-top: 8px;
}

.ladder-chip {
  padding: 6px 8px;
  border-radius: 5px;
  background: #141c27;
  border: 1px solid var(--border);
  font-size: 11px;
  opacity: 0.45;
}

.ladder-chip.reached {
  opacity: 1;
}

.active-tourney-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(93, 156, 236, 0.12));
  border: 1px solid var(--cs-orange);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 12px;
}

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

.tourney-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--cs-orange);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.tourney-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  font-size: 11.5px;
  color: var(--text-dim);
}

/* ── TIER 5: PRESTIGE & ACHIEVEMENTS ─────────────────────────────────────── */
.prestige-hero {
  background: linear-gradient(135deg, #1b2230 0%, #141923 100%);
  border: 1px solid rgba(255, 215, 0, 0.45);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

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

.ach-card {
  background: #101620;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 11px;
  opacity: 0.55;
}

.ach-card.unlocked {
  opacity: 1;
  border-color: rgba(255, 215, 0, 0.55);
  background: rgba(255, 215, 0, 0.06);
}

.ach-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #fff;
}

.ach-desc {
  font-size: 11px;
  color: var(--text-dim);
  margin: 2px 0 4px;
}

.ach-reward {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--cs-gold);
}

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

.stat-tile {
  background: #0f151e;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
}

.stat-tile span {
  display: block;
  font-size: 10.5px;
  color: var(--text-dim);
}

.stat-tile strong {
  font-size: 16px;
  color: #fff;
}

/* ── LOCKED OVERLAY ──────────────────────────────────────────────────────── */
.locked-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
}

.lock-box {
  max-width: 440px;
  text-align: center;
  background: #0f151e;
  border: 1px dashed var(--border-bright);
  border-radius: 10px;
  padding: 28px 24px;
}

.lock-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.lock-box h3 {
  margin: 0 0 8px;
  color: var(--cs-orange);
}

.lock-box p {
  margin: 0;
  color: var(--text-dim);
}

/* ── MODALS & ROULETTE ───────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 12, 0.82);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
}

.modal-card {
  width: 100%;
  max-width: 560px;
  background: #131a24;
  border: 1px solid var(--border-bright);
  border-top: 3px solid var(--cs-orange);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.7);
}

.roulette-card {
  max-width: 780px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #0d121a;
  border-bottom: 1px solid var(--border);
}

.modal-head h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: 0.9px;
}

.close-btn {
  background: #1a2332;
  color: var(--text-main);
  border: 1px solid var(--border-bright);
  border-radius: 5px;
  padding: 4px 10px;
  font-weight: 800;
}

.modal-body {
  padding: 16px;
}

.modal-note {
  margin: 0 0 12px;
  font-size: 12.5px;
  color: var(--text-dim);
}

.save-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

#save-code-box {
  width: 100%;
  background: #0a0e14;
  color: #cbd5e1;
  border: 1px solid var(--border-bright);
  border-radius: 6px;
  padding: 8px;
  font-family: Consolas, monospace;
  font-size: 11px;
  resize: vertical;
}

.modal-msg {
  min-height: 18px;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--cs-green);
}

.modal-sep {
  border: none;
  border-top: 1px solid var(--border);
  margin: 14px 0;
}

.danger-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-dim);
}

.danger-btn {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
  border: 1px solid var(--cs-red);
  border-radius: 6px;
  padding: 6px 12px;
  font-weight: 800;
  font-size: 11.5px;
}

/* CS2 Case Roulette Track */
.roulette-stage {
  position: relative;
  height: 142px;
  margin: 18px 16px;
  background: #0a0e14;
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  overflow: hidden;
}

.roulette-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: var(--cs-gold);
  box-shadow: 0 0 12px var(--cs-gold);
  z-index: 5;
  transform: translateX(-50%);
}

.roulette-track {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 8px;
  padding: 0 10px;
  will-change: transform;
}

.roulette-item {
  flex: 0 0 132px;
  height: 116px;
  background: #161f2c;
  border: 1px solid var(--border);
  border-bottom: 5px solid #4b69ff;
  border-radius: 6px;
  padding: 7px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
}

.roulette-item.gold-item {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), #1c1917);
  border-color: var(--cs-gold);
}

.roulette-result {
  padding: 0 18px 18px;
  text-align: center;
}

.unbox-reveal-card {
  display: inline-block;
  min-width: 280px;
  background: #101620;
  border: 2px solid var(--cs-orange);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 12px;
}

/* ── TOAST NOTIFICATIONS ─────────────────────────────────────────────────── */
.toast-stack {
  position: fixed;
  bottom: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1200;
  max-width: 340px;
}

.toast {
  background: #131b26;
  border: 1px solid var(--border-bright);
  border-left: 4px solid var(--cs-orange);
  border-radius: 7px;
  padding: 10px 13px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  animation: slideIn 0.2s ease-out;
}

.toast.gold { border-left-color: var(--cs-gold); }
.toast.green { border-left-color: var(--cs-green); }
.toast.red { border-left-color: var(--cs-red); }

.toast-title {
  font-size: 12.5px;
  font-weight: 900;
  color: #fff;
}

.toast-msg {
  font-size: 11.5px;
  color: var(--text-dim);
  margin-top: 2px;
}


/* ── GAMER TAG, LEADERBOARD & 43-CASE TOOLBAR ────────────────────────────── */
.brand-sub-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.gamertag-pill {
  font-size: 11px;
  font-weight: 800;
  color: var(--cs-orange);
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 4px;
  padding: 1px 7px;
}

.hud-btn.lb-btn {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.55);
  color: #7dd3fc;
}

.hud-btn.lb-btn:hover {
  background: rgba(56, 189, 248, 0.24);
  border-color: #38bdf8;
}

.tactical-input {
  width: 100%;
  background: #0a0e14;
  color: #fff;
  border: 1px solid var(--border-bright);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
  outline: none;
}

.tactical-input:focus {
  border-color: var(--cs-orange);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.22);
}

.cases-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 14px 0 10px;
}

.cases-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.case-search-input,
.case-filter-select {
  background: #0d131c;
  color: var(--text-main);
  border: 1px solid var(--border-bright);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-family: inherit;
}

.case-search-input {
  min-width: 220px;
}

.cases-grid {
  max-height: 430px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Leaderboard Modal */
.lb-modal-card {
  max-width: 960px;
}

.lb-mode-pill {
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(74, 222, 128, 0.16);
  color: var(--cs-green);
  margin-left: 8px;
  vertical-align: middle;
}

.lb-meta-bar {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.lb-table-wrap {
  max-height: 62vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 7px;
}

.lb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.lb-table th {
  position: sticky;
  top: 0;
  background: #0d131c;
  color: var(--text-dim);
  text-align: left;
  padding: 9px 10px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.7px;
  border-bottom: 1px solid var(--border);
  z-index: 2;
}

.lb-table td {
  padding: 9px 10px;
  border-bottom: 1px solid rgba(38, 51, 68, 0.55);
  vertical-align: middle;
}

.lb-table tr.is-me {
  background: rgba(245, 158, 11, 0.10);
}

.lb-rank {
  font-weight: 900;
  font-size: 13px;
  color: var(--text-dim);
}

.lb-rank.r1 { color: var(--cs-gold); }
.lb-rank.r2 { color: #e2e8f0; }
.lb-rank.r3 { color: #fb923c; }

.online-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  background: #475569;
}

.online-dot.live {
  background: var(--cs-green);
  box-shadow: 0 0 8px var(--cs-green);
}

.lb-skins-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 310px;
}

.lb-skin-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #0d131c;
  border: 1px solid var(--border);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.lb-skin-pill img {
  height: 18px;
  width: auto;
  object-fit: contain;
}
