/* ==============================================================
   CS2 SKIN UPGRADER — COMPACT & ERGONOMIC MODERN UI
   ============================================================== */

:root {
  --bg-main: #070a10;
  --bg-surface: #0c111a;
  --bg-panel: rgba(14, 20, 32, 0.88);
  --bg-card: rgba(18, 25, 40, 0.7);
  --bg-card-hover: rgba(26, 36, 56, 0.95);
  --border-muted: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(0, 242, 254, 0.35);
  
  --neon-cyan: #00f2fe;
  --neon-cyan-glow: rgba(0, 242, 254, 0.3);
  --neon-emerald: #10b981;
  --neon-emerald-glow: rgba(16, 185, 129, 0.3);
  --neon-ruby: #ef4444;
  --neon-ruby-glow: rgba(239, 68, 68, 0.3);
  --neon-gold: #f59e0b;
  --neon-gold-glow: rgba(245, 158, 11, 0.3);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Chakra Petch', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(ellipse 90% 45% at 50% -15%, rgba(0, 242, 254, 0.06), transparent),
    radial-gradient(ellipse 60% 40% at 50% 115%, rgba(16, 185, 129, 0.05), transparent),
    linear-gradient(rgba(255, 255, 255, 0.01) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.01) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 32px 32px, 32px 32px;
  color: #f1f5f9;
  font-family: var(--font-sans);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* Confetti FX Canvas */
#fx-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99999;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: rgba(8, 11, 17, 0.6);
}
::-webkit-scrollbar-thumb {
  background: #1c273a;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2b3c59;
}

/* App Wrapper */
.app-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

/* ==============================================================
   NAVBAR (Compact 46px)
   ============================================================== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 20px;
  background: rgba(10, 15, 24, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-muted);
  flex-shrink: 0;
  z-index: 20;
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.logo-shield {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.15), rgba(16, 185, 129, 0.2));
  border: 1.5px solid var(--neon-cyan);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-cyan);
  box-shadow: 0 0 10px var(--neon-cyan-glow);
}
.brand-text {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
  line-height: 1.1;
}
.brand-name strong {
  color: var(--neon-cyan);
  text-shadow: 0 0 8px var(--neon-cyan-glow);
}
.brand-tag {
  font-size: 7.5px;
  letter-spacing: 1.4px;
  color: #64748b;
  font-weight: 800;
}

/* Stats Ribbon */
.stats-ribbon {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(16, 22, 36, 0.75);
  border: 1px solid var(--border-muted);
  padding: 3px 14px;
  border-radius: 16px;
}
.stat-separator {
  width: 1px;
  height: 16px;
  background: var(--border-muted);
}
.stat-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat-cell-title {
  font-size: 9px;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
}
.stat-cell-value {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: #e2e8f0;
}
.text-cyan {
  color: var(--neon-cyan);
}

/* User Controls */
.balance-container {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(16, 22, 36, 0.95));
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 3px 10px;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.1);
}
.balance-gold-icon {
  font-size: 14px;
}
.balance-info {
  display: flex;
  flex-direction: column;
}
.balance-label {
  font-size: 7.5px;
  color: #94a3b8;
  font-weight: 800;
}
.balance-val {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  color: #f59e0b;
}

