/* =============================================
   CS2Skins — Main Stylesheet
   Dark theme with glassmorphism and CS2 aesthetics
   ============================================= */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ---- CSS Variables ---- */
:root {
  --bg-primary:    #080c18;
  --bg-secondary:  #0d1224;
  --bg-card:       #111827;
  --bg-card-hover: #1a2235;
  --bg-elevated:   #1f2d44;
  --border:        rgba(255,255,255,0.07);
  --border-bright: rgba(255,255,255,0.15);

  --accent:        #6366f1;
  --accent-light:  #818cf8;
  --accent-dark:   #4f46e5;
  --gold:          #f59e0b;
  --green:         #22c55e;
  --red:           #ef4444;

  --text-primary:  #f1f5f9;
  --text-secondary:#94a3b8;
  --text-muted:    #475569;

  /* Rarity colors */
  --consumer:   #b0c3d9;
  --industrial: #5e98d9;
  --milspec:    #4b69ff;
  --restricted: #8847ff;
  --classified: #d32ce6;
  --covert:     #eb4b4b;
  --special:    #e4ae39;

  --font: 'Inter', system-ui, sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.6);
  --transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(99,102,241,0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(139,92,246,0.08) 0%, transparent 50%);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }
input, select, textarea { font-family: var(--font); }
ul { list-style: none; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(8,12,24,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.logo-icon { font-size: 1.4rem; }
.logo-accent { color: var(--accent-light); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  white-space: nowrap;
}
.nav-link:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }
.nav-link.active { color: var(--accent-light); background: rgba(99,102,241,0.15); }
.nav-icon { font-size: 1rem; }

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.btn-deposit {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: white;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: var(--transition);
  box-shadow: 0 0 16px rgba(34,197,94,0.3);
}
.btn-deposit:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(34,197,94,0.4); }
.deposit-icon { font-weight: 900; font-size: 1rem; }

.user-balance {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.3);
  padding: 6px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fbbf24;
}
.balance-amount { transition: var(--transition); }

.user-menu { position: relative; }
.user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: var(--transition);
  color: var(--text-primary);
}
.user-btn:hover { border-color: var(--accent); background: var(--bg-card-hover); }
.user-avatar {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
}
.user-name { font-size: 0.875rem; font-weight: 600; }
.user-level {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
  background: rgba(245,158,11,0.1);
  padding: 2px 6px;
  border-radius: 4px;
}
.menu-arrow { font-size: 0.6rem; color: var(--text-muted); transition: var(--transition); }
.user-btn.open .menu-arrow { transform: rotate(180deg); }

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 200px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  padding: 8px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition);
  z-index: 100;
}
.user-dropdown.show { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: var(--transition);
  color: var(--text-secondary);
}
.dropdown-item:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }
.admin-link { color: var(--gold); }
.admin-link:hover { background: rgba(245,158,11,0.1); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

.btn-login {
  padding: 8px 16px;
  border: 1px solid var(--border-bright);
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
}
.btn-login:hover { color: var(--text-primary); border-color: var(--accent); }
.btn-register {
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
  transition: var(--transition);
}
.btn-register:hover { opacity: 0.9; transform: translateY(-1px); }

/* =============================================
   LAYOUT
   ============================================= */
.main-content { min-height: calc(100vh - 64px); }
.container { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.page-wrapper { padding: 32px 24px; max-width: 1400px; margin: 0 auto; }

.page-header {
  margin-bottom: 32px;
}
.page-title {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-subtitle { color: var(--text-secondary); margin-top: 4px; }

/* =============================================
   CARDS
   ============================================= */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover { border-color: var(--border-bright); transform: translateY(-2px); box-shadow: var(--shadow); }
.card-body { padding: 24px; }

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: white;
  box-shadow: 0 4px 15px rgba(99,102,241,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(99,102,241,0.4); }
.btn-primary:active { transform: translateY(0); }
.btn-success { background: linear-gradient(135deg, #22c55e, #16a34a); color: white; box-shadow: 0 4px 15px rgba(34,197,94,0.3); }
.btn-success:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(34,197,94,0.4); }
.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; }
.btn-danger:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-bright);
  color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent-light); background: rgba(99,102,241,0.08); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold), #d97706);
  color: #1a1200;
  font-weight: 700;
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(245,158,11,0.4); }
.btn-sm { padding: 8px 16px; font-size: 0.8rem; }
.btn-lg { padding: 16px 36px; font-size: 1.1rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* =============================================
   FORMS
   ============================================= */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(99,102,241,0.05);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.form-input::placeholder { color: var(--text-muted); }
.form-select option { background: var(--bg-elevated); }
.form-error { color: var(--red); font-size: 0.8rem; margin-top: 4px; }

/* =============================================
   SKIN CARD (Core component)
   ============================================= */
.skin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  cursor: pointer;
}
.skin-card:hover {
  transform: translateY(-4px);
  border-color: var(--rarity-color, var(--accent));
  box-shadow: 0 8px 30px rgba(0,0,0,0.5), 0 0 20px rgba(var(--rarity-rgb, 99,102,241), 0.2);
}
.skin-card-image {
  width: 100%;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(0,0,0,0.3), var(--bg-elevated));
}
.skin-card-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(var(--rarity-rgb, 99,102,241), 0.15), transparent 70%);
}
.skin-weapon-icon {
  font-size: 3.5rem;
  z-index: 1;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
  transition: var(--transition);
}
.skin-card:hover .skin-weapon-icon { transform: scale(1.1) rotate(-5deg); }
.skin-card-info { padding: 12px; }
.skin-weapon { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }
.skin-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 2px 0;
}
.skin-wear { font-size: 0.7rem; color: var(--text-muted); }
.skin-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}
.skin-price { font-size: 0.875rem; font-weight: 700; color: var(--green); }
.skin-rarity-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* =============================================
   CASE CARD
   ============================================= */
