/* ============================================================
   NeonVault Casino — Complete Design System
   Dark Cyberpunk Aesthetic | No Purple | Premium Polish
   ============================================================ */

/* --- Custom Properties --- */
:root {
  /* Backgrounds */
  --bg-primary: #000000;
  --bg-secondary: #0c0c0c;
  --bg-tertiary: #141414;
  --bg-glass: rgba(0, 0, 0, 0.85);
  --border-glass: rgba(255, 255, 255, 0.08);

  /* Accents */
  --accent-cyan: #ffffff;
  --accent-gold: #e0e0e0;
  --accent-emerald: #ffffff;
  --accent-crimson: #444444;

  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #aaaaaa;
  --text-muted: #666666;

  /* Rarity */
  --rarity-common: #333333;
  --rarity-uncommon: #555555;
  --rarity-rare: #888888;
  --rarity-epic: #cccccc;
  --rarity-mythic: #ffffff;

  /* Discord brand color — exception to no-purple rule */
  --discord-blurple: #5865F2;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Fonts */
  --font-heading: 'Orbitron', sans-serif;
  --font-body: 'Space Grotesk', sans-serif;

  /* Transitions */
  --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 150ms var(--ease-out);
  --transition-base: 250ms var(--ease-out);
  --transition-slow: 400ms var(--ease-out);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-cyan: 0 0 20px rgba(255, 255, 255, 0.15);
  --shadow-gold: 0 0 20px rgba(255, 255, 255, 0.12);
  --shadow-crimson: 0 0 20px rgba(255, 255, 255, 0.08);
  --shadow-emerald: 0 0 20px rgba(255, 255, 255, 0.2);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Layout */
  --sidebar-collapsed: 60px;
  --sidebar-expanded: 200px;
  --topbar-height: 60px;
  --winfeed-height: 36px;
}

/* --- CSS Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

a { color: var(--accent-cyan); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: #66f0ff; }

img, svg { display: block; max-width: 100%; }

button { font-family: var(--font-body); cursor: pointer; border: none; outline: none; background: none; color: inherit; }

input, select, textarea {
  font-family: var(--font-body);
  outline: none;
  border: none;
  background: none;
  color: var(--text-primary);
}

ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; }

/* --- Selection & Scrollbar --- */
::selection {
  background: rgba(0, 229, 255, 0.3);
  color: #fff;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb {
  background: rgba(0, 229, 255, 0.3);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: rgba(0, 229, 255, 0.5); }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
h5 { font-size: 0.95rem; }
h6 { font-size: 0.85rem; }

.text-cyan { color: var(--accent-cyan); }
.text-gold { color: var(--accent-gold); }
.text-emerald { color: var(--accent-emerald); }
.text-crimson { color: var(--accent-crimson); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }

/* --- Utility Classes --- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* --- Win Feed Ticker --- */
.nv-win-feed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--winfeed-height);
  background: linear-gradient(90deg, var(--bg-secondary), rgba(0, 229, 255, 0.05), var(--bg-secondary));
  border-bottom: 1px solid var(--border-glass);
  z-index: 1000;
  overflow: hidden;
  display: flex;
  align-items: center;
}

#win-feed-track {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  white-space: nowrap;
  animation: ticker-scroll 60s linear infinite;
  will-change: transform;
}

.win-feed-entry {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.8rem;
  color: var(--text-secondary);
  flex-shrink: 0;
  animation: slide-in-left 0.4s var(--ease-out);
}

.win-feed-entry .win-player { color: var(--accent-cyan); font-weight: 600; }
.win-feed-entry .win-game { color: var(--text-muted); }
.win-feed-entry .win-amount { color: var(--accent-emerald); font-weight: 700; font-family: var(--font-heading); }

.win-feed-avatar {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

/* --- Sidebar --- */
.nv-sidebar {
  position: fixed;
  top: calc(var(--winfeed-height) + var(--topbar-height));
  left: 0;
  bottom: 0;
  width: var(--sidebar-collapsed);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-md) 0;
  z-index: 900;
  transition: width var(--transition-base);
  overflow: hidden;
}

.nv-sidebar:hover {
  width: var(--sidebar-expanded);
}

.nv-sidebar:hover .nv-nav-btn span {
  opacity: 1;
  width: auto;
  margin-left: var(--space-sm);
}

.nv-nav-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: calc(100% - 16px);
  padding: 10px 12px;
  margin: 2px 8px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  transition: all var(--transition-base);
  position: relative;
  white-space: nowrap;
}

.nv-nav-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  transition: all var(--transition-base);
}

.nv-nav-btn span {
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0;
  width: 0;
  overflow: hidden;
  transition: all var(--transition-base);
}

.nv-nav-btn:hover {
  color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.08);
}