.btn-balance-refill {
  background: #1e293b;
  color: #f1f5f9;
  border: 1px solid var(--border-muted);
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 9.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-balance-refill:hover {
  background: var(--neon-gold);
  color: #070a10;
  border-color: var(--neon-gold);
}

.btn-top-util {
  background: #111724;
  border: 1px solid var(--border-muted);
  color: #94a3b8;
  padding: 4px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-top-util:hover {
  background: #1a2335;
  color: #fff;
  border-color: var(--neon-cyan);
}
.util-text {
  font-size: 10.5px;
  font-weight: 700;
}

/* ==============================================================
   TOP UPGRADE ARENA (Horizontal Flow, Balanced Proportions)
   ============================================================== */
.upgrade-arena {
  display: grid;
  grid-template-columns: 280px minmax(440px, 500px) 280px;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding: 12px 24px;
  background: radial-gradient(circle at 50% 50%, #111725 0%, #080c13 85%);
  border-bottom: 1px solid var(--border-muted);
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

/* Arena Cards: Offer & Target */
.arena-card {
  height: 360px;
  background: rgba(14, 20, 32, 0.88);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-muted);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.offer-card {
  border-top: 2px solid var(--neon-cyan);
}
.target-card {
  border-top: 2px solid var(--neon-emerald);
}

.card-header-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #94a3b8;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.tag-dot.cyan {
  background: var(--neon-cyan);
  box-shadow: 0 0 6px var(--neon-cyan);
}
.tag-dot.emerald {
  background: var(--neon-emerald);
  box-shadow: 0 0 6px var(--neon-emerald);
}

.card-inner-display {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 6px;
}

/* Empty Bet Placeholder */
.empty-bet-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  color: #475569;
  padding: 12px;
}
.placeholder-icon {
  font-size: 36px;
  opacity: 0.5;
}
.placeholder-text {
  font-size: 11px;
  line-height: 1.4;
}

/* Filled Bet Presentation */
.selected-bet-content.filled {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  animation: fadeIn 0.2s ease-out;
}
.bet-thumb-box {
  width: 200px;
  height: 135px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bet-thumb-box img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.95));
  animation: weaponFloat 3s ease-in-out infinite alternate;
}
.bet-meta-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}
.bet-weapon-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 245px;
}
.bet-price-badge {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 800;
  color: var(--neon-cyan);
  margin-top: 3px;
}

.offer-quick-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: #0a0e16;
  border: 1px solid var(--border-muted);
  border-radius: 6px;
  padding: 5px 8px;
  margin-top: 4px;
}
.quick-bet-label {
  font-size: 10px;
  color: #64748b;
  font-weight: 700;
}
.quick-bet-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
}
.currency-tag {
  color: var(--neon-emerald);
  font-weight: 800;
  font-size: 12px;
}
.quick-bet-wrap input {
  width: 65px;
  background: #121824;
  border: 1px solid var(--border-muted);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 5px;
  border-radius: 4px;
  outline: none;
}
.btn-apply-bet {
  background: #1e283c;
  color: #fff;
  border: 1px solid var(--border-muted);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.btn-apply-bet:hover {
  background: var(--neon-cyan);
  color: #070a10;
}

/* Target Card Presentation */
.target-weapon-halo {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--target-color, #eb4b4b) 0%, transparent 70%);
  opacity: 0.28;
  pointer-events: none;
  animation: haloPulse 3s ease-in-out infinite alternate;
}
.target-weapon-render {
  width: 200px;
  height: 135px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}
.target-weapon-render img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.95));
  animation: weaponFloat 3s ease-in-out infinite alternate;
}
.target-weapon-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 2;
  width: 100%;
}
.target-weapon-wear {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #64748b;
}
.target-weapon-title {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 225px;
  margin-top: 1px;
}
.target-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.target-price-tag {
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 2px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  color: #f59e0b;
}
.coin-icon {
  font-size: 12px;
}
.target-profit-badge {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 2px 8px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  color: var(--neon-emerald);
}
.target-card-footer {
  text-align: center;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.target-footer-hint {
  font-size: 9.5px;
  color: #64748b;
}

/* ==============================================================
   CENTER CONSOLE: WHEEL & ACTION BUTTONS
   ============================================================== */
.arena-center-console {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.wheel-stage-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wheel-back-glow {
  position: absolute;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, rgba(0, 242, 254, 0.1) 50%, transparent 75%);
  pointer-events: none;
  animation: glowBreathe 3.5s ease-in-out infinite alternate;
}

/* Sizable, Commanding Wheel (380px) */
.wheel-svg-wrap {
  position: relative;
  width: 380px;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#wheel-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.wheel-track-slot {
  fill: none;
  stroke: #0a0e16;
  stroke-width: 36;
}

.wheel-lose-arc {
  fill: none;
  stroke: url(#loseDark);
  stroke-width: 36;
}

.wheel-win-arc {
  fill: none;
  stroke: url(#winPlasma);
  stroke-width: 36;
  stroke-linecap: butt;
  transition: stroke 0.3s ease;
}

.wheel-tick-text {
  fill: #64748b;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-anchor: middle;
  dominant-baseline: central;
}

/* Needle */
.wheel-needle {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transform: rotate(0deg);
  transform-origin: 50% 50%;
  z-index: 25;
}

.needle-metallic-shaft {
  position: absolute;
  top: 5px;
  left: calc(50% - 11px);
  width: 22px;
  height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.95));
}

.needle-cyan-core {
  width: 5px;
  height: 46px;
  background: linear-gradient(to bottom, #ffffff, var(--neon-cyan));
  border-radius: 3px;
  box-shadow: 0 0 10px #ffffff, 0 0 20px var(--neon-cyan);
}

.needle-arrow-tip {
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 16px solid #ffffff;
  filter: drop-shadow(0 0 10px var(--neon-cyan));
  margin-top: -2px;
}

/* Wheel Center Hub (Data & Results) */
.wheel-hub-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, #131a29 0%, #090c13 85%);
  border: 3.5px solid #233047;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.95), 0 0 30px rgba(0, 0, 0, 0.7);
  z-index: 10;
  overflow: hidden;
  padding: 12px;
}

.hub-data-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hub-sub-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: #64748b;
  text-transform: uppercase;
}