.case-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}
.case-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.case-card-image {
  height: 180px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.case-card-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(transparent, var(--bg-card));
}
.case-box-icon { font-size: 5rem; z-index: 1; animation: float 3s ease-in-out infinite; filter: drop-shadow(0 8px 24px rgba(0,0,0,0.6)); }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.case-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.case-card-name { font-size: 1rem; font-weight: 800; line-height: 1.2; }
.case-card-items { font-size: 0.75rem; color: var(--text-muted); }
.case-card-price {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--green);
  margin-top: auto;
}
.case-card-foot {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.case-opens { font-size: 0.75rem; color: var(--text-muted); }
.best-item-badge { display: flex; align-items: center; gap: 4px; }
.best-item-dot { width: 8px; height: 8px; border-radius: 50%; }
.best-item-name { font-size: 0.7rem; color: var(--text-secondary); }
.featured-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: linear-gradient(135deg, var(--gold), #d97706);
  color: #1a1200;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 10;
}

/* =============================================
   LIVE FEED
   ============================================= */
.live-feed {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.feed-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.9rem;
}
.feed-dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.4); }
  50% { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}
.feed-list { max-height: 400px; overflow-y: auto; }
.feed-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
  animation: slideIn 0.3s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}
.feed-item:hover { background: rgba(255,255,255,0.03); }
.feed-avatar {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  flex-shrink: 0;
}
.feed-info { flex: 1; min-width: 0; }
.feed-user { font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); }
.feed-item-name {
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.feed-value { font-size: 0.8rem; font-weight: 700; color: var(--green); flex-shrink: 0; }
.feed-case { font-size: 0.65rem; color: var(--text-muted); }
.feed-time { font-size: 0.65rem; color: var(--text-muted); flex-shrink: 0; }

/* =============================================
   HERO (Homepage)
   ============================================= */
.hero {
  position: relative;
  overflow: hidden;
  padding: 80px 0;
  text-align: center;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(99,102,241,0.2) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 100%, rgba(139,92,246,0.1) 0%, transparent 40%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(99,102,241,0.15);
  border: 1px solid rgba(99,102,241,0.3);
  color: var(--accent-light);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 20px;
}
.hero h1 .gradient-text {
  background: linear-gradient(135deg, #c026d3, var(--accent-light), #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero p { font-size: 1.2rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto 36px; }
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 52px;
  flex-wrap: wrap;
}
.hero-stat-value {
  font-size: 1.8rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--text-primary), var(--accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-stat-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; }

/* =============================================
   SECTION HEADERS
   ============================================= */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-title {
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-link {
  font-size: 0.85rem;
  color: var(--accent-light);
  font-weight: 500;
  transition: var(--transition);
}
.section-link:hover { color: var(--text-primary); }

/* Cases Grid */
.cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* Skins Grid */
.skins-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

/* =============================================
   TOAST NOTIFICATIONS
   ============================================= */
.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  font-weight: 500;
  min-width: 280px;
  max-width: 380px;
  pointer-events: all;
  animation: toastIn 0.3s ease;
  border-left: 3px solid var(--accent);
}
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast.warning { border-left-color: var(--gold); }
@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100%); }
}

/* =============================================
   MODAL
   ============================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.9) translateY(20px);
  transition: var(--transition);
}
.modal-overlay.show .modal { transform: scale(1) translateY(0); }
.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 700;
}
.modal-close {
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
}
.modal-close:hover { background: rgba(239,68,68,0.2); color: var(--red); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 12px; justify-content: flex-end; }

/* =============================================
   OPENING ANIMATION (Spinning Case)
   ============================================= */
