@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

:root {
  --page-bg: #f8fafc;
  --card-surface: #ffffff;
  --card-border: #e2e8f0;
  --text-primary: #0f172a;
  --text-muted: #475569;
  --nav-bg: rgba(255, 255, 255, 0.92);
  --nav-border: #e2e8f0;
  --nav-link: #0f172a;
  --nav-link-hover: #4338ca;
  --nav-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --accent-strong: #6366f1;
  --accent-soft: #06b6d4;
  --control-surface: rgba(241, 245, 249, 0.95);
  --page-gradient: radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.14), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(6, 182, 212, 0.12), transparent 32%),
    linear-gradient(180deg, #f8fafc 0%, #e2e8f0 65%, #e5e7eb 100%);
  --home-gradient: radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.12), transparent 32%),
    radial-gradient(circle at 78% 10%, rgba(14, 165, 233, 0.12), transparent 36%),
    linear-gradient(180deg, #f8fafc 0%, #eef2ff 55%, #e2e8f0 100%);
  --hero-surface: linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(241, 245, 249, 0.92));
  --panel-surface: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.92));
  --chip-surface: rgba(248, 250, 252, 0.9);
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--page-gradient);
  color: var(--text-primary);
}

body.dark-mode {
  --page-bg: #0b1120;
  --card-surface: #0f172a;
  --card-border: #1f2937;
  --text-primary: #e2e8f0;
  --text-muted: #cbd5e1;
  --nav-bg: rgba(15, 23, 42, 0.9);
  --nav-border: #1f2937;
  --nav-link: #e2e8f0;
  --nav-link-hover: #93c5fd;
  --nav-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  --accent-strong: #60a5fa;
  --accent-soft: #a78bfa;
  --control-surface: rgba(51, 65, 85, 0.65);
  --page-gradient: radial-gradient(circle at 20% 20%, rgba(124, 58, 237, 0.18), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(34, 211, 238, 0.15), transparent 32%),
    linear-gradient(180deg, #0b0f1c 0%, #0a0d17 100%);
  --home-gradient: radial-gradient(circle at 20% 20%, rgba(124, 58, 237, 0.18), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(34, 211, 238, 0.2), transparent 32%),
    linear-gradient(180deg, #0b0f1c 0%, #0a0d17 60%, #0b1020 100%);
  --hero-surface: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(34, 211, 238, 0.04));
  --panel-surface: linear-gradient(160deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.65));
  --chip-surface: rgba(15, 23, 42, 0.65);
  background: var(--page-gradient);
  color: var(--text-primary);
}

.home-page {
  background: var(--home-gradient);
  min-height: 100vh;
}