.nv-nav-btn:hover svg { color: var(--accent-cyan); }

.nv-nav-btn.active {
  color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.12);
  box-shadow: inset 3px 0 0 var(--accent-cyan);
}

.nv-nav-btn.active svg { filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.5)); }

.nv-nav-btn--logout {
  margin-top: auto;
  color: var(--accent-crimson);
}

.nv-nav-btn--logout:hover {
  color: var(--accent-crimson);
  background: rgba(255, 23, 68, 0.08);
}

/* --- Top Bar --- */
.nv-topbar {
  position: fixed;
  top: var(--winfeed-height);
  left: 0;
  right: 0;
  height: var(--topbar-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-lg);
  z-index: 950;
}

.nv-topbar-logo { display: flex; align-items: center; gap: var(--space-sm); }
.nv-topbar-logo svg { width: 28px; height: 28px; }
.nv-topbar-logo span {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nv-balance-display {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent-gold);
  transition: all var(--transition-base);
}

.nv-balance-display svg { width: 18px; height: 18px; }

.nv-balance-display.balance-up {
  box-shadow: 0 0 20px rgba(0, 230, 118, 0.3);
  border-color: var(--accent-emerald);
}

.nv-balance-display.balance-down {
  box-shadow: 0 0 20px rgba(255, 23, 68, 0.3);
  border-color: var(--accent-crimson);
}

.nv-topbar-user {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

#user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 2px solid var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  overflow: hidden;
  background: var(--bg-tertiary);
  transition: border-color var(--transition-base);
}

#user-avatar img { width: 100%; height: 100%; object-fit: cover; }

#username-display {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

#profile-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  transition: all var(--transition-base);
}

#profile-btn:hover {
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-cyan);
}

#profile-btn svg { width: 18px; height: 18px; color: var(--text-secondary); }

/* --- Main Content --- */
#main-content {
  margin-left: var(--sidebar-collapsed);
  margin-top: calc(var(--winfeed-height) + var(--topbar-height));
  min-height: calc(100vh - var(--winfeed-height) - var(--topbar-height));
  padding: var(--space-xl);
  position: relative;
}

/* --- Pages --- */
.nv-page {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
  will-change: opacity, transform;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.nv-page.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.nv-page-title {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.nv-page-title svg { width: 28px; height: 28px; color: var(--accent-cyan); }
.nv-page-title h2 { font-size: 1.5rem; }

/* --- Cards (Glassmorphism) --- */
.nv-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-base);
}

.nv-card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-base);
}

.nv-card-glass:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-md);
}

/* --- Buttons --- */
.nv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  will-change: transform;
}

.nv-btn:hover { transform: scale(1.02); }
.nv-btn:active { transform: scale(0.98); }
.nv-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.nv-btn svg { width: 18px; height: 18px; }

.nv-btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), #00b8d4);
  color: var(--bg-primary);
  box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
}

.nv-btn-primary:hover { box-shadow: 0 6px 25px rgba(0, 229, 255, 0.5); }

.nv-btn-danger {
  background: linear-gradient(135deg, var(--accent-crimson), #d50000);
  color: #fff;
  box-shadow: 0 4px 15px rgba(255, 23, 68, 0.3);
}

.nv-btn-danger:hover { box-shadow: 0 6px 25px rgba(255, 23, 68, 0.5); }

.nv-btn-gold {
  background: linear-gradient(135deg, var(--accent-gold), #ff8f00);
  color: var(--bg-primary);
  box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.nv-btn-gold:hover { box-shadow: 0 6px 25px rgba(255, 193, 7, 0.5); }

.nv-btn-discord {
  background: var(--discord-blurple);
  color: #fff;
  box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
}

.nv-btn-discord:hover { box-shadow: 0 6px 25px rgba(88, 101, 242, 0.5); }

.nv-btn-outline {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
}

.nv-btn-outline:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.06);
}

/* --- Inputs --- */
.nv-input-group {
  position: relative;
  margin-bottom: var(--space-md);
}

.nv-input {
  width: 100%;
  padding: 14px 16px 6px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all var(--transition-base);
}

.nv-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.12);
}

.nv-input-group label {
  position: absolute;
  top: 50%;
  left: 16px;
  transform: translateY(-50%);
  font-size: 0.9rem;
  color: var(--text-muted);
  pointer-events: none;
  transition: all var(--transition-base);
}

.nv-input:focus ~ label,
.nv-input:not(:placeholder-shown) ~ label {
  top: 8px;
  transform: translateY(0);
  font-size: 0.7rem;
  color: var(--accent-cyan);
}

.nv-input-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.nv-input-toggle:hover { color: var(--text-primary); }
.nv-input-toggle svg { width: 18px; height: 18px; }