.opening-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 32px 0;
}
.spin-viewport {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 2px solid var(--accent);
  box-shadow: 0 0 30px rgba(99,102,241,0.3), inset 0 0 60px rgba(0,0,0,0.5);
  height: 180px;
}
.spin-viewport::before,
.spin-viewport::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  z-index: 10;
  pointer-events: none;
}
.spin-viewport::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-card), transparent);
}
.spin-viewport::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-card), transparent);
}
.spin-indicator {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  background: linear-gradient(to bottom, transparent, #fff, transparent);
  z-index: 20;
  box-shadow: 0 0 10px rgba(255,255,255,0.8);
}
.spin-track {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 8px;
  padding: 0 8px;
  will-change: transform;
}
.spin-item {
  flex-shrink: 0;
  width: 148px;
  height: 148px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 2px solid transparent;
  transition: border-color 0.2s;
  background: var(--bg-elevated);
  padding: 8px;
}
.spin-item.win {
  border-color: var(--rarity-color, var(--accent));
  box-shadow: 0 0 20px rgba(var(--rarity-rgb), 0.4);
}
.spin-item-icon { font-size: 3rem; }
.spin-item-name {
  font-size: 0.65rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* Win Result Modal */
.win-result {
  text-align: center;
  padding: 16px;
}
.win-item-display {
  width: 160px; height: 160px;
  margin: 0 auto 16px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  position: relative;
  overflow: hidden;
}
.win-item-display::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.2;
  animation: glow-pulse 2s infinite;
}
@keyframes glow-pulse {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.35; }
}
.win-rarity-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.win-item-name { font-size: 1.3rem; font-weight: 800; margin-bottom: 4px; }
.win-item-wear { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 16px; }
.win-price { font-size: 2rem; font-weight: 900; color: var(--green); margin-bottom: 20px; }
.win-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* =============================================
   PROGRESS / LOADER
   ============================================= */
.loader {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

.progress-bar {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #8b5cf6);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* =============================================
   UPGRADE SECTION
   ============================================= */
.upgrade-layout {
  display: grid;
  grid-template-columns: 1fr 200px 1fr;
  gap: 24px;
  align-items: start;
}
.upgrade-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-top: 40px;
}
.upgrade-arrow { font-size: 3rem; color: var(--text-muted); }
.upgrade-chance {
  font-size: 3rem;
  font-weight: 900;
  text-align: center;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.upgrade-chance-label { font-size: 0.75rem; color: var(--text-muted); text-align: center; }
.upgrade-wheel {
  width: 140px; height: 140px;
  border-radius: 50%;
  position: relative;
  background: conic-gradient(
    var(--accent) 0deg,
    var(--accent) var(--chance-deg, 180deg),
    var(--bg-elevated) var(--chance-deg, 180deg),
    var(--bg-elevated) 360deg
  );
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(99,102,241,0.3);
}
.upgrade-wheel::before {
  content: '';
  position: absolute;
  width: 100px; height: 100px;
  background: var(--bg-card);
  border-radius: 50%;
}
.upgrade-wheel-text {
  position: relative;
  font-size: 1.1rem;
  font-weight: 900;
  z-index: 1;
}

/* =============================================
   BATTLE
   ============================================= */
.battle-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}
.battle-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.battle-vs { font-size: 1.5rem; font-weight: 900; color: var(--red); padding: 0 8px; }
.battle-player { flex: 1; text-align: center; }
.battle-player-name { font-weight: 700; font-size: 0.9rem; }
.battle-player-total { font-size: 1.1rem; font-weight: 800; color: var(--green); }
.battle-info { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.battle-rounds-badge {
  background: rgba(99,102,241,0.15);
  color: var(--accent-light);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}
.battle-status-waiting {
  width: 8px; height: 8px;
  background: var(--gold);
  border-radius: 50%;
  animation: pulse-dot 1.5s infinite;
}

/* =============================================
   TABLES
   ============================================= */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
.data-table tr:last-child td { border-bottom: none; }

/* =============================================
   BADGES
   ============================================= */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-admin { background: rgba(245,158,11,0.15); color: var(--gold); border: 1px solid rgba(245,158,11,0.3); }
.badge-banned { background: rgba(239,68,68,0.15); color: var(--red); border: 1px solid rgba(239,68,68,0.3); }
.badge-active { background: rgba(34,197,94,0.15); color: var(--green); border: 1px solid rgba(34,197,94,0.3); }

/* =============================================
   AUTH PAGES
   ============================================= */
.auth-wrapper {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
}
.auth-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 30%, rgba(99,102,241,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 70%, rgba(139,92,246,0.1) 0%, transparent 50%);
  pointer-events: none;
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}
.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-logo .logo-text { font-size: 1.8rem; font-weight: 900; }
.auth-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 8px; }
.auth-subtitle { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 28px; }
.auth-divider {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 20px 0;
  position: relative;
}
.auth-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 1px;
  background: var(--border);
}
.auth-divider span { background: var(--bg-card); padding: 0 12px; position: relative; }
.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.auth-footer a { color: var(--accent-light); font-weight: 500; }
.auth-footer a:hover { color: var(--text-primary); }