.home-page .section-heading {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.home-page .muted-label {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.home-page .frosted-panel {
  background: var(--panel-surface);
  border: 1px solid var(--card-border);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
}

.filter-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  border: 1px solid var(--card-border);
  background: var(--panel-surface);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

.filter-panel__header {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

@media (min-width: 768px) {
  .filter-panel__header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.filter-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.filter-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-strong);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.filter-control {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-input-wrap {
  position: relative;
  background: var(--card-surface);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: none;
  background: transparent;
  color: var(--text-primary);
  border-radius: 12px;
  font-weight: 500;
}

.filter-prefix {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.9rem;
}

.filter-input-wrap input[type='number'] {
  padding-left: 3rem;
}

.filter-input:focus,
.filter-select:focus {
  outline: none;
}

.filter-input-wrap:focus-within {
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.filter-select {
  appearance: none;
  width: 100%;
  padding: 0.7rem 0.9rem;
  padding-right: 2.75rem;
  background: transparent;
  color: var(--text-primary);
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}

.filter-select-icon {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.filter-toggle {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  background: var(--control-surface);
  border: 1px solid var(--card-border);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.filter-toggle:hover {
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.filter-toggle__track {
  position: relative;
  width: 48px;
  height: 28px;
  background: #e2e8f0;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.filter-toggle input {
  position: absolute;
  inset: 0;
}

.filter-toggle__thumb {
  position: absolute;
  top: 50%;
  left: 4px;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #6366f1, #22d3ee);
  border-radius: 999px;
  transform: translateY(-50%);
  transition: transform 0.25s ease;
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.35);
}

.filter-toggle input:checked + .filter-toggle__thumb {
  transform: translate(18px, -50%);
}

.filter-toggle__copy {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.filter-toggle__title {
  font-weight: 700;
  color: var(--text-primary);
}

.filter-toggle__subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.home-hero {
  position: relative;
  overflow: hidden;
  background: var(--hero-surface);
  border-bottom: 1px solid var(--card-border);
}

.home-hero::before,
.home-hero::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  filter: blur(120px);
  opacity: 0.6;
}

.home-hero::before {
  width: 340px;
  height: 340px;
  background: rgba(124, 58, 237, 0.65);
  top: -120px;
  right: -40px;
}

.home-hero::after {
  width: 280px;
  height: 280px;
  background: rgba(34, 211, 238, 0.5);
  bottom: -80px;
  left: -60px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 2.5rem;
}

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
}

.hero-stat {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: var(--chip-surface);
  border: 1px solid var(--card-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero-stat span {
  font-weight: 600;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-weight: 600;
  color: #e0e7ff;
  background: linear-gradient(120deg, rgba(124, 58, 237, 0.8), rgba(34, 211, 238, 0.65));
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.35);
}

.hero-card-stack {
  position: relative;
  display: grid;
  gap: 1rem;
}

.hero-card {
  position: relative;
  padding: 1.4rem;
  border-radius: 18px;
  background: var(--panel-surface);
  border: 1px solid var(--card-border);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}

.hero-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.08), rgba(34, 211, 238, 0.08));
  pointer-events: none;
}

.hero-card .card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.hero-card .card-title span {
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-card .card-title .price {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 12px;
  background: var(--chip-surface);
  color: var(--text-primary);
  font-weight: 700;
}

.hero-card img {
  width: 100%;
  height: 240px;
  object-fit: contain;
  border-radius: 14px;
  margin-top: 1rem;
  background: radial-gradient(circle at 30% 20%, rgba(124, 58, 237, 0.2), transparent 45%),
    radial-gradient(circle at 70% 0%, rgba(34, 211, 238, 0.25), transparent 50%);
}

.pill-compact {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  background: var(--chip-surface);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.price-chip {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 8px 16px rgba(0, 0, 0, 0.12);
}

.price-amount {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.price-amount img {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  filter: drop-shadow(0 0 4px rgba(34, 211, 238, 0.4));
}

.price-amount .price-number {
  line-height: 1;
}

.case-rail {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.topup-scroll {
  display: flex;
  gap: 1rem;
  padding: 0.25rem 0.5rem 0.75rem;
  margin: 0 -0.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 0.5rem;
  -webkit-overflow-scrolling: touch;
}

.topup-scroll::-webkit-scrollbar {
  height: 8px;
}

.topup-scroll::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.6);
  border-radius: 9999px;
}

.topup-card {
  flex: 0 0 82%;
  min-width: 230px;
  scroll-snap-align: start;
}

.topup-indicators {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.topup-indicator {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: rgba(148, 163, 184, 0.55);
  transition: all 0.2s ease;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.topup-indicator.active {
  width: 22px;
  background: linear-gradient(120deg, #60a5fa, #a78bfa);
  border-color: rgba(79, 70, 229, 0.2);
  box-shadow: 0 8px 18px rgba(99, 102, 241, 0.25);
}

@media (min-width: 640px) {
  .topup-scroll {
    margin: 0;
    justify-content: center;
  }

  .topup-card {
    flex: 0 0 46%;
    max-width: 320px;
  }
}

@media (min-width: 1024px) {
  .topup-card {
    flex: 0 0 40%;
    max-width: 340px;
  }
}

.case-chip {
  display: flex;
  flex-direction: column;
  min-width: 180px;
  padding: 1rem;
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
}

.case-chip strong {
  color: #fff;
  font-size: 1.05rem;
}

.case-card-img {
  height: 256px;
  width: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.navbar {
  backdrop-filter: blur(10px);
  background-color: var(--nav-bg) !important;
  border-color: var(--nav-border) !important;
  box-shadow: var(--nav-shadow);
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.navbar a {
  color: var(--nav-link) !important;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.navbar a:hover {
  color: var(--nav-link-hover) !important;
}

.navbar .border-indigo-500 {
  border-color: var(--accent-strong) !important;
  color: var(--nav-link-hover) !important;
}

.user-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.12), transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.08), transparent 40%),
    rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

body.dark-mode .user-toolbar {
  background: radial-gradient(circle at 15% 20%, rgba(99, 102, 241, 0.15), transparent 45%),
    radial-gradient(circle at 70% 10%, rgba(56, 189, 248, 0.15), transparent 40%),
    rgba(30, 41, 59, 0.85);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.user-toolbar:hover {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 16px 40px rgba(59, 130, 246, 0.12);
}

.navbar .gradient-text {
  background: linear-gradient(90deg, var(--accent-strong), var(--accent-soft));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-animate {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.04em;
  padding: 0.05em 0.06em;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  perspective: 900px;
}

.logo-letter {
  position: relative;
  display: inline-block;
  padding: 0 0.02em;
  background: linear-gradient(115deg, var(--accent-strong), #9ccafe 35%, var(--accent-soft));
  background-size: 220% 220%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: logo-shimmer 8s ease-in-out infinite;
  animation-delay: calc(var(--logo-letter-index, 0) * 0.08s);
}

.logo-letter::after {
  content: attr(data-letter);
  position: absolute;
  inset: 0;
  background: inherit;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: blur(4px);
  opacity: 0.2;
  pointer-events: none;
}

@keyframes logo-shimmer {
  0% {
    background-position: 0% 50%;
    text-shadow: 0 0 12px rgba(148, 163, 184, 0.2);
  }
  30% {
    background-position: 15% 50%;
    text-shadow: 0 0 12px rgba(148, 163, 184, 0.22);
  }
  45% {
    background-position: 100% 50%;
    text-shadow: 0 0 26px rgba(99, 102, 241, 0.45), 0 0 38px rgba(14, 165, 233, 0.35);
  }
  55% {
    background-position: 180% 50%;
    text-shadow: 0 0 30px rgba(99, 102, 241, 0.55), 0 0 48px rgba(14, 165, 233, 0.45);
  }
  70% {
    background-position: 85% 50%;
    text-shadow: 0 0 16px rgba(148, 163, 184, 0.28);
  }
  100% {
    background-position: 0% 50%;
    text-shadow: 0 0 12px rgba(148, 163, 184, 0.2);
  }
}

#user-dropdown,
#mobile-dropdown,
.topup-chip,
.balance-chip {
  background-color: var(--card-surface);
  color: var(--text-primary);
  border-color: var(--card-border);
}

#user-dropdown {
  box-shadow: 0 20px 35px rgba(0, 0, 0, 0.12);
}

body.dark-mode #user-dropdown,
body.dark-mode #mobile-dropdown {
  background-color: rgba(15, 23, 42, 0.95);
  border-color: var(--card-border);
}

.balance-amount {
  color: var(--text-primary);
}

.balance-label {
  color: var(--text-muted);
}

.balance-chip {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(99, 102, 241, 0.12));
}

body.dark-mode .balance-chip {
  border-color: rgba(99, 102, 241, 0.4);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(56, 189, 248, 0.12));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.topup-chip {
  background: linear-gradient(135deg, #34d399, #10b981);
  color: #ecfdf5;
}

.notification-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  border: 1px solid var(--card-border);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(59, 130, 246, 0.12));
  color: var(--text-primary);
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

body.dark-mode .notification-button {
  border-color: rgba(99, 102, 241, 0.45);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(56, 189, 248, 0.18));
  box-shadow: 0 14px 28px rgba(59, 130, 246, 0.28);
  color: #e2e8f0;
}

.notification-button i {
  font-size: 1rem;
}

.notification-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(59, 130, 246, 0.2);
  color: var(--accent-strong);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(59, 130, 246, 0.18));
}

body.dark-mode .notification-button:hover {
  box-shadow: 0 18px 36px rgba(59, 130, 246, 0.35);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(56, 189, 248, 0.22));
}

.notification-button:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

.notification-indicator {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 0 0 2px var(--nav-bg, #fff);
}

.notification-center {
  position: fixed;
  top: 74px;
  right: 1rem;
  width: 360px;
  max-width: calc(100% - 2rem);
  z-index: 60;
  background: var(--card-bg, #fff);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
  padding: 1rem;
  backdrop-filter: blur(12px);
}

body.dark-mode .notification-center {
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.88));
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.6);
}

.notification-center__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.notification-center__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.notification-center__title {
  font-weight: 700;
  color: var(--text-primary);
}

.notification-list {
  display: grid;
  gap: 0.65rem;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.notification-card {
  position: relative;
  border-radius: 14px;
  padding: 0.9rem 0.9rem 1.35rem;
  border: 1px solid var(--card-border);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.06), rgba(56, 189, 248, 0.06));
  display: grid;
  gap: 0.3rem;
}

.notification-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.notification-card__heading {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

body.dark-mode .notification-card {
  border-color: rgba(148, 163, 184, 0.32);
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.18), rgba(59, 130, 246, 0.12));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.notification-card[data-severity="warning"] {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.08), rgba(239, 68, 68, 0.08));
}

.notification-card[data-severity="success"] {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(52, 211, 153, 0.08));
}