/* --- Modals --- */
.nv-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 6, 11, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

.nv-modal.active {
  opacity: 1;
  visibility: visible;
}

.nv-modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  max-width: 520px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  transform: scale(0.92) translateY(20px);
  transition: transform var(--transition-base);
  position: relative;
}

.nv-modal.active .nv-modal-content {
  transform: scale(1) translateY(0);
}

.nv-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.nv-modal-close:hover {
  color: var(--accent-crimson);
  border-color: var(--accent-crimson);
}

.nv-modal-close svg { width: 16px; height: 16px; }

/* --- Rarity Classes --- */
.rarity-common { color: var(--rarity-common); border-color: var(--rarity-common); }
.rarity-uncommon { color: var(--rarity-uncommon); border-color: var(--rarity-uncommon); }
.rarity-rare { color: var(--rarity-rare); border-color: var(--rarity-rare); }
.rarity-epic { color: var(--rarity-epic); border-color: var(--rarity-epic); }
.rarity-mythic { color: var(--rarity-mythic); border-color: var(--rarity-mythic); }

/* --- Slot Machine --- */
.slot-machine {
  background: linear-gradient(180deg, #0a0a15, var(--bg-secondary));
  border: 2px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 60px rgba(0, 229, 255, 0.05), var(--shadow-lg);
}

.slot-machine::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
}

.slot-reels {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.slot-reel {
  width: 120px;
  height: 120px;
  background: var(--bg-primary);
  border: 2px solid rgba(0, 229, 255, 0.15);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.slot-reel.spinning .slot-symbol {
  animation: spin-reel 0.15s linear infinite;
  filter: blur(2px);
}

.slot-symbol {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.3s var(--ease-out);
}

.slot-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  flex-wrap: wrap;
}

.slot-bet-btn {
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  transition: all var(--transition-fast);
}

.slot-bet-btn:hover, .slot-bet-btn.active {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.08);
}

#slot-spin-btn {
  padding: 14px 48px;
  font-size: 1.1rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent-cyan), #00b8d4);
  color: var(--bg-primary);
  border-radius: var(--radius-full);
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.4);
  transition: all var(--transition-base);
}

#slot-spin-btn:hover { box-shadow: 0 0 50px rgba(0, 229, 255, 0.6); transform: scale(1.05); }
#slot-spin-btn:active { transform: scale(0.97); }
#slot-spin-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.slot-result {
  text-align: center;
  margin-top: var(--space-lg);
  font-family: var(--font-heading);
  font-size: 1.2rem;
  min-height: 40px;
}

.slot-result.win { color: var(--accent-emerald); text-shadow: 0 0 20px rgba(0, 230, 118, 0.5); }
.slot-result.loss { color: var(--accent-crimson); }

.auto-spin-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.auto-spin-toggle input[type="checkbox"] {
  appearance: none;
  width: 40px;
  height: 22px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  position: relative;
  cursor: pointer;
  transition: all var(--transition-base);
}

.auto-spin-toggle input[type="checkbox"]::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: var(--text-muted);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
}

.auto-spin-toggle input[type="checkbox"]:checked {
  background: rgba(0, 229, 255, 0.2);
  border-color: var(--accent-cyan);
}

.auto-spin-toggle input[type="checkbox"]:checked::after {
  left: 20px;
  background: var(--accent-cyan);
}

/* --- Blackjack --- */
#bj-table {
  background: linear-gradient(180deg, #090909, #151515, #090909);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl) var(--space-xl);
  position: relative;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.8), var(--shadow-lg);
  min-height: 400px;
}

.bj-section {
  text-align: center;
  padding: var(--space-lg) 0;
}

.bj-section-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: var(--space-sm);
}

.bj-hand {
  display: flex;
  justify-content: center;
  gap: -10px;
  min-height: 130px;
  align-items: center;
  perspective: 800px;
}

.bj-score {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: var(--space-sm);
  color: var(--text-primary);
}

.bj-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 230, 118, 0.2), transparent);
  margin: var(--space-md) 0;
}

.bj-controls {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  flex-wrap: wrap;
}

.bj-result {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 6, 11, 0.8);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-xl);
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
  z-index: 10;
}

.bj-result.visible {
  opacity: 1;
  visibility: visible;
}

/* Playing cards */
.playing-card {
  width: 80px;
  height: 115px;
  border-radius: var(--radius-sm);
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease-out);
  margin: 0 -5px;
  cursor: default;
}

.playing-card.flipped { transform: rotateY(180deg); }

.card-front, .card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
}