.hub-main-chance {
  font-family: var(--font-mono);
  font-size: 38px;
  font-weight: 800;
  color: var(--neon-emerald);
  text-shadow: 0 0 18px var(--neon-emerald-glow);
  line-height: 1.1;
  margin: 4px 0;
}

.hub-mult-pill {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  color: var(--neon-cyan);
  background: rgba(0, 242, 254, 0.12);
  border: 1px solid rgba(0, 242, 254, 0.35);
  padding: 3px 14px;
  border-radius: 14px;
}

/* Result Overlay */
.center-result-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 12, 18, 0.94);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 15;
  animation: overlayPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.center-result-overlay.hidden {
  display: none;
}
.result-number {
  font-family: var(--font-mono);
  font-size: 38px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
}
.result-verdict {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 4px 16px;
  border-radius: 12px;
  margin-top: 4px;
}
.result-verdict.win {
  color: var(--neon-emerald);
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid var(--neon-emerald);
  box-shadow: 0 0 12px var(--neon-emerald-glow);
}
.result-verdict.lose {
  color: var(--neon-ruby);
  background: rgba(239, 68, 68, 0.25);
  border: 1px solid var(--neon-ruby);
  box-shadow: 0 0 12px var(--neon-ruby-glow);
}

/* Console Actions */
.console-actions {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.side-toggle-group {
  display: flex;
  gap: 8px;
}
.btn-side-pill {
  flex: 1;
  background: #111726;
  border: 1px solid var(--border-muted);
  border-radius: 6px;
  padding: 4px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: all 0.15s;
}
.side-pill-name {
  font-size: 8.5px;
  font-weight: 800;
  color: #94a3b8;
}
.side-pill-range {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: #64748b;
}
.btn-side-pill.active {
  background: rgba(0, 242, 254, 0.12);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}
.btn-side-pill.active .side-pill-name {
  color: var(--neon-cyan);
}
.btn-side-pill.active .side-pill-range {
  color: #fff;
}

/* Giant Radiant Upgrade Button */
.btn-primary-upgrade {
  width: 100%;
  position: relative;
  background: linear-gradient(135deg, #00f2fe 0%, #10b981 100%);
  color: #040810;
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 242, 254, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary-upgrade:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(0, 242, 254, 0.55);
}
.btn-primary-upgrade:active:not(:disabled) {
  transform: translateY(1px);
}
.btn-primary-upgrade:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.btn-sweep-glow {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-25deg);
  animation: sweepAnim 3s infinite ease-in-out;
}
@keyframes sweepAnim {
  0% { left: -100%; }
  30%, 100% { left: 180%; }
}

.btn-inner-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}
.btn-title-text {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.btn-detail-text {
  font-size: 10px;
  font-weight: 700;
  opacity: 0.9;
}

/* Micro Options Strip */
.console-options-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 10px;
  color: #64748b;
  padding: 0 4px;
}

.toggle-fast-mode {
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.toggle-fast-mode input {
  display: none;
}
.toggle-switch-track {
  width: 24px;
  height: 13px;
  background: #1c2638;
  border-radius: 10px;
  position: relative;
  transition: background 0.2s;
}
.toggle-switch-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 9px;
  height: 9px;
  background: #94a3b8;
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}
.toggle-fast-mode input:checked + .toggle-switch-track {
  background: var(--neon-cyan);
}
.toggle-fast-mode input:checked + .toggle-switch-track::after {
  transform: translateX(11px);
  background: #070a10;
}
.toggle-caption {
  font-size: 9.5px;
  font-weight: 600;
}