body.dark-mode .notification-card[data-severity="warning"] {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.22), rgba(239, 68, 68, 0.18));
}

body.dark-mode .notification-card[data-severity="success"] {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(52, 211, 153, 0.18));
}

.notification-card__title {
  font-weight: 700;
  color: var(--text-primary);
}

.notification-card__meta {
  position: absolute;
  right: 0.9rem;
  bottom: 0.55rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: right;
  opacity: 0.9;
}

.notification-card__close {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.15rem 0.25rem;
  border-radius: 8px;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.notification-card__close:hover {
  color: var(--text-primary);
  background: rgba(99, 102, 241, 0.1);
  transform: scale(1.05);
}

body.dark-mode .notification-card__close:hover {
  background: rgba(99, 102, 241, 0.2);
}

.notification-card__body {
  font-size: 0.92rem;
  color: var(--text-primary);
}

.notification-card__link {
  font-size: 0.85rem;
  color: var(--accent-strong, #7c3aed);
  word-break: break-word;
}

body.dark-mode .notification-card__link {
  color: #a5b4fc;
}

.notification-card__link:hover {
  text-decoration: underline;
}

.notification-empty {
  text-align: center;
  padding: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.menu-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(99, 102, 241, 0.16));
  color: var(--text-primary);
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.menu-toggle-button i {
  font-size: 0.95rem;
}

.menu-toggle-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(59, 130, 246, 0.22);
  color: var(--accent-strong);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(99, 102, 241, 0.22));
  border-color: rgba(99, 102, 241, 0.4);
}

.menu-toggle-button:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

body.dark-mode .text-gray-500,
body.dark-mode .text-gray-600,
body.dark-mode .text-gray-700,
body.dark-mode .text-gray-800,
body.dark-mode .text-gray-900,
body.dark-mode p,
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
  color: var(--text-primary) !important;
}

body.dark-mode .bg-white,
body.dark-mode .bg-gray-50,
body.dark-mode .bg-gray-100,
body.dark-mode .bg-indigo-50 {
  background-color: var(--card-surface) !important;
}

body.dark-mode .border-gray-200,
body.dark-mode .border-gray-300 {
  border-color: var(--card-border) !important;
}