.card-front {
  background: #f5f5f5;
  color: #111;
  flex-direction: column;
  transform: rotateY(180deg);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-front.red { color: #d32f2f; }

.card-back {
  background: linear-gradient(135deg, #0a1628, #0d1f3c);
  border: 2px solid var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

.card-back-pattern {
  width: 60%;
  height: 70%;
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 4px;
  background: repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(0, 229, 255, 0.05) 5px, rgba(0, 229, 255, 0.05) 10px);
}

/* --- VaultCards --- */
.vault-card {
  width: 180px;
  background: var(--bg-secondary);
  border: 2px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.vault-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.05) 50%, transparent 60%);
  transform: rotate(0deg);
  transition: transform 0.6s var(--ease-out);
  pointer-events: none;
}

.vault-card:hover::before { transform: rotate(180deg); }
.vault-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.vault-card.rarity-common { border-color: var(--rarity-common); }
.vault-card.rarity-uncommon { border-color: var(--rarity-uncommon); box-shadow: 0 0 12px rgba(0, 230, 118, 0.15); }
.vault-card.rarity-rare { border-color: var(--rarity-rare); box-shadow: 0 0 12px rgba(33, 150, 243, 0.15); }
.vault-card.rarity-epic { border-color: var(--rarity-epic); box-shadow: 0 0 12px rgba(255, 23, 68, 0.15); }
.vault-card.rarity-mythic {
  border-color: var(--rarity-mythic);
  box-shadow: 0 0 20px rgba(255, 193, 7, 0.2);
  animation: glow-pulse 2s ease-in-out infinite;
}

.vault-card-image {
  width: 100%;
  aspect-ratio: 1;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
  overflow: hidden;
}

.vault-card-name {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 2px;
}

.vault-card-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.vault-card-count {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--bg-primary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
}

/* Card collection grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: var(--space-md);
}

/* --- Pack Store --- */
.pack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
}

.pack-card {
  background: var(--bg-glass);
  border: 2px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  transition: all var(--transition-base);
  cursor: pointer;
}

.pack-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.pack-card-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-md);
}

.pack-card-name {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.pack-card-info { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: var(--space-md); }
.pack-card-price { font-family: var(--font-heading); font-size: 1.1rem; font-weight: 700; color: var(--accent-gold); }

/* Pack opening animation */
.pack-opening-cards {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-2xl) 0;
  flex-wrap: wrap;
}

.pack-card-reveal {
  opacity: 0;
  transform: scale(0.5) rotateY(180deg);
  transition: all 0.6s var(--ease-bounce);
}

.pack-card-reveal.revealed {
  opacity: 1;
  transform: scale(1) rotateY(0);
}

/* --- Trade-Up --- */
.tradeup-slots {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin: var(--space-xl) 0;
  flex-wrap: wrap;
}

.tradeup-slot {
  width: 140px;
  height: 190px;
  background: var(--bg-tertiary);
  border: 2px dashed var(--border-glass);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
}

.tradeup-slot:hover {
  border-color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.04);
}

.tradeup-slot.filled {
  border-style: solid;
}

.tradeup-slot-placeholder {
  color: var(--text-muted);
  font-size: 2rem;
}

#tradeup-forge-btn {
  padding: 16px 48px;
  font-size: 1.1rem;
  background: linear-gradient(135deg, #ff6d00, var(--accent-crimson));
  color: #fff;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all var(--transition-base);
}

#tradeup-forge-btn:not(:disabled) { animation: forge-glow 2s ease-in-out infinite; }
#tradeup-forge-btn:hover:not(:disabled) { transform: scale(1.05); }
#tradeup-forge-btn:disabled { opacity: 0.3; cursor: not-allowed; animation: none; }

