﻿/* =====================================================================
   SKINBOX — UNIFIED DESIGN SYSTEM
   Deep dark mode • Neon accents • Glassmorphism
   ===================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  /* Backgrounds — graphite/charcoal, not violet */
  --bg-base:        #0b0d0f;
  --bg-deep:        #0e1113;
  --bg-panel:       rgba(24, 27, 30, 0.6);
  --bg-panel-solid: #181b1e;
  --bg-elev:        rgba(34, 38, 42, 0.65);
  --bg-input:       rgba(14, 16, 18, 0.75);

  /* Brand gradients — amber/copper, not violet/blue */
  --grad-amber:   #d98e2b;
  --grad-copper:  #8a4a24;
  --grad-charcoal:#20242a;

  /* Accents — warm amber replaces neon-violet as primary brand accent */
  --neon-orange:  #ff8c00;
  --neon-orange-2:#ffb347;
  --neon-blue:    #3aa0c9;
  --neon-violet:  #c99a4a;
  --neon-green:   #2ee6a6;

  /* Rarity colors (CS-standard palette, kept as-is — game convention, not brand identity) */
  --rar-common:    #6a7280;
  --rar-uncommon:  #4b8bff;
  --rar-rare:      #8a2be2;
  --rar-mythical:  #d63cff;
  --rar-legendary: #ff8c00;
  --rar-covert:    #ff3c6e;
  --rar-gold:      #ffd24a;

  /* Text */
  --text:        #f2f0ec;
  --text-soft:   #b8b3a8;
  --text-dim:    #837d70;
  --text-faint:  #524e46;

  /* Borders / glow — amber-tinted, not violet */
  --border:        rgba(217, 142, 43, 0.14);
  --border-strong: rgba(217, 142, 43, 0.28);
  --glow-orange:   0 0 18px rgba(255, 140, 0, 0.55);
  --glow-blue:     0 0 16px rgba(58, 160, 201, 0.5);
  --glow-violet:   0 0 16px rgba(201, 154, 74, 0.5);

  /* Geometry */
  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  /* Layout */
  --sidebar-w: 232px;
  --header-h:  68px;
  --maxw:      1480px;

  /* Easing */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font: 'Inter', 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- Reset (supplements harness reset) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1100px 700px at 80% -10%, rgba(217, 142, 43, 0.14), transparent 60%),
    radial-gradient(900px 600px at -10% 20%, rgba(40, 44, 48, 0.55), transparent 55%),
    radial-gradient(700px 500px at 50% 120%, rgba(138, 74, 36, 0.12), transparent 60%),
    var(--bg-base);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  min-height: 100vh;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select { font-family: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }

/* ---------- Animated grid backdrop ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(217, 142, 43, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 142, 43, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 80%);
}

/* ---------- Typography helpers ---------- */
.page-title { font-size: clamp(22px, 3vw, 30px); }
.section-title { font-size: 18px; letter-spacing: .04em; text-transform: uppercase; }
.muted { color: var(--text-dim); }
.eyebrow {
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--neon-blue); font-weight: 600;
}

/* ---------- Glass panel ---------- */
.glass {
  background: var(--bg-panel);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 14px; letter-spacing: .02em;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease), background .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }

.btn-cta {
  color: #1c0f00;
  background: linear-gradient(135deg, var(--neon-orange-2), var(--neon-orange));
  box-shadow: var(--glow-orange), inset 0 1px 0 rgba(255,255,255,.35);
}
.btn-cta:hover { box-shadow: 0 0 28px rgba(255,140,0,.8), inset 0 1px 0 rgba(255,255,255,.4); transform: translateY(-1px); }

.btn-ghost {
  color: var(--neon-orange-2);
  border: 1px solid rgba(255, 140, 0, .5);
  background: rgba(255, 140, 0, .06);
}
.btn-ghost:hover { background: rgba(255, 140, 0, .14); box-shadow: var(--glow-orange); }

.btn-dark {
  color: var(--text-soft);
  background: var(--bg-elev);
  border: 1px solid var(--border);
}
.btn-dark:hover { border-color: var(--border-strong); color: var(--text); }