body:not(.dark-mode) .text-white,
body:not(.dark-mode) .text-slate-100,
body:not(.dark-mode) .text-slate-200,
body:not(.dark-mode) .text-indigo-100 {
  color: #0f172a !important;
}

body:not(.dark-mode) .text-slate-300 {
  color: #334155 !important;
}

body:not(.dark-mode) .bg-slate-900\/60,
body:not(.dark-mode) .bg-slate-900\/70 {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

body:not(.dark-mode) .border-slate-800,
body:not(.dark-mode) .border-slate-700 {
  border-color: var(--card-border) !important;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.35rem;
  width: 2.35rem;
  border-radius: 9999px;
  border: 1px solid var(--card-border);
  background: var(--control-surface);
  color: var(--text-primary);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.user-toolbar .theme-toggle,
.theme-toggle.chip-toggle {
  width: 2.05rem;
  height: 2.05rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(59, 130, 246, 0.14));
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.16);
  border-color: rgba(148, 163, 184, 0.45);
}

.user-toolbar .theme-toggle i,
.theme-toggle.chip-toggle i {
  font-size: 0.95rem;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 2px;
}

.theme-toggle.menu-entry {
  width: 100%;
  height: auto;
  padding: 0.85rem 1rem;
  gap: 0.75rem;
  border-radius: 14px;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08), rgba(59, 130, 246, 0.08));
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.12);
  border-color: rgba(148, 163, 184, 0.6);
}

.theme-toggle.menu-entry .menu-entry-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.12);
  color: var(--text-primary);
}

.theme-toggle.menu-entry .menu-entry-icon i {
  font-size: 1rem;
}

.theme-toggle.menu-entry .theme-state-label {
  background: var(--control-surface);
  border: 1px solid var(--card-border);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

body:not(.dark-mode) #theme-toggle-mobile-menu .text-sm {
  color: #0f172a !important;
}

body:not(.dark-mode) #theme-toggle-mobile-menu .text-xs {
  color: #1f2937 !important;
}

.fade {
  transition: opacity 0.5s ease;
}

.marquee {
  display: flex;
  overflow: hidden;
  white-space: nowrap;
}

.marquee-content {
  display: inline-block;
  animation: marquee 20s linear infinite;
}

@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

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

.animate-shake {
  animation: shake 0.6s;
}

.mobile-menu {
  display: none;
}

@media (max-width: 640px) {
  .desktop-menu {
    display: none;
  }

  .mobile-menu {
    display: block;
  }
}

.glow-button {
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.7), 0 0 20px rgba(139, 92, 246, 0.5);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.glow-button:hover {
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.9), 0 0 30px rgba(139, 92, 246, 0.7);
}

.frost-hero {
  backdrop-filter: blur(16px);
  background: linear-gradient(270deg, rgba(147, 51, 234, 0.4), rgba(236, 72, 153, 0.4));
  background-size: 400% 400%;
  animation: gradientMove 15s ease infinite;
}

@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.case-card-img:hover {
  transform: scale(1.03) rotate(-1deg);
  box-shadow: 0 0 14px rgba(0, 0, 0, 0.1);
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-spin-slow {
  animation: spin-slow 15s linear infinite;
}

@keyframes wiggle {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.animate-wiggle {
  animation: wiggle 3s ease-in-out infinite;
}

@keyframes fade-up {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.animate-fade-up {
  animation: fade-up 1s ease-out forwards;
}

.delay-200 {
  animation-delay: 0.2s;
}

.balance-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85), rgba(30, 64, 175, 0.55));
  border-radius: 9999px;
  border: 1px solid rgba(96, 165, 250, 0.45);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
  backdrop-filter: blur(10px);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 0;
  padding: 0.3rem 0.6rem;
  gap: 0.45rem;
}

.balance-chip::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: inherit;
  background: radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.45), transparent 60%),
              radial-gradient(circle at 80% 30%, rgba(236, 72, 153, 0.35), transparent 60%);
  opacity: 0.9;
  filter: blur(8px);
  z-index: -2;
  pointer-events: none;
}

.balance-chip:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.balance-icon {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.6), rgba(129, 140, 248, 0.6));
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
  width: 1.6rem;
  height: 1.6rem;
}

.balance-icon img {
  width: 0.9rem;
  height: 0.9rem;
}

.balance-amount {
  font-weight: 700;
  color: var(--text-primary);
  text-shadow: 0 0 10px rgba(191, 219, 254, 0.2);
  letter-spacing: 0.015em;
  font-size: 0.9rem;
}

.balance-label {
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}

.active-nav-link {
  color: #f8fafc !important;
  text-shadow: 0 0 12px rgba(96, 165, 250, 0.75);
}

.active-mobile-nav-link {
  background-color: rgba(30, 41, 59, 0.75);
  border-radius: 0.75rem;
  color: #f8fafc !important;
}

.topup-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #34d399, #10b981);
  color: #ecfdf5;
  border-radius: 9999px;
  padding: 0.25rem 0.6rem;
  font-weight: 700;
  line-height: 1;
  font-size: 0.75rem;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.32);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: none;
  cursor: pointer;
}

.topup-chip:hover {
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.45);
}

.topup-chip:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.35);
}