/* --- Wallet --- */
.crypto-tabs {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.crypto-tab {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 600;
  transition: all var(--transition-base);
}

.crypto-tab svg { width: 20px; height: 20px; }

.crypto-tab:hover { border-color: var(--accent-cyan); }

.crypto-tab.active {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: rgba(255, 193, 7, 0.08);
}

.wallet-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

.wallet-address-box {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  font-family: monospace;
  font-size: 0.8rem;
  color: var(--text-secondary);
  word-break: break-all;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.wallet-address-box:hover { border-color: var(--accent-cyan); }

#wallet-qr {
  width: 160px;
  height: 160px;
  background: #fff;
  border-radius: var(--radius-md);
  margin: var(--space-md) auto;
}

.quick-amounts {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.quick-amount-btn {
  padding: 6px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.quick-amount-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.tx-table { width: 100%; border-collapse: collapse; }
.tx-table th {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 8px;
  text-align: left;
  border-bottom: 1px solid var(--border-glass);
}

.tx-table td {
  padding: 10px 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.tx-table tr:hover td { background: rgba(0, 229, 255, 0.03); }

.deposit-type { color: var(--accent-emerald); }
.withdraw-type { color: var(--accent-crimson); }
.bet-type { color: var(--accent-gold); }
.win-type { color: var(--accent-cyan); }

.wallet-banner {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.9rem;
}

.wallet-banner svg { width: 24px; height: 24px; flex-shrink: 0; }

.wallet-banner-discord {
  background: rgba(88, 101, 242, 0.1);
  border: 1px solid rgba(88, 101, 242, 0.25);
  color: #99a3f6;
}

.wallet-banner-bonus {
  background: rgba(255, 193, 7, 0.08);
  border: 1px solid rgba(255, 193, 7, 0.2);
  color: var(--accent-gold);
}

/* --- Leaderboard --- */
.lb-tabs {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.lb-tab {
  padding: 8px 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition-base);
}

.lb-tab:hover { border-color: var(--accent-cyan); }

.lb-tab.active {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(0, 229, 255, 0.08);
}

.lb-table { width: 100%; border-collapse: collapse; }

.lb-table th {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-glass);
}

.lb-table td {
  padding: 12px;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background var(--transition-fast);
}

.lb-table tr:hover td { background: rgba(0, 229, 255, 0.03); }

.lb-rank {
  font-family: var(--font-heading);
  font-weight: 700;
  width: 40px;
}

.lb-rank-1 { color: var(--accent-gold); text-shadow: 0 0 10px rgba(255, 193, 7, 0.5); }
.lb-rank-2 { color: #b0bec5; text-shadow: 0 0 10px rgba(176, 190, 197, 0.3); }
.lb-rank-3 { color: #ff8a65; text-shadow: 0 0 10px rgba(255, 138, 101, 0.3); }

.lb-player {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.lb-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
}

.lb-player-stats {
  background: var(--bg-glass);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-top: var(--space-xl);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-lg);
}

.lb-stat { text-align: center; }
.lb-stat-value {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.lb-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* --- Auth Screen --- */
#auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  background-image: radial-gradient(ellipse at 30% 50%, rgba(255, 255, 255, 0.02) 0%, transparent 60%),
                     radial-gradient(ellipse at 70% 80%, rgba(255, 255, 255, 0.01) 0%, transparent 50%);
}

.auth-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  width: 420px;
  max-width: 95vw;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.auth-logo svg { width: 48px; height: 48px; margin: 0 auto var(--space-sm); }

.auth-logo-text {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-tabs {
  display: flex;
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid var(--border-glass);
}

.auth-tab {
  flex: 1;
  padding: 12px;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: all var(--transition-base);
}

.auth-tab:hover { color: var(--text-secondary); }

.auth-tab.active {
  color: var(--accent-cyan);
  border-bottom-color: var(--accent-cyan);
}

.auth-form { display: none; }
.auth-form.active { display: block; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-glass);
}

.auth-error {
  background: rgba(255, 23, 68, 0.1);
  border: 1px solid rgba(255, 23, 68, 0.25);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--accent-crimson);
  font-size: 0.85rem;
  margin-bottom: var(--space-md);
  display: none;
}

.auth-error.visible { display: block; }

.auth-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.auth-checkbox input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 1px solid var(--border-glass);
  border-radius: 4px;
  background: var(--bg-tertiary);
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
}

.auth-checkbox input[type="checkbox"]:checked {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.auth-checkbox input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  border: solid var(--bg-primary);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* --- Age Gate --- */
#age-gate {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  background-image: radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
}

#age-gate.hidden { display: none; }

.age-gate-content {
  text-align: center;
  max-width: 440px;
  padding: var(--space-xl);
}

.age-gate-content svg { width: 64px; height: 64px; margin: 0 auto var(--space-lg); }

.age-gate-content h2 {
  font-size: 1.5rem;
  margin-bottom: var(--space-md);
  color: var(--accent-cyan);
}

.age-gate-content p {
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  line-height: 1.7;
}

.age-gate-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

/* --- Profile Modal --- */
.profile-avatar-upload {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  border: 3px dashed var(--border-glass);
  margin: 0 auto var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  background: var(--bg-tertiary);
  transition: all var(--transition-base);
  position: relative;
}

.profile-avatar-upload:hover {
  border-color: var(--accent-cyan);
}

.profile-avatar-upload img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
}

.profile-stat {
  text-align: center;
  padding: var(--space-md);
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
}

.profile-stat-value {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.profile-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* --- Notifications / Toasts --- */
#notification-container {
  position: fixed;
  top: calc(var(--winfeed-height) + var(--topbar-height) + 16px);
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  z-index: 2500;
  pointer-events: none;
}

.nv-toast {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  animation: slide-in-right 0.4s var(--ease-out);
  pointer-events: all;
  max-width: 360px;
  will-change: transform, opacity;
}

.nv-toast.removing {
  animation: fade-out 0.3s var(--ease-out) forwards;
}

.nv-toast svg { width: 20px; height: 20px; flex-shrink: 0; }

.nv-toast-success { border-left: 3px solid var(--accent-emerald); }
.nv-toast-success svg { color: var(--accent-emerald); }

.nv-toast-error { border-left: 3px solid var(--accent-crimson); }
.nv-toast-error svg { color: var(--accent-crimson); }

.nv-toast-info { border-left: 3px solid var(--accent-cyan); }
.nv-toast-info svg { color: var(--accent-cyan); }

.nv-toast-warning { border-left: 3px solid var(--accent-gold); }
.nv-toast-warning svg { color: var(--accent-gold); }

/* --- Filter Buttons --- */
.filter-group {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.filter-btn {
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.filter-btn:hover { border-color: var(--accent-cyan); color: var(--text-primary); }

.filter-btn.active {
  background: rgba(0, 229, 255, 0.12);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* --- Particles --- */
.particle {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  pointer-events: none;
  z-index: 3000;
  will-change: transform, opacity;
  animation: particle-burst 0.8s var(--ease-out) forwards;
}

/* --- Section Divider --- */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-glass), transparent);
  margin: var(--space-xl) 0;
}

/* ============================================================
   KEYFRAME ANIMATIONS
   ============================================================ */

@keyframes spin-reel {
  0% { transform: translateY(-40px); }
  100% { transform: translateY(40px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 12px rgba(255, 193, 7, 0.2); }
  50% { box-shadow: 0 0 28px rgba(255, 193, 7, 0.45); }
}

@keyframes slide-in-right {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slide-in-left {
  from { transform: translateX(-30px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fade-out {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}

@keyframes card-flip {
  0% { transform: rotateY(0); }
  100% { transform: rotateY(180deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes counting {
  0% { opacity: 0.5; transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
  20%, 40%, 60%, 80% { transform: translateX(4px); }
}

@keyframes particle-burst {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--px), var(--py)) scale(0); opacity: 0; }
}

@keyframes forge-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(255, 109, 0, 0.3), 0 0 40px rgba(255, 23, 68, 0.1); }
  50% { box-shadow: 0 0 35px rgba(255, 109, 0, 0.5), 0 0 60px rgba(255, 23, 68, 0.25); }
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */

/* Tablet */
@media (max-width: 1024px) {
  .wallet-section { grid-template-columns: 1fr; }
  .pack-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-stats { grid-template-columns: 1fr 1fr; }
}

/* Mobile */
@media (max-width: 768px) {
  :root {
    --sidebar-collapsed: 0px;
  }

  .nv-sidebar {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100% !important;
    height: 60px;
    flex-direction: row;
    justify-content: space-around;
    padding: 0;
    border-right: none;
    border-top: 1px solid var(--border-glass);
  }

  .nv-sidebar:hover { width: 100% !important; }

  .nv-nav-btn {
    flex-direction: column;
    padding: 6px;
    margin: 0;
    width: auto;
    gap: 2px;
  }

  .nv-nav-btn span {
    opacity: 1;
    width: auto;
    margin-left: 0;
    font-size: 0.6rem;
  }

  .nv-nav-btn svg { width: 20px; height: 20px; }

  .nv-nav-btn.active { box-shadow: inset 0 -3px 0 var(--accent-cyan); }

  .nv-nav-btn--logout { margin-top: 0; }

  #main-content {
    margin-left: 0;
    margin-bottom: 60px;
    padding: var(--space-md);
  }

  .nv-topbar {
    padding: 0 var(--space-md);
  }

  .nv-topbar-logo span { display: none; }

  .slot-reels { gap: var(--space-sm); }

  .slot-reel { width: 90px; height: 90px; font-size: 2rem; }

  .tradeup-slots { gap: var(--space-sm); }

  .tradeup-slot { width: 100px; height: 140px; }

  .pack-grid { grid-template-columns: 1fr 1fr; }

  .card-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

  .bj-controls { flex-direction: row; flex-wrap: wrap; }

  .nv-modal-content { padding: var(--space-lg); width: 95%; }

  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.2rem; }

  .age-gate-buttons { flex-direction: column; }

  .lb-player-stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .pack-grid { grid-template-columns: 1fr; }
  .slot-reel { width: 75px; height: 75px; font-size: 1.6rem; }
  .auth-card { padding: var(--space-lg); }
}

/* ============================================================
   SIMPLECARDS LAYOUT EXTENSIONS (PC SPACE OPTIMIZATIONS)
   ============================================================ */

.nv-topbar-container {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nv-user-profile-trigger {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  cursor: pointer;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.nv-user-profile-trigger:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.nv-user-profile-trigger:active {
  transform: translateY(0);
}

.nv-settings-wrapper {
  position: relative;
  display: inline-block;
}

#settings-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  transition: all var(--transition-base);
}

#settings-btn:hover {
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-cyan);
}

#settings-btn svg {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  transition: transform var(--transition-base);
}

#settings-btn:hover svg {
  transform: rotate(45deg);
}

.nv-settings-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  width: 250px;
  background: rgba(13, 13, 20, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-md);
  z-index: 1100;
  opacity: 1;
  transform: translateY(0);
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.nv-settings-dropdown.hidden {
  display: none !important;
}

.dropdown-header {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: var(--space-xs);
}

.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 8px 0;
}