/* =============================================
   RARITY GLOW EFFECTS
   ============================================= */
.rarity-Consumer   { --rarity-color: #b0c3d9; }
.rarity-Industrial { --rarity-color: #5e98d9; }
.rarity-Mil-Spec   { --rarity-color: #4b69ff; }
.rarity-Restricted { --rarity-color: #8847ff; }
.rarity-Classified { --rarity-color: #d32ce6; }
.rarity-Covert     { --rarity-color: #eb4b4b; }
.rarity-Special    { --rarity-color: #e4ae39; }

.glow-Consumer   { box-shadow: 0 0 20px rgba(176,195,217,0.3); }
.glow-Industrial { box-shadow: 0 0 20px rgba(94,152,217,0.3); }
.glow-Mil-Spec   { box-shadow: 0 0 20px rgba(75,105,255,0.3); }
.glow-Restricted { box-shadow: 0 0 20px rgba(136,71,255,0.3); }
.glow-Classified { box-shadow: 0 0 20px rgba(211,44,230,0.4); }
.glow-Covert     { box-shadow: 0 0 20px rgba(235,75,75,0.4); }
.glow-Special    { box-shadow: 0 0 20px rgba(228,174,57,0.5); }

/* =============================================
   DEPOSIT PAGE
   ============================================= */
.deposit-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.deposit-method {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.deposit-method:hover, .deposit-method.selected {
  border-color: var(--accent);
  background: rgba(99,102,241,0.08);
}
.deposit-method-icon { font-size: 2rem; margin-bottom: 8px; display: block; }
.deposit-method-name { font-weight: 700; font-size: 0.9rem; }
.deposit-amounts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}
.deposit-amount-btn {
  padding: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  cursor: pointer;
}
.deposit-amount-btn:hover, .deposit-amount-btn.selected {
  border-color: var(--accent);
  color: var(--accent-light);
  background: rgba(99,102,241,0.08);
}

/* =============================================
   LEADERBOARD
   ============================================= */
.leaderboard-podium {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 16px;
  margin: 32px 0;
}
.podium-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.podium-avatar {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
}
.podium-1 .podium-avatar { width: 72px; height: 72px; }
.podium-2 .podium-avatar, .podium-3 .podium-avatar { width: 56px; height: 56px; font-size: 0.9rem; }
.podium-rank { font-weight: 900; font-size: 1.5rem; }
.podium-1 .podium-rank { color: var(--gold); }
.podium-2 .podium-rank { color: #e2e8f0; }
.podium-3 .podium-rank { color: #cd7c4e; }
.podium-bar {
  background: linear-gradient(to top, var(--accent), #8b5cf6);
  border-radius: 8px 8px 0 0;
  width: 80px;
}
.podium-1 .podium-bar { height: 100px; }
.podium-2 .podium-bar { height: 70px; }
.podium-3 .podium-bar { height: 50px; }
.podium-name { font-size: 0.85rem; font-weight: 700; text-align: center; }

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  margin-top: 80px;
}
.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 24px;
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}
.footer-brand { flex: 1; min-width: 240px; }
.footer-brand .logo-text { font-size: 1.4rem; font-weight: 900; }
.footer-desc { color: var(--text-muted); font-size: 0.85rem; margin-top: 12px; line-height: 1.7; }
.footer-links { display: flex; gap: 48px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h4 { font-weight: 700; font-size: 0.9rem; margin-bottom: 4px; color: var(--text-secondary); }
.footer-col a { color: var(--text-muted); font-size: 0.85rem; transition: var(--transition); }
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* =============================================
   EMPTY STATE
   ============================================= */
.empty-state {
  text-align: center;
  padding: 64px 24px;
}
.empty-icon { font-size: 4rem; margin-bottom: 16px; opacity: 0.5; }
.empty-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.empty-desc { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 24px; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .upgrade-layout { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.2rem; }
  .cases-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .footer-links { gap: 24px; }
}
@media (max-width: 600px) {
  .nav-container { padding: 0 16px; gap: 12px; }
  .user-name { display: none; }
  .user-balance { display: none; }
  .page-wrapper { padding: 20px 16px; }
  .cases-grid { grid-template-columns: 1fr 1fr; }
  .auth-card { padding: 28px 20px; }
  .hero-stats { gap: 24px; }
}

/* =============================================
   UTILITY CLASSES
   ============================================= */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-gold { color: var(--gold); }
.text-accent { color: var(--accent-light); }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.flex  { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.w-full { width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.hidden { display: none !important; }