@keyframes sparkle {
  0%, 100% { opacity: 0.2; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

.emoji-sparkle {
  animation: sparkle 2s ease-in-out infinite;
  display: inline-block;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4); }
  50% { box-shadow: 0 0 15px 5px rgba(255, 215, 0, 0.6); }
}

.legendary-glow {
  animation: pulse-glow 2s infinite;
}

@keyframes logo-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.05); }
}

.logo-pulse {
  animation: logo-pulse 4s ease-in-out infinite;
}

.premium-popup {
  background: linear-gradient(145deg, #1c1f26, #0e0f13);
  border: 1px solid rgba(255, 215, 0, 0.15);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.1);
}

.premium-button {
  background: linear-gradient(to right, #d4af37, #b8860b);
  color: white;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.premium-button:hover {
  box-shadow: 0 0 12px #ffd700;
  transform: scale(1.05);
}

.premium-glow {
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

/* Hero spinner styling */
.hero-spinner-border {
  position: relative;
  background: rgba(15, 15, 20, 0.6);
  border-radius: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  overflow: hidden;
  border: 3px solid transparent;
}

.hero-spinner-border::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 3px;
  border-radius: inherit;
  background: linear-gradient(90deg, #ec4899, #8b5cf6);
  -webkit-mask: linear-gradient(#0000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hero-spinner {
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
}

.hero-pointer {
  background: linear-gradient(to bottom, #ec4899, #8b5cf6);
  box-shadow: 0 0 8px rgba(236, 72, 153, 0.8);
}

@keyframes overlay-zoom {
  0% { transform: scale(0.75); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.animate-overlay-zoom {
  animation: overlay-zoom 0.3s ease-out forwards;
}

@keyframes pulse-balance {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.8; }
}

.pulse-balance {
  animation: pulse-balance 0.4s ease;
}

.balance-change {
  animation: pulse-balance 0.4s ease;
  color: #f59e0b;
}

/* Hero pack cross-fade animation */
.hero-pack-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-pack-img.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.flip-card {
  perspective: 1000px;
}

.flip-card-inner {
  position: relative;
  width: 160px;
  height: 160px;
  transform-style: preserve-3d;
  transition: transform 0.7s ease;
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}

.flip-card-front {
  transform: rotateY(180deg);
}

.flip-card-back {
  transform: rotateY(0deg);
}

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

@media (max-width: 640px) {
  .flip-card-inner {
    width: 120px;
    height: 120px;
  }
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.glow-common {
  box-shadow: 0 0 15px 4px rgba(156, 163, 175, 0.5); /* gray */
}
.glow-uncommon {
  box-shadow: 0 0 20px 5px rgba(34, 197, 94, 0.6); /* green */
}
.glow-rare {
  box-shadow: 0 0 20px 6px rgba(59, 130, 246, 0.6); /* blue */
}
.glow-ultra {
  box-shadow: 0 0 25px 7px rgba(168, 85, 247, 0.6); /* purple */
}
.glow-legendary {
  box-shadow: 0 0 30px 10px rgba(250, 204, 21, 0.8); /* yellow */
}

.cosmic-section {
  position: relative;
  background: radial-gradient(ellipse at bottom, #0d0b1f, #070414);
  overflow: hidden;
  border-radius: 1rem;
  padding: 2rem;
}

.cosmic-stars::before,
.cosmic-stars::after {
  content: "";
  position: absolute;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background-image: radial-gradient(2px 2px at 20% 30%, #fff, transparent),
                    radial-gradient(1.5px 1.5px at 60% 70%, #fff, transparent),
                    radial-gradient(1px 1px at 90% 10%, #fff, transparent),
                    radial-gradient(2px 2px at 10% 90%, #fff, transparent);
  animation: twinkle 30s linear infinite;
  opacity: 0.15;
  pointer-events: none;
}

.cosmic-stars::after {
  animation-delay: 15s;
}

@keyframes twinkle {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-10%) rotate(360deg); }
}

.stardust {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.stardust span {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  opacity: 0.3;
  animation: drift 10s linear infinite;
}

@keyframes drift {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) scale(0.8);
    opacity: 0;
  }
}
.stardust {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.stardust span {
  position: absolute;
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 9999px;
  opacity: 0.6;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
  animation: floatUp 8s linear infinite;
}

@keyframes floatUp {
  0% {
    transform: translateY(0) scale(1);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-20px) scale(1.2);
    opacity: 1;
  }
  100% {
    transform: translateY(-40px) scale(1);
    opacity: 0;
  }
}

.spinner-item img {
  max-width: 80%;
  max-height: 80%;
}

/* Smooth horizontal scroll */
#recent-wins-carousel {
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
}
#recent-wins-carousel::-webkit-scrollbar {
  display: none;
}

#hot-cards,
#cases-carousel {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}
#hot-cards::-webkit-scrollbar,
#cases-carousel::-webkit-scrollbar {
  display: none;
}

@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}
.animate-marquee {
  animation: marquee 20s linear infinite;
}

html {
  scroll-behavior: smooth;
}

.card-gradient-common {
  background: linear-gradient(180deg, #3f3f46, #52525b);
}
.card-gradient-uncommon {
  background: linear-gradient(180deg, #14532d, #22c55e);
}
.card-gradient-rare {
  background: linear-gradient(180deg, #1e40af, #3b82f6);
}
.card-gradient-ultrarare {
  background: linear-gradient(180deg, #6b21a8, #a855f7);
}
.card-gradient-legendary {
  background: linear-gradient(180deg, #854d0e, #facc15);
}
.common {
  border: 2px solid #aaa;
}
.uncommon {
  border: 2px solid #4fc3f7;
  box-shadow: 0 0 10px #4fc3f7;
}
.rare {
  border: 2px solid #ba68c8;
  box-shadow: 0 0 12px #ba68c8;
}
.ultra-rare {
  border: 2px solid gold;
  box-shadow: 0 0 14px gold;
}
.legendary {
  border: 2px solid crimson;
  background: linear-gradient(45deg, crimson, orange);
  box-shadow: 0 0 20px crimson, 0 0 30px orange;
  color: white;
}
.item {
  background: #1c1c1c;
  font-weight: bold;
  box-shadow: 0 0 10px rgba(255,255,255,0.05);
}
@keyframes scroll-preview {
  0% { transform: translateX(0); }
  50% { transform: translateX(-80px); }
  100% { transform: translateX(0); }
}

.animate-scroll-preview {
  animation: scroll-preview 5s ease-in-out infinite;
}
@keyframes scrollPreview {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.animate-scroll-preview {
  animation: scrollPreview 20s linear infinite;
}

<style>
  .glow-card {
    box-shadow:
      0 0 12px rgba(255, 105, 180, 0.6),
      0 0 20px rgba(255, 255, 255, 0.3),
      0 0 25px rgba(255, 105, 180, 0.4);
    transition: box-shadow 0.4s ease;
    background-color: rgba(255, 255, 255, 0.05);
  }
</style>

/* Entry animation for popup */
@keyframes popupIn {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.popup-box {
  animation: popupIn 0.4s ease-out;
}

/* Rarity-based glow flash animations */
@keyframes glow-flash-legendary {
  0%, 100% { filter: drop-shadow(0 0 0px #facc15); }
  50% { filter: drop-shadow(0 0 14px #facc15); }
}
@keyframes glow-flash-ultrarare {
  0%, 100% { filter: drop-shadow(0 0 0px #e879f9); }
  50% { filter: drop-shadow(0 0 14px #e879f9); }
}
@keyframes glow-flash-rare {
  0%, 100% { filter: drop-shadow(0 0 0px #3b82f6); }
  50% { filter: drop-shadow(0 0 14px #3b82f6); }
}
@keyframes glow-flash-uncommon {
  0%, 100% { filter: drop-shadow(0 0 0px #22c55e); }
  50% { filter: drop-shadow(0 0 14px #22c55e); }
}
@keyframes glow-flash-common {
  0%, 100% { filter: drop-shadow(0 0 0px #9ca3af); }
  50% { filter: drop-shadow(0 0 14px #9ca3af); }
}

/* Apply glow animation classes */
.glow-flash-legendary {
  animation: glow-flash-legendary 1s ease-in-out 2;
}
.glow-flash-ultrarare {
  animation: glow-flash-ultrarare 1s ease-in-out 2;
}
.glow-flash-rare {
  animation: glow-flash-rare 1s ease-in-out 2;
}
.glow-flash-uncommon {
  animation: glow-flash-uncommon 1s ease-in-out 2;
}
.glow-flash-common {
  animation: glow-flash-common 1s ease-in-out 2;
}

@keyframes zoom-in {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  60% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}

.animate-zoom-in {
  animation: zoom-in 0.4s ease-out forwards;
}
@keyframes pop {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

<style>
@keyframes shimmer {
  0% {
    background-position: -100% 0;
  }
  100% {
    background-position: 200% 0;
  }
}
@keyframes rainbowShimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.holographic-card .shimmer {
  background: linear-gradient(
    120deg,
    rgba(255, 0, 255, 0.15),
    rgba(0, 255, 255, 0.15),
    rgba(255, 255, 0, 0.15),
    rgba(255, 0, 255, 0.15)
  );
  background-size: 400% 100%;
  animation: rainbowShimmer 4s linear infinite;
  opacity: 0.5;
  mix-blend-mode: color-dodge;
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 1;
}

</style>

@keyframes shimmer {
  0% {
    background-position: -150% 0;
  }
  100% {
    background-position: 150% 0;
  }
}
@keyframes holo-foil {
  0% {
    transform: translateX(-20%) translateY(-20%) rotate(0deg);
  }
  100% {
    transform: translateX(20%) translateY(20%) rotate(360deg);
  }
}
.shimmer-pointer-events {
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.12) 45%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0.12) 55%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer 3s infinite linear;
  mix-blend-mode: screen;
  pointer-events: none;
}

.animate-holo-foil {
  animation: holo-foil 12s linear infinite;
}

@keyframes spin-slow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.animate-spin-slow {
  animation: spin-slow 6s linear infinite;
}

#win-popup > div {
  animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes subtle-flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.near-miss-flash {
  animation: subtle-flash 0.5s ease-in-out 3;
}

/* Legendary Spinner Glow */
.glow-legendary {
  box-shadow: 0 0 6px 2px #facc15aa, 0 0 12px 4px #facc15aa inset;
  animation: pulse-glow 2.5s infinite ease-in-out;
  z-index: 1;
}


@keyframes rotate-light {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.shining-button {
  position: relative;
  z-index: 0;
}

.shining-button::before {
  content: "";
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 9999px;
  background: conic-gradient(from 0deg, #facc15, #ec4899, #8b5cf6, #facc15);
  z-index: -1;
  animation: rotate-light 2s linear infinite;
  filter: blur(6px);
  opacity: 0.7;
}
@keyframes glow {
  0%, 100% {
    opacity: 0.15;
    transform: scale(1);
  }
  50% {
    opacity: 0.35;
    transform: scale(1.05);
  }
}

@keyframes pop {
  0% {
    transform: scale(0.9);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.animate-glow {
  animation: glow 2s ease-in-out infinite;
}

.animate-pop {
  animation: pop 0.3s ease-out;
}
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
  }
  50% {
    box-shadow: 0 0 35px rgba(255, 255, 255, 0.8);
  }
}

.glow-common {
  box-shadow: 0 0 12px 3px #a1a1aa;
  border-radius: 0.75rem;
}
.glow-uncommon {
  box-shadow: 0 0 14px 4px #4ade80;
  border-radius: 0.75rem;
}
.glow-rare {
  box-shadow: 0 0 16px 4px #60a5fa;
  border-radius: 0.75rem;
}
.glow-ultrarare {
  box-shadow: 0 0 18px 5px #c084fc;
  border-radius: 0.75rem;
}
.glow-legendary {
  box-shadow: 0 0 20px 6px #facc15;
  border-radius: 0.75rem;
}

/* Cross-browser styles for dynamic pack labels and buttons */
.spice-label {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 10;
}

.spice-label i {
  font-size: 1rem;
}

.spice-easy { color: #22c55e; }
.spice-medium { color: #f97316; }
.spice-hard { color: #ef4444; }

.open-button {
  margin-top: 0.5rem;
  width: 100%;
  padding: 0.5rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  font-weight: 600;
  border-radius: 0.5rem;
  background: #3b82f6;
  background: -webkit-linear-gradient(left, #3b82f6, #8b5cf6);
  background: linear-gradient(to right, #3b82f6, #8b5cf6);
}

@media (max-width: 640px) {
  .spice-label i {
    font-size: 0.75rem;
  }
  .open-button {
    padding: 0.375rem 0;
    gap: 0.25rem;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.fade-in {
  animation: fade-in 0.2s ease forwards;
}

.fade-out {
  animation: fade-out 0.2s ease forwards;
}

/* --- Crazy header/nav redesign --- */
  .crazy-nav {
    background: rgba(17, 17, 23, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  }

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  transition: background-color 0.3s, color 0.3s;
}

.nav-link:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.neon-balance {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: none;
}

.gem-icon {
  filter: drop-shadow(0 0 2px rgba(56, 189, 248, 0.7));
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
}

.gradient-text {
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.crazy-bottom-nav {
  background: rgba(17, 17, 23, 0.8);
  backdrop-filter: blur(10px);
  border-top: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 20px rgba(236, 72, 153, 0.3);
}

.crazy-bottom-nav a,
.crazy-bottom-nav button {
  transition: transform 0.3s;
}

.crazy-bottom-nav a:hover,
.crazy-bottom-nav button:hover {
  transform: translateY(-2px);
}

@keyframes borderDance {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Crazy footer redesign */
.crazy-footer {
  background: rgba(17, 17, 23, 0.8);
  backdrop-filter: blur(12px);
  border-top: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 25px rgba(236, 72, 153, 0.3), 0 0 50px rgba(147, 51, 234, 0.2);
  position: relative;
  overflow: hidden;
}

.crazy-footer::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(90deg, #ec4899, #9333ea, #3b82f6, #ec4899);
  background-size: 300% 300%;
  animation: borderDance 8s linear infinite;
  z-index: -2;
}

.crazy-footer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 23, 0.95);
  z-index: -1;
}

/* Category tabs */

.category-tab {
  background-color: #e5e7eb;
  color: #374151;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  line-height: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.category-tab:hover {
  background-color: #d1d5db;
}

.category-tab.active {
  background-color: #4f46e5;
  color: #ffffff;
}

.category-tab i {
  pointer-events: none;
}

.category-tab .tab-label {
  pointer-events: none;
}

  /* Free pack signup tile */

  .free-pack-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(99, 102, 241, 0.16));
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.35);
  }

  body:not(.dark-mode) .free-pack-card {
    background: linear-gradient(135deg, rgba(224, 242, 254, 0.9), rgba(199, 210, 254, 0.9));
    border-color: rgba(148, 163, 184, 0.45);
    box-shadow: 0 18px 28px rgba(15, 23, 42, 0.18);
    color: #0f172a;
  }

  .free-pack-glow {
    position: absolute;
    inset: -35%;
    background: radial-gradient(circle at 30% 30%, rgba(34, 211, 238, 0.28), transparent 50%),
      radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.22), transparent 40%),
      radial-gradient(circle at 50% 80%, rgba(14, 165, 233, 0.18), transparent 45%);
    filter: blur(12px);
    pointer-events: none;
    z-index: 0;
  }

  .free-pack-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1;
    margin-bottom: 0.75rem;
  }

  .free-pack-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.12);
    color: #e0f2fe;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 12px 24px rgba(14, 165, 233, 0.3);
  }

  body:not(.dark-mode) .free-pack-pill {
    background: rgba(14, 165, 233, 0.12);
    color: #0f172a;
    border-color: rgba(14, 165, 233, 0.35);
    box-shadow: none;
  }

  .free-pack-spark {
    color: #a5b4fc;
    font-size: 1.25rem;
    animation: sparkle 1.8s ease-in-out infinite;
  }

  .free-pack-body {
    position: relative;
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    align-items: center;
    z-index: 1;
  }

  .free-pack-art {
    position: relative;
    display: grid;
    place-items: center;
    padding: 1.1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.28);
    overflow: hidden;
  }

  body:not(.dark-mode) .free-pack-art {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(148, 163, 184, 0.5);
  }

  .free-pack-art img {
    width: 180px;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 18px 32px rgba(34, 211, 238, 0.28));
    transition: transform 0.3s ease;
  }

  .free-pack-card.is-open img {
    transform: translateY(-6px) scale(1.02);
  }

  .free-pack-items {
    position: absolute;
    inset: 0;
    pointer-events: none;
  }

  .free-pack-item {
    position: absolute;
    display: grid;
    gap: 0.4rem;
    padding: 0.65rem 0.75rem;
    width: 150px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(15, 118, 178, 0.9));
    border: 1px solid rgba(125, 211, 252, 0.4);
    box-shadow: 0 20px 40px rgba(14, 165, 233, 0.25);
    opacity: 0;
    transform: translateX(-140%) rotate(-6deg);
    transition: transform 0.45s ease, opacity 0.45s ease;
  }

  .free-pack-item img {
    width: 100%;
    height: 90px;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(14, 165, 233, 0.4));
  }

  .free-pack-item-label {
    font-weight: 800;
    font-size: 0.85rem;
    color: #e0f2fe;
    letter-spacing: 0.01em;
  }

  #free-pack-item-left {
    left: -14%;
    top: 26%;
  }

  #free-pack-item-right {
    right: -14%;
    top: 44%;
    transform: translateX(140%) rotate(8deg);
  }

  .free-pack-card.is-open #free-pack-item-left {
    opacity: 1;
    transform: translateX(0) rotate(-4deg);
  }

  .free-pack-card.is-open #free-pack-item-right {
    opacity: 1;
    transform: translateX(0) rotate(6deg);
  }

  .free-pack-pulse {
    position: absolute;
    inset: 18%;
    border-radius: 20px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.16), transparent 65%);
    animation: pulse 2.4s ease-in-out infinite;
  }

  .free-pack-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: radial-gradient(circle at 20% 30%, rgba(244, 63, 94, 0.6) 0, rgba(244, 63, 94, 0.6) 6px, transparent 8px),
      radial-gradient(circle at 70% 20%, rgba(59, 130, 246, 0.7) 0, rgba(59, 130, 246, 0.7) 6px, transparent 8px),
      radial-gradient(circle at 40% 70%, rgba(16, 185, 129, 0.8) 0, rgba(16, 185, 129, 0.8) 6px, transparent 8px);
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.35s ease, transform 0.35s ease;
  }

  .free-pack-card.is-open .free-pack-confetti,
  .free-pack-confetti.pop {
    opacity: 1;
    transform: scale(1);
  }

  .free-pack-copy {
    display: grid;
    gap: 0.75rem;
  }

  .free-pack-title {
    color: #fff;
    font-size: clamp(1.4rem, 2vw, 1.8rem);
    font-weight: 900;
    letter-spacing: -0.01em;
  }

  .free-pack-sub {
    color: #cbd5e1;
    font-size: 0.98rem;
    max-width: 540px;
  }

  .free-pack-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .free-pack-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.28), rgba(14, 165, 233, 0.26));
    color: #e0f2fe;
    font-weight: 800;
    border: 1px solid rgba(59, 130, 246, 0.35);
    box-shadow: 0 12px 26px rgba(14, 165, 233, 0.25);
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.25s ease;
  }

  body:not(.dark-mode) .free-pack-button {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(14, 165, 233, 0.2));
    color: #0b172a;
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: 0 10px 20px rgba(14, 165, 233, 0.15);
  }

  .free-pack-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px rgba(14, 165, 233, 0.28);
  }

  .free-pack-button.ghost {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(148, 163, 184, 0.3);
    color: #fff;
    box-shadow: none;
  }

  body:not(.dark-mode) .free-pack-button.ghost {
    background: rgba(15, 23, 42, 0.06);
    color: #0f172a;
    border-color: rgba(148, 163, 184, 0.6);
  }

  .free-pack-status {
    color: #c7d2fe;
    font-weight: 700;
  }

  body:not(.dark-mode) .free-pack-title {
    color: #0f172a;
  }

  body:not(.dark-mode) .free-pack-sub {
    color: #0f172a;
  }

  body:not(.dark-mode) .free-pack-status {
    color: #0f172a;
  }

  @keyframes pulse {
    0% {
      opacity: 0.2;
      transform: scale(0.95);
    }
    50% {
      opacity: 0.6;
      transform: scale(1.05);
    }
    100% {
      opacity: 0.2;
      transform: scale(0.95);
    }
  }

  @keyframes sparkle {
    0%,
    100% {
      transform: scale(1);
      opacity: 0.9;
    }
    50% {
      transform: scale(1.2) rotate(8deg);
      opacity: 1;
    }
  }