.edge-slider-compact {
  display: flex;
  align-items: center;
  gap: 4px;
}
.edge-caption {
  font-size: 9.5px;
}
.edge-slider-compact input[type="range"] {
  width: 50px;
  accent-color: var(--neon-cyan);
  cursor: pointer;
}
.edge-value-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  color: var(--neon-cyan);
}

.sim-test-buttons {
  display: flex;
  align-items: center;
  gap: 3px;
}
.sim-label {
  font-size: 9.5px;
}
.btn-sim-run {
  background: #121824;
  border: 1px solid var(--border-muted);
  color: #94a3b8;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}
.btn-sim-run:hover {
  background: #202b3f;
  color: #fff;
  border-color: var(--neon-cyan);
}

/* ==============================================================
   LOWER WORKSPACE: 50% / 50% SPLIT (INVENTORY vs TARGET CATALOG)
   ============================================================== */
.workspace-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 8px 16px 6px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-muted);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.panel-header-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: rgba(18, 25, 40, 0.7);
  border-bottom: 1px solid var(--border-muted);
  flex-shrink: 0;
  gap: 8px;
}

.panel-title-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.panel-icon {
  font-size: 14px;
}
.panel-title-group h3 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #fff;
}
.badge-pill {
  font-size: 9.5px;
  color: #94a3b8;
  background: #0a0e16;
  padding: 1px 6px;
  border-radius: 8px;
  border: 1px solid var(--border-muted);
}

.panel-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.compact-search-box {
  position: relative;
  display: flex;
  align-items: center;
}
.search-ico {
  position: absolute;
  left: 6px;
  font-size: 10px;
  color: #64748b;
  pointer-events: none;
}
.search-input-field {
  background: #111724;
  border: 1px solid var(--border-muted);
  color: #f1f5f9;
  padding: 4px 6px 4px 22px;
  border-radius: 4px;
  font-size: 10px;
  outline: none;
  width: 120px;
  transition: width 0.2s;
}
.search-input-field:focus {
  border-color: var(--neon-cyan);
  width: 150px;
}

.btn-util-compact {
  background: #162030;
  border: 1px solid var(--border-muted);
  color: #94a3b8;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 10px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-util-compact:hover {
  background: #233149;
  color: #fff;
}

.select-sort-compact {
  background: #111724;
  border: 1px solid var(--border-muted);
  color: #f1f5f9;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 10px;
  outline: none;
}

/* Multiplier Chips Bar (Inside Target Panel Header) */
.preset-multipliers-chips {
  display: flex;
  align-items: center;
  gap: 3px;
  overflow-x: auto;
}
.btn-mult-chip {
  background: #121824;
  color: #94a3b8;
  border: 1px solid var(--border-muted);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s;
  white-space: nowrap;
}
.btn-mult-chip:hover {
  background: #1f2a3e;
  color: #fff;
}
.btn-mult-chip.active {
  background: rgba(0, 242, 254, 0.15);
  border-color: var(--neon-cyan);
  color: var(--neon-cyan);
  box-shadow: 0 0 8px var(--neon-cyan-glow);
}