.dropdown-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 20px;
}

.dropdown-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-full);
  transition: all 0.3s;
}

.switch-slider::before {
  content: "";
  position: absolute;
  height: 12px;
  width: 12px;
  left: 3px;
  bottom: 3px;
  background: var(--text-muted);
  border-radius: var(--radius-full);
  transition: all 0.3s;
}

.dropdown-switch input:checked + .switch-slider {
  background: rgba(255, 255, 255, 0.15);
  border-color: #ffffff;
}

.dropdown-switch input:checked + .switch-slider::before {
  transform: translateX(18px);
  background: #ffffff;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-glass);
  margin: var(--space-sm) 0;
}

.dropdown-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-md);
  background: rgba(255, 23, 68, 0.08);
  border: 1px solid rgba(255, 23, 68, 0.2);
  color: var(--accent-crimson);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.dropdown-logout-btn:hover {
  background: rgba(255, 23, 68, 0.15);
  border-color: var(--accent-crimson);
  box-shadow: 0 0 10px rgba(255, 23, 68, 0.15);
}

.dropdown-logout-btn svg {
  width: 16px;
  height: 16px;
}

/* --- Responsive Dual Column Layout --- */
.nv-game-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: var(--space-lg);
  align-items: start;
  width: 100%;
}

.nv-game-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.sidebar-card {
  padding: var(--space-md) var(--space-lg);
}