.btn-violet {
  color: #fff;
  background: linear-gradient(135deg, var(--neon-violet), #8a4a24);
  box-shadow: var(--glow-violet);
}
.btn-violet:hover { box-shadow: 0 0 26px rgba(201,154,74,.8); transform: translateY(-1px); }

.btn-block { width: 100%; }
.btn-lg { padding: 14px 28px; font-size: 15px; }

/* ---------- Inputs ---------- */
.field {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  transition: border-color .2s, box-shadow .2s;
}
.field:focus-within { border-color: rgba(0,191,255,.6); box-shadow: var(--glow-blue); }
.field input { background: none; border: none; outline: none; color: var(--text); width: 100%; font-size: 14px; }
.field input::placeholder { color: var(--text-faint); }
.field svg { color: var(--text-dim); flex-shrink: 0; }

/* ---------- Badges / chips ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  background: var(--bg-elev); border: 1px solid var(--border); color: var(--text-soft);
}
.badge-new   { color: var(--neon-green);  border-color: rgba(46,230,166,.4); background: rgba(46,230,166,.1); }
.badge-hot   { color: var(--neon-orange); border-color: rgba(255,140,0,.4);  background: rgba(255,140,0,.1); }
.badge-live  { color: var(--rar-covert); border-color: rgba(255,60,110,.4); background: rgba(255,60,110,.1); }
.badge-live::before { content:""; width:7px; height:7px; border-radius:50%; background: var(--rar-covert); box-shadow: 0 0 8px var(--rar-covert); animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

/* ---------- Rarity utility ---------- */
.r-common    { --rar: var(--rar-common); }
.r-uncommon  { --rar: var(--rar-uncommon); }
.r-rare      { --rar: var(--rar-rare); }
.r-mythical  { --rar: var(--rar-mythical); }
.r-legendary { --rar: var(--rar-legendary); }
.r-covert    { --rar: var(--rar-covert); }
.r-gold      { --rar: var(--rar-gold); }

/* ---------- Scrollbars ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(217,142,43,.25); border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(217,142,43,.45); background-clip: padding-box; }

/* ---------- Utilities ---------- */
.flex { display: flex; }
.between { display: flex; align-items: center; justify-content: space-between; }
.center { display: flex; align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.mt-8{margin-top:8px}.mt-16{margin-top:16px}.mt-24{margin-top:24px}.mt-32{margin-top:32px}
.text-c { text-align: center; }
.hide-mobile { }
.fade-up { animation: fadeUp .5s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Age/Terms Popup ---------- */
.sb-popup-overlay {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(7, 6, 13, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease);
}
.sb-popup-overlay.open { opacity: 1; pointer-events: all; }
.sb-popup-overlay.open .sb-popup-box { transform: none; opacity: 1; }

.sb-popup-box {
  position: relative;
  width: 100%; max-width: 480px; margin: 16px;
  background: linear-gradient(160deg, rgba(22,16,42,0.98) 0%, rgba(14,10,28,0.99) 100%);
  border: 1px solid rgba(217,142,43,.22);
  border-radius: var(--radius-xl);
  padding: 40px 36px 32px;
  box-shadow: 0 32px 80px rgba(0,0,0,.7), 0 0 0 1px rgba(255,140,0,.05);
  transform: translateY(20px) scale(.97); opacity: 0;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}

.sb-popup-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim); border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
}
.sb-popup-close:hover { color: var(--text); background: rgba(255,255,255,.07); }

.sb-popup-icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,191,255,.1);
  border: 1px solid rgba(0,191,255,.25);
  border-radius: var(--radius);
  color: var(--neon-blue);
  margin-bottom: 20px;
}

.sb-skin-preview {
  width: 100%; height: 160px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(217,142,43,.14);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.sb-skin-preview img {
  max-height: 130px; max-width: 80%; object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,.6));
}

.sb-popup-title {
  font-size: clamp(22px, 5vw, 28px);
  font-weight: 900; letter-spacing: -.01em;
  line-height: 1.1; margin-bottom: 12px;
}

.sb-popup-sub {
  color: var(--text-dim); font-size: 14px; line-height: 1.55;
  margin: 0 0 24px;
}

.sb-check-row {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(217,142,43,.14);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  font-size: 14px; color: var(--text-soft);
  transition: border-color .2s, background .2s;
  margin-bottom: 10px;
  user-select: none;
}
.sb-check-row:hover { border-color: rgba(217,142,43,.3); background: rgba(255,255,255,.06); }

.sb-checkbox {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 7px;
  border: 2px solid rgba(217,142,43,.4);
  background: rgba(12,10,24,.7);
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, background .2s, box-shadow .2s;
  position: relative;
}
.sb-checkbox.checked {
  background: var(--neon-blue);
  border-color: var(--neon-blue);
  box-shadow: 0 0 10px rgba(0,191,255,.5);
}
.sb-checkbox.checked::after {
  content: '';
  display: block;
  width: 5px; height: 9px;
  border: 2px solid #fff;
  border-top: none; border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}

.sb-accent { color: var(--neon-blue); }
.sb-link { color: var(--neon-blue); text-decoration: underline; text-underline-offset: 3px; }
.sb-link:hover { color: var(--neon-orange-2); }

.sb-popup-actions {
  display: flex; gap: 10px; margin-top: 24px;
}
.sb-popup-cancel { flex: 1; }
.sb-popup-confirm {
  flex: 2;
  transition: opacity .2s, transform .18s var(--ease), box-shadow .25s var(--ease);
}
.sb-popup-confirm:disabled,
.sb-popup-confirm.is-disabled {
  opacity: .35; cursor: not-allowed;
  box-shadow: none; transform: none !important;
}

/* ---------- Steam login button in header ---------- */
.btn-steam {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 21px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 18px;
  background: #f3ca80;
  border: 1px solid rgba(243,202,128,.4);
  color: #202133;
  white-space: nowrap;
  transition: background .2s, border-color .2s, box-shadow .2s, color .2s;
  cursor: pointer;
}
.btn-steam:hover {
  background: #f0bb5c;
  border-color: rgba(243,202,128,.7);
  box-shadow: 0 0 18px rgba(243,202,128,.4);
  color: #202133;
}
.btn-steam svg { flex-shrink: 0; }

/* ---------- btn-cta.mt-8 override ---------- */
.btn.btn-cta.mt-8 {
  color: #000;
  background: #f3ca80;
  box-shadow: none;
}
.btn.btn-cta.mt-8:hover {
  background: #f0bb5c;
  box-shadow: 0 0 18px rgba(243,202,128,.5);
  transform: translateY(-1px);
}

/* ---------- Language switcher ---------- */
.lang-switch {
  display: inline-flex; align-items: center; gap: 2px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
}
.ls-btn {
  padding: 5px 10px; border-radius: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: .06em;
  color: var(--text-dim);
  transition: background .15s, color .15s;
  cursor: pointer;
}
.ls-btn.active {
  background: #f3ca80;
  color: #202133;
}
.ls-btn:not(.active):hover { color: var(--text); }
.ls-sep { width: 1px; height: 16px; background: var(--border); }