/* ==============================================================
   CARDS GRID & CS2 SKIN CARDS (COMPACT & PROPORTIONED)
   ============================================================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(115px, 1fr));
  grid-auto-rows: 125px;
  align-content: start;
  gap: 8px;
  padding: 8px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.skin-item-card {
  height: 125px;
  max-height: 125px;
  background: var(--bg-card);
  border: 1px solid var(--border-muted);
  border-radius: 6px;
  padding: 6px 4px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
}
.skin-item-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2.5px;
  background: var(--card-color, #4b69ff);
  box-shadow: 0 0 5px var(--card-color, #4b69ff);
}
.skin-item-card::after {
  content: '';
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, var(--card-color, #4b69ff) 0%, transparent 70%);
  opacity: 0.12;
  pointer-events: none;
  transition: opacity 0.15s;
}
.skin-item-card:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}
.skin-item-card:hover::after {
  opacity: 0.3;
}
.skin-item-card.selected {
  border-color: var(--neon-cyan) !important;
  box-shadow: 0 0 12px var(--neon-cyan-glow) !important;
  background: #151e2e;
}

.item-wear-tag {
  align-self: flex-end;
  font-size: 7.5px;
  font-weight: 800;
  color: #64748b;
  background: rgba(0, 0, 0, 0.4);
  padding: 1px 3px;
  border-radius: 3px;
  line-height: 1;
}
.item-render-wrap {
  width: 85px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  position: relative;
  z-index: 2;
}
.item-render-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.8));
  transition: transform 0.15s ease;
}
.skin-item-card:hover .item-render-wrap img {
  transform: scale(1.05);
}
.item-meta {
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.item-weapon {
  font-size: 8.5px;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 105px;
}
.item-name {
  font-size: 9.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 105px;
  margin-top: 1px;
}
.item-price-badge {
  margin-top: 2px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 1px 5px;
  border-radius: 8px;
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 800;
  color: #f59e0b;
}

/* ==============================================================
   COMPACT HISTORY FOOTER (32px)
   ============================================================== */
.history-footer {
  display: flex;
  align-items: center;
  height: 32px;
  padding: 0 16px;
  background: rgba(8, 12, 18, 0.95);
  border-top: 1px solid var(--border-muted);
  flex-shrink: 0;
  gap: 12px;
  z-index: 10;
}
.history-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
}
.history-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--neon-cyan);
}
.history-stream {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  flex: 1;
}
.empty-hint {
  font-size: 9.5px;
  color: #475569;
}
.history-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
}
.history-pill.win {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--neon-emerald);
}
.history-pill.lose {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: var(--neon-ruby);
}

/* ==============================================================
   PROVABLY FAIR MODAL
   ============================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(4, 7, 12, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.modal-overlay.hidden {
  display: none;
}
.modal-card {
  width: 90%;
  max-width: 560px;
  background: #0f1624;
  border: 1px solid var(--border-accent);
  border-radius: 10px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background: #141d2e;
  border-bottom: 1px solid var(--border-muted);
}
.modal-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-title-group h3 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.btn-close-modal {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
}
.btn-close-modal:hover {
  color: #fff;
}
.modal-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pf-explanation {
  font-size: 11px;
  line-height: 1.5;
  color: #94a3b8;
}
.pf-explanation code {
  color: var(--neon-cyan);
  background: rgba(0, 242, 254, 0.1);
  padding: 1px 4px;
  border-radius: 3px;
}
.pf-fieldset {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pf-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pf-field label {
  font-size: 10px;
  font-weight: 700;
  color: #cbd5e1;
}
.code-box-line {
  background: #080c14;
  border: 1px solid var(--border-muted);
  border-radius: 5px;
  padding: 6px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #38bdf8;
  word-break: break-all;
}
.highlight-number {
  color: var(--neon-emerald);
  font-size: 13px;
  font-weight: 800;
}
.input-action-row {
  display: flex;
  gap: 6px;
}
.input-action-row input {
  flex: 1;
  background: #080c14;
  border: 1px solid var(--border-muted);
  border-radius: 5px;
  padding: 6px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #fff;
  outline: none;
}
.btn-util-small {
  background: #1b2537;
  color: #fff;
  border: 1px solid var(--border-muted);
  padding: 0 10px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}
.code-input {
  background: #080c14;
  border: 1px solid var(--border-muted);
  border-radius: 5px;
  padding: 5px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #cbd5e1;
  outline: none;
}
.pf-separator {
  border: none;
  height: 1px;
  background: var(--border-muted);
}
.pf-calc-heading {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

/* Animations */
@keyframes glowBreathe {
  0% { transform: scale(0.96); opacity: 0.5; }
  100% { transform: scale(1.04); opacity: 0.9; }
}
@keyframes haloPulse {
  0% { transform: scale(0.92); opacity: 0.18; }
  100% { transform: scale(1.12); opacity: 0.38; }
}
@keyframes weaponFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-4px); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes overlayPop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

/* Responsive adjustments */
@media (max-width: 1100px) {
  .upgrade-arena {
    grid-template-columns: 220px 1fr 220px;
    gap: 12px;
  }
}