.sidebar-card-title {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: var(--space-xs);
}

.sidebar-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.sidebar-stat {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  text-align: center;
}

.sidebar-stat .stat-lbl {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.sidebar-stat .stat-val {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
}

.sidebar-log-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 4px;
}

.sidebar-log-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  padding: 8px var(--space-sm);
  background: var(--bg-tertiary);
  border-left: 3px solid var(--border-glass);
  border-radius: 4px;
  animation: slide-in-left 0.3s var(--ease-out);
}

.sidebar-log-item.win {
  border-left-color: var(--accent-emerald) !important;
}

.sidebar-log-item.loss {
  border-left-color: var(--accent-crimson) !important;
}

.sidebar-log-empty {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  padding: var(--space-md) 0;
}

.discord-promo-card {
  background: linear-gradient(135deg, var(--bg-secondary), rgba(88, 101, 242, 0.03)) !important;
  border-color: rgba(88, 101, 242, 0.1) !important;
}

.discord-promo-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.tradeup-sidebar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 8px;
  overflow-y: auto;
  max-height: 350px;
  padding-right: 4px;
}

.tradeup-sidebar-card {
  aspect-ratio: 2.5/3.5;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px;
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
}

.tradeup-sidebar-card:hover {
  border-color: #ffffff;
  transform: scale(1.05);
}

.tradeup-sidebar-card .card-val {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 700;
}

.tradeup-sidebar-card .card-qty {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ffffff;
  color: #000;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: var(--radius-full);
}

/* --- High Contrast B&W Mode --- */
body.nv-high-contrast {
  --bg-primary: #000000;
  --bg-secondary: #000000;
  --bg-tertiary: #000000;
  --bg-glass: #000000;
  --border-glass: #ffffff;
  --accent-cyan: #ffffff;
  --accent-gold: #ffffff;
  --accent-emerald: #ffffff;
  --accent-crimson: #ffffff;
}

body.nv-high-contrast .nv-card,
body.nv-high-contrast .nv-card-glass,
body.nv-high-contrast .slot-machine,
body.nv-high-contrast #bj-table,
body.nv-high-contrast .nv-sidebar,
body.nv-high-contrast .nv-topbar,
body.nv-high-contrast .nv-modal-content {
  background: #000000 !important;
  border: 2px solid #ffffff !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

body.nv-high-contrast .nv-btn-outline,
body.nv-high-contrast .nv-btn-primary,
body.nv-high-contrast .nv-btn-gold,
body.nv-high-contrast .nv-btn-discord {
  background: #000000 !important;
  border: 2px solid #ffffff !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

body.nv-high-contrast .nv-btn-outline:hover,
body.nv-high-contrast .nv-btn-primary:hover,
body.nv-high-contrast .nv-btn-gold:hover,
body.nv-high-contrast .nv-btn-discord:hover {
  background: #ffffff !important;
  color: #000000 !important;
}

body.nv-high-contrast .sidebar-stat,
body.nv-high-contrast .sidebar-log-item,
body.nv-high-contrast .tradeup-sidebar-card {
  background: #000000 !important;
  border: 1.5px solid #ffffff !important;
  border-left-width: 1.5px !important;
  box-shadow: none !important;
}

@media (max-width: 1024px) {
  .nv-game-layout {
    grid-template-columns: 1fr;
  }
  .nv-settings-dropdown {
    position: fixed;
    top: auto;
    bottom: 70px;
    right: 20px;
    left: 20px;
    width: auto;
    margin-top: 0;
  }
}

/* ============================================================
   CASE OPENING SPINNER & ROULETTE STYLES (Clash.gg Clone)
   ============================================================ */
#unboxing-arena {
  margin-top: var(--space-md);
  padding: var(--space-lg);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass);
}

.case-drops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.case-drop-card {
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  text-align: center;
  position: relative;
  transition: transform var(--transition-base);
}

.case-drop-card:hover {
  transform: translateY(-4px);
}

.case-drop-rarity-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

.case-drop-pct {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.nv-case-spinner-container {
  width: 100%;
  height: 160px;
  position: relative;
  overflow: hidden;
  background: var(--bg-tertiary);
  border: 2px solid var(--border-glass);
  border-radius: var(--radius-lg);
  margin: var(--space-lg) 0;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.6);
}

.nv-case-spinner-pointer {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #ffffff;
  box-shadow: 0 0 15px #ffffff, 0 0 5px #ffffff;
  z-index: 10;
  transform: translateX(-50%);
  border-radius: 2px;
}

.nv-case-spinner-pointer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 10px solid #ffffff;
}

.nv-case-spinner-pointer::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 10px solid #ffffff;
}

.nv-case-spinner-ribbon {
  display: flex;
  align-items: center;
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  transition: transform 6s cubic-bezier(0.1, 0.8, 0.15, 1);
  padding: 0 50%;
}

.nv-spinner-card {
  width: 120px;
  height: 130px;
  flex-shrink: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  margin: 0 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-xs);
  position: relative;
  box-sizing: border-box;
}

.nv-spinner-card .card-art-box {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  margin-bottom: 6px;
}

.nv-spinner-card .card-name {
  font-size: 0.75rem;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.nv-spinner-card .card-rarity {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 1px;
}

.nv-spinner-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--card-border-color, #777);
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

/* ============================================================
   CASE BATTLES STYLES
   ============================================================ */
.battles-list-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.battle-item-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.battle-item-cases {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
}

.battle-case-icon {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border-glass);
  background: var(--bg-tertiary);
}

.battle-player-status {
  display: flex;
  gap: 8px;
}

.battle-avatar-slot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-glass);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
}

.battle-arena-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-md);
}

.battle-player-panel {
  background: var(--bg-secondary);
  border: 2px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.battle-player-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.battle-player-score {
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.battle-arena-unbox-history {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  width: 100%;
  margin-top: var(--space-lg);
}

.battle-history-unbox-card {
  aspect-ratio: 1;
  background: var(--bg-tertiary);
  border-radius: 6px;
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.battle-history-unbox-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-border, #666);
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
}

/* ============================================================
   PLINKO CASINO BOARD STYLES
   ============================================================ */
.plinko-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-lg);
  margin-top: var(--space-md);
}

@media (max-width: 1024px) {
  .plinko-layout {
    grid-template-columns: 1fr;
  }
}

.plinko-board-container {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.plinko-canvas {
  width: 100%;
  max-width: 600px;
  height: 480px;
  display: block;
}

.plinko-sidebar {
  background: var(--bg-secondary);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.plinko-settings-card {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-glass);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
}

.plinko-multiplier-highlight {
  animation: plinko-bounce 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes plinko-bounce {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); filter: brightness(1.4); }
  100% { transform: scale(1); }
}

body.nv-high-contrast .case-drop-card,
body.nv-high-contrast .nv-case-spinner-container,
body.nv-high-contrast .nv-spinner-card,
body.nv-high-contrast .battle-item-card,
body.nv-high-contrast .battle-player-panel,
body.nv-high-contrast .battle-history-unbox-card,
body.nv-high-contrast .plinko-board-container,
body.nv-high-contrast .plinko-settings-card {
  background: #000000 !important;
  border: 2.5px solid #ffffff !important;
  box-shadow: none !important;
}


