/* LUCKY MYSTERY BOX - CSS MANIFEST */
/* Extracted from single-file HTML, converted to standalone stylesheet */
/* All CSS properties, animations, and themes preserved exactly */

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
:root {
  /* Colors */
  --purple: #7c3aed;
  --purple-light: #a855f7;
  --purple-dim: #4c1d95;
  --cyan: #06b6d4;
  --cyan-light: #22d3ee;
  --pink: #ec4899;
  --gold: #f59e0b;
  --green: #10b981;
  --text: #e2d9f3;
  --text-dim: #8b7fad;
  --border: rgba(124,58,237,0.25);
  --bg-card: #151330;
  --bg-card2: #1a1840;
  
  /* Background - Consolidated */
  --bg-primary: #0a0515;
  --bg-secondary: #0f0820;
  --bg-tertiary: #080410;
  --bg-accent: #050208;
  
  /* Gradients */
  --grad-main: linear-gradient(135deg, #7c3aed, #06b6d4);
  --grad-card: linear-gradient(160deg, #1e1b4b 0%, #0f0d2a 100%);
}

:root[data-theme="light"] {
  --purple: #6d28d9;
  --purple-light: #7c3aed;
  --purple-dim: #5b21b6;
  --cyan: #0891b2;
  --cyan-light: #06b6d4;
  --pink: #db2777;
  --gold: #d97706;
  --green: #059669;
  --text: #0f172a;
  --text-dim: #475569;
  --border: rgba(99, 102, 241, 0.25);
  --bg-card: #ffffff;
  --bg-card2: #f8fafc;
  --bg-primary: #f8fafc;
  --bg-secondary: #eef2ff;
  --bg-tertiary: #e2e8f0;
  --bg-accent: #f1f5f9;
  --grad-main: linear-gradient(135deg, #7c3aed, #0891b2);
  --grad-card: linear-gradient(160deg, #ffffff 0%, #eef2ff 100%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body {
  font-family: 'Be Vietnam Pro', sans-serif;
  color: var(--text);
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  scrollbar-width: none;
  -ms-overflow-style: none;
  background-color: var(--bg-primary);
  background: linear-gradient(
    180deg,
    var(--bg-primary) 0%,
    var(--bg-secondary) 25%,
    var(--bg-tertiary) 50%,
    var(--bg-secondary) 75%,
    var(--bg-accent) 100%
  );
  background-attachment: fixed;
}

:root[data-theme="light"] body {
  color-scheme: light;
}

/* Hide scrollbar for Chrome, Safari and Opera */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* Hide scrollbars on all scrollable elements */
::-webkit-scrollbar {
  display: none;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
  }
}

@media (prefers-contrast: more) {
  body {
    background: linear-gradient(
      180deg,
      #1a1540 0%,
      #2a1050 25%,
      #1f0f40 50%,
      #2a1050 75%,
      #141030 100%
    ) !important;
  }
}

@media (prefers-color-scheme: dark) {
  body {
    color-scheme: dark;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  body {
    background: #0f0c29 !important;
  }
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(10, 8, 24, 0.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 2000;
  position: relative;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 700;
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: pointer;
}

.nav-logo svg {
  flex-shrink: 0;
}

.session-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #34d399;
  cursor: default;
}

.session-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 2s infinite;
  will-change: opacity, transform;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(0.85);
  }
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.nav-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(124, 58, 237, 0.1);
  color: var(--text-dim);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease-out;
  font-family: inherit;
  will-change: background, color, border-color;
}

.nav-icon-btn:hover {
  background: rgba(124, 58, 237, 0.25);
  color: var(--text);
  border-color: rgba(124, 58, 237, 0.5);
  transform: translateY(-1px);
}

.wallet-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #4c1d95, #1e3a5f);
  border: 1px solid rgba(124, 58, 237, 0.5);
  border-radius: 12px;
  padding: 6px 16px 6px 10px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 130px;
  font-family: inherit;
}

.wallet-btn:hover {
  background: linear-gradient(135deg, #5b21b6, #1e4a7f);
}

.wallet-btn .wallet-icon {
  background: rgba(124, 58, 237, 0.3);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wallet-info {
  line-height: 1.2;
}

.wallet-label {
  font-size: 10px;
  color: var(--text-dim);
}

.wallet-amount {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

/* ===== PAGES ===== */
.page {
  display: none !important;
  padding-top: 64px;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.page.active {
  display: block !important;
}

/* ===== HOME PAGE ===== */
#page-home.active {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 0px 20px 20px;
}

.home-hero {
  text-align: center;
  max-width: 520px;
}

.home-logo-big {
  width: 100%;
  max-width: 350px;
  height: auto;
  min-height: 200px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(6, 182, 212, 0.1));
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  animation: floatY 3s ease-in-out infinite;
  will-change: transform;
  padding: 20px;
}

.home-logo-big img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* ===== GALAXY ANIMATION ===== */
@keyframes galaxyPulse {
  0%, 100% {
    opacity: 1;
    filter: brightness(1);
  }
  25% {
    opacity: 0.95;
    filter: brightness(1.1);
  }
  50% {
    opacity: 0.9;
    filter: brightness(0.95);
  }
  75% {
    opacity: 0.95;
    filter: brightness(1.05);
  }
}

/* ===== FLOATING GIFTS ANIMATION ===== */
@keyframes giftFloat {
  0% {
    transform: translateY(100vh) rotate(0deg) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.15;
  }
  50% {
    opacity: 0.15;
    transform: translateY(50vh) translateX(50px) rotate(180deg) scale(1.1);
  }
  90% {
    opacity: 0.15;
  }
  100% {
    transform: translateY(-100vh) rotate(360deg) scale(0.8);
    opacity: 0;
  }
}

/* ===== TWINKLING STARS ANIMATION ===== */
@keyframes twinkleStar {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

/* ===== NEBULA DRIFT ANIMATION ===== */
@keyframes nebulaDrift {
  0%, 100% {
    filter: blur(40px) brightness(0.8);
  }
  50% {
    filter: blur(40px) brightness(1.2);
  }
}

@keyframes floatY {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.home-title {
  font-size: 42px;
  font-weight: 800;
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  line-height: 1.1;
}

.home-subtitle {
  font-size: 15px;
  color: var(--text-dim);
  margin-bottom: 40px;
  line-height: 1.6;
}

.online-visitors {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 12px;
  padding: 12px 20px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: #34d399;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.visitor-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

.visitor-count {
  font-weight: 700;
  font-size: 16px;
  color: #22d3ee;
  min-width: 50px;
  text-align: center;
}

.visitor-text {
  color: #34d399;
  flex-shrink: 0;
}

.session-input-card {
  background: rgba(21, 19, 48, 0.8);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  width: 100%;
  backdrop-filter: blur(20px);
}

.session-input-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  display: block;
}

.session-input-row {
  display: flex;
  gap: 10px;
}

.session-input {
  flex: 1;
  background: rgba(10, 8, 24, 0.6);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  width: 500px;
}

.session-input:focus {
  border-color: var(--purple-light);
}

.session-input::placeholder {
  color: var(--text-dim);
}

.btn-enter {
  background: var(--grad-main);
  border: none;
  border-radius: 12px;
  padding: 14px 24px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s, transform 0.15s;
}

.btn-enter:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

.btn-enter:active {
  transform: scale(0.98);
}

.home-note {
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--text-dim);
  text-align: center;
}

.features-row {
  display: flex;
  gap: 10px;
  margin-top: 32px;
  width: 100%;
  max-width: 480px;
  justify-content: center;
}

.feature-card {
  flex: 0 1 140px;
  background: rgba(21, 19, 48, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
  transition: all 0.2s ease;
  w
}

.feature-card:hover {
  background: rgba(21, 19, 48, 0.9);
  border-color: rgba(124, 58, 237, 0.4);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 20px;
  margin-bottom: 6px;
}

.feature-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.feature-desc {
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 3px;
}

/* ===== CHOOSE BOX PAGE ===== */
#page-choose {
  padding: 80px 24px 40px;
}

.choose-header {
  text-align: center;
  padding: 60px 0 50px;
}

.choose-title {
  font-size: 38px;
  font-weight: 800;
  background: linear-gradient(135deg, #c084fc, #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 14px;
}

.choose-subtitle {
  font-size: 15px;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.choose-warning {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 20px;
  padding: 5px 14px;
}

.boxes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 3vw, 28px);
  align-items: start;
  justify-items: stretch;
  padding: 0 clamp(12px, 5vw, 40px);
  max-width: 1100px;
  margin: 0 auto;
}

.box-card:nth-child(2) {
  margin-top: clamp(12px, 2.5vw, 32px);
}

.box-card {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--grad-card);
  border: 1px solid rgba(124, 58, 237, 0.35);
  border-radius: clamp(16px, 4vw, 24px);
  padding: clamp(12px, 4vw, 32px);
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  background-clip: padding-box;
  isolation: isolate;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.box-card.is-opened {
  opacity: 0.45;
  pointer-events: none;
  filter: grayscale(0.6);
}

.box-card.is-pending {
  opacity: 0.4;
  pointer-events: none;
}

/* Removed .box-card::before overlay */

.box-card:active {
  transform: translateY(-4px) scale(0.99);
}

.box-sparkle {
  position: absolute;
  top: 14px;
  right: 14px;
  color: var(--cyan-light);
  animation: sparkleRotate 3s ease-in-out infinite;
}

.box-sparkle.dim {
  color: rgba(168, 85, 247, 0.4);
  animation-delay: 1s;
}

.box-sparkle.dimmer {
  color: rgba(168, 85, 247, 0.2);
  animation-delay: 2s;
}

@keyframes sparkleRotate {
  0%, 100% {
    transform: rotate(0deg) scale(1);
    opacity: 1;
  }
  50% {
    transform: rotate(15deg) scale(1.1);
    opacity: 0.6;
  }
}

.box-sparkle-bl {
  position: absolute;
  bottom: 14px;
  left: 14px;
  color: rgba(168, 85, 247, 0.25);
  animation: sparkleRotate 4s ease-in-out infinite reverse;
}

.box-gift-icon {
  font-size: clamp(40px, 12vw, 90px);
  margin: clamp(8px, 2vw, 24px) 0;
  display: block;
  filter: drop-shadow(0 0 20px rgba(168, 85, 247, 0.4));
  transition: transform 0.3s;
}

.box-card:hover .box-gift-icon {
  transform: scale(1.1) rotate(-3deg);
}

.box-label {
  display: inline-block;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: clamp(8px, 2vw, 12px);
  padding: clamp(6px, 1.5vw, 12px) clamp(12px, 3vw, 20px);
  font-size: clamp(11px, 3vw, 16px);
  font-weight: 700;
  color: var(--text);
}

.choose-tip {
  text-align: center;
  margin-top: 40px;
  font-size: 13px;
  color: var(--text-dim);
}

/* ===== OPENED PRIZES DISPLAY ===== */
#openedPrizesContainer {
  padding: 30px 20px;
  background: rgba(124,58,237,0.05);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

.opened-prizes-title {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: #a855f7;
  margin-bottom: 20px;
  text-shadow: 0 0 10px rgba(168,85,247,0.3);
}

.opened-prizes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.opened-prize-item {
  background: linear-gradient(135deg, rgba(124,58,237,0.1), rgba(6,182,212,0.1));
  border: 1.5px solid rgba(124,58,237,0.3);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.opened-prize-item:hover {
  border-color: rgba(168,85,247,0.6);
  background: linear-gradient(135deg, rgba(124,58,237,0.2), rgba(6,182,212,0.2));
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(124,58,237,0.2);
}

.opened-prize-icon {
  font-size: 28px;
  margin-bottom: 8px;
  display: block;
  animation: bobbing 2s ease-in-out infinite;
}

.opened-prize-name {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.opened-prize-detail {
  font-size: 11px;
  color: #22d3ee;
  margin-bottom: 4px;
}

.opened-prize-value {
  font-size: 10px;
  font-weight: 700;
  color: #34d399;
  padding: 2px 6px;
  background: rgba(16,185,129,0.15);
  border-radius: 4px;
  margin: 4px 0;
}

.opened-prize-rarity {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 8px;
  text-transform: uppercase;
  margin-top: 4px;
}

.opened-prize-rarity.rarity-common {
  background: rgba(128,128,128,0.3);
  color: #a0a0a0;
  border: 1px solid rgba(128,128,128,0.5);
}

.opened-prize-rarity.rarity-uncommon {
  background: rgba(34,211,102,0.3);
  color: #34d399;
  border: 1px solid rgba(34,211,102,0.5);
}

.opened-prize-rarity.rarity-rare {
  background: rgba(6,182,212,0.3);
  color: #22d3ee;
  border: 1px solid rgba(6,182,212,0.5);
}

.opened-prize-rarity.rarity-epic {
  background: rgba(168,85,247,0.3);
  color: #d8b4fe;
  border: 1px solid rgba(168,85,247,0.5);
}

.opened-prize-rarity.rarity-legendary {
  background: rgba(236,72,153,0.3);
  color: #f472b6;
  border: 1px solid rgba(236,72,153,0.5);
}

@keyframes bobbing {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ===== OPENING ANIMATION PAGE ===== */
#page-opening.active {
  display: flex !important;
  background: radial-gradient(circle at center, rgba(34, 211, 238, 0.12) 0%, rgba(15, 23, 42, 0.96) 55%, #000 100%);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 100vh;
  gap: 24px;
}

.opening-scene {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.opening-scene.phase-2 .opening-ring {
  animation-duration: 0.95s;
}

.opening-scene.phase-2 .opening-burst {
  animation-duration: 1.4s;
}

.opening-scene.phase-2 .gift-lid {
  animation-duration: 0.45s;
}

.opening-glow {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.4) 0%, rgba(6, 182, 212, 0.2) 45%, rgba(6, 182, 212, 0) 75%);
  filter: blur(8px);
  animation: openingGlowPulse 1.2s ease-in-out infinite;
}

.opening-icon {
  position: relative;
  width: 110px;
  height: 110px;
  animation: openingBounce 1.1s ease-in-out infinite;
  transform-origin: center bottom;
  z-index: 3;
}

.opening-icon.opening-final {
  animation: openingPop .5s ease-out 1, openingBounce 1.1s ease-in-out .5s infinite;
}

.gift-body {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  border-radius: 10px;
  background: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 55%, #3b82f6 100%);
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.35);
}

.gift-lid {
  position: absolute;
  left: 6px;
  right: 6px;
  top: 22px;
  height: 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, #a855f7 0%, #8b5cf6 100%);
  box-shadow: 0 6px 18px rgba(168, 85, 247, 0.45);
  animation: lidShake 0.7s ease-in-out infinite;
}

.opening-beam {
  position: absolute;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: conic-gradient(from 180deg, rgba(34, 211, 238, 0) 0deg, rgba(34, 211, 238, 0.2) 35deg, rgba(244, 114, 182, 0.28) 90deg, rgba(34, 211, 238, 0) 150deg);
  filter: blur(4px);
  animation: beamRotate 2.2s linear infinite;
  z-index: 0;
  pointer-events: none;
}

.gift-ribbon-v,
.gift-ribbon-h {
  position: absolute;
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  z-index: 5;
  opacity: 0.95;
}

.gift-ribbon-v {
  width: 12px;
  top: 22px;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 8px;
}

.gift-ribbon-h {
  left: 6px;
  right: 6px;
  top: 34px;
  height: 10px;
  border-radius: 8px;
}

.opening-burst,
.opening-ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.opening-burst {
  width: 110px;
  height: 110px;
  border: 2px dashed rgba(34, 211, 238, 0.65);
  animation: burstSpin 2.2s linear infinite;
  z-index: 1;
}

.opening-ring {
  width: 150px;
  height: 150px;
  border: 2px solid rgba(168, 85, 247, 0.35);
  animation: ringPulse 1.2s ease-out infinite;
  z-index: 0;
}

.opening-particle {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 16px rgba(34, 211, 238, 0.75);
}

.opening-particle.p1 { top: 28px; left: 34px; animation: floatParticle 1.4s ease-in-out infinite; }
.opening-particle.p2 { top: 34px; right: 24px; background: #c084fc; box-shadow: 0 0 16px rgba(192, 132, 252, 0.75); animation: floatParticle 1.2s ease-in-out infinite .15s; }
.opening-particle.p3 { bottom: 34px; left: 24px; animation: floatParticle 1.3s ease-in-out infinite .25s; }
.opening-particle.p4 { bottom: 28px; right: 34px; background: #f472b6; box-shadow: 0 0 16px rgba(244, 114, 182, 0.75); animation: floatParticle 1.1s ease-in-out infinite .35s; }

.opening-spark {
  position: absolute;
  width: 18px;
  height: 18px;
  z-index: 4;
  opacity: 0.85;
  pointer-events: none;
}

.opening-spark::before,
.opening-spark::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(34, 211, 238, 0.95));
  border-radius: 10px;
}

.opening-spark::before {
  width: 3px;
  height: 18px;
}

.opening-spark::after {
  width: 18px;
  height: 3px;
}

.opening-spark.s1 { top: 54px; left: 52px; animation: sparkleTwinkle 0.9s ease-in-out infinite; }
.opening-spark.s2 { top: 62px; right: 46px; animation: sparkleTwinkle 1s ease-in-out infinite .2s; }
.opening-spark.s3 { bottom: 56px; left: 42px; animation: sparkleTwinkle 1.1s ease-in-out infinite .35s; }
.opening-spark.s4 { bottom: 48px; right: 50px; animation: sparkleTwinkle 0.95s ease-in-out infinite .5s; }

.opening-meta {
  text-align: center;
}

.opening-box-label {
  font-size: 13px;
  color: #c4b5fd;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-weight: 700;
}

.opening-text {
  margin-top: 0;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 600;
  min-height: 24px;
}

.opening-dots {
  display: inline-flex;
  gap: 6px;
  margin-top: 8px;
}

.opening-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(34, 211, 238, 0.95);
  animation: dotBlink 1s ease-in-out infinite;
}

.opening-dots span:nth-child(2) { animation-delay: .2s; }
.opening-dots span:nth-child(3) { animation-delay: .4s; }

@keyframes openingGlowPulse {
  0%, 100% {
    opacity: 0.75;
    transform: scale(0.95);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes openingBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-6px) scale(1.03); }
  75% { transform: translateY(2px) scale(0.98); }
}

@keyframes openingPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.2) rotate(-3deg); }
  100% { transform: scale(1); }
}

@keyframes lidShake {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  25% { transform: translateX(-3px) rotate(-2.2deg); }
  50% { transform: translateX(3px) rotate(2.2deg); }
  75% { transform: translateX(-2px) rotate(-1.4deg); }
}

@keyframes beamRotate {
  from { transform: rotate(0deg) scale(0.95); opacity: 0.65; }
  50% { transform: rotate(180deg) scale(1.02); opacity: 0.95; }
  to { transform: rotate(360deg) scale(0.95); opacity: 0.65; }
}

@keyframes burstSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes ringPulse {
  0% { transform: scale(0.9); opacity: 0.85; }
  100% { transform: scale(1.22); opacity: 0; }
}

@keyframes floatParticle {
  0%, 100% { transform: translateY(0); opacity: 0.8; }
  50% { transform: translateY(-8px); opacity: 1; }
}

@keyframes dotBlink {
  0%, 100% { transform: scale(0.85); opacity: 0.45; }
  50% { transform: scale(1.15); opacity: 1; }
}

@keyframes sparkleTwinkle {
  0%, 100% { transform: scale(0.75) rotate(0deg); opacity: 0.35; }
  50% { transform: scale(1.15) rotate(20deg); opacity: 1; }
}

@media (max-width: 640px) {
  .opening-scene {
    width: 180px;
    height: 180px;
  }

  .opening-icon {
    width: 92px;
    height: 92px;
  }

  .gift-body {
    height: 62px;
  }

  .opening-text {
    font-size: 16px;
  }
}

/* ===== RESULT OVERLAY ===== */
.result-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.result-overlay.active {
  display: flex;
}

.result-card {
  background: linear-gradient(160deg, #1a1840, #0f0d2a);
  border: 1px solid rgba(124, 58, 237, 0.4);
  border-radius: 24px;
  padding: 36px 32px;
  text-align: center;
  max-width: 520px;
  width: 90%;
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

@keyframes slideUp {
  from {
    transform: translateY(30px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.result-title {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 6px;
}

.result-subtitle {
  font-size: 14px;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.result-img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 20px;
}

.result-media {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-icon-fallback {
  font-size: 80px;
  text-align: center;
  padding: 40px 20px;
  display: none;
}

.result-sad-icon {
  font-size: 80px;
  margin: 10px 0 20px;
  display: block;
}

.result-item-name {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}

.result-item-desc {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.result-value-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid rgba(124, 58, 237, 0.4);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--purple-light);
  margin-bottom: 24px;
}

.result-actions {
  display: flex;
  gap: 12px;
}

.btn-claim {
  flex: 1;
  background: var(--purple);
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-claim:hover {
  background: var(--purple-light);
}

.btn-convert {
  flex: 1;
  background: var(--green);
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1.3;
}

.btn-convert:hover {
  background: #059669;
}

.btn-close-full {
  width: 100%;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-close-full:hover {
  opacity: 0.85;
}

/* ===== INVENTORY PAGE ===== */
#page-inventory {
  padding: 80px 24px 40px;
}

.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-dim);
  cursor: pointer;
  padding: 8px 0;
  transition: color 0.2s;
  background: none;
  border: none;
  font-family: inherit;
}

.back-btn:hover {
  color: var(--text);
}

.page-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.page-title {
  font-size: 28px;
  font-weight: 800;
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.info-card {
  background: rgba(21, 19, 48, 0.7);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px 20px;
  margin-bottom: 24px;
}

.info-card-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.info-card-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--purple-light);
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
}

.empty-state-icon {
  font-size: 64px;
  color: var(--text-dim);
  opacity: 0.4;
  margin-bottom: 20px;
  display: block;
}

.empty-state-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.empty-state-desc {
  font-size: 14px;
  color: var(--text-dim);
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.inventory-item-card {
  background: var(--grad-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
}

.inventory-item-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 10px;
}

.inventory-item-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
}

.inventory-item-val {
  font-size: 12px;
  color: var(--purple-light);
}

/* ===== SEARCH PAGE ===== */
#page-search {
  padding: 80px 24px 40px;
}

.search-box {
  display: flex;
  gap: 12px;
  background: rgba(21, 19, 48, 0.8);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 8px;
  flex-direction: column;
}

.search-input-row {
  display: flex;
  gap: 12px;
}

.search-hint {
  font-size: 12.5px;
  color: var(--text-dim);
}

.search-hint span {
  color: var(--cyan);
  font-weight: 600;
  cursor: pointer;
}

.search-hint span:hover {
  color: var(--cyan-light);
}

.btn-search {
  background: var(--grad-main);
  border: none;
  border-radius: 12px;
  padding: 14px 22px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s;
}

.btn-search:hover {
  opacity: 0.85;
}

.search-result-card {
  background: rgba(21, 19, 48, 0.7);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-top: 16px;
}

.search-result-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

/* ===== WALLET PAGE ===== */
#page-wallet {
  padding: 80px 24px 40px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 640px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  background: var(--grad-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}

.stat-card.blue {
  border-color: rgba(6, 182, 212, 0.3);
}

.stat-card.red {
  border-color: rgba(239, 68, 68, 0.3);
}

.stat-label {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
}

.stat-card.blue .stat-value {
  color: var(--cyan-light);
}

.stat-card.red .stat-value {
  color: #f87171;
}

.btn-withdraw {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-withdraw:hover {
  opacity: 0.85;
}

.stat-sub {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

.stat-sub.green {
  color: var(--green);
}

.stat-sub.red-text {
  color: #f87171;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.tx-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: rgba(10, 8, 24, 0.5);
  border-radius: 10px;
  padding: 4px;
  width: fit-content;
}

.tx-tab {
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  border: none;
  background: transparent;
  font-family: inherit;
  transition: all 0.2s;
}

.tx-tab.active {
  background: var(--purple);
  color: #fff;
}

.tx-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tx-item {
  background: rgba(21, 19, 48, 0.5);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.tx-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  flex-shrink: 0;
}

.tx-info {
  flex: 1;
}

.tx-name {
  font-size: 13px;
  font-weight: 600;
}

.tx-date {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

.tx-amount {
  font-size: 14px;
  font-weight: 800;
  color: var(--green);
}

.tx-status {
  font-size: 11px;
  color: var(--green);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
}

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: linear-gradient(160deg, #1a1840, #0f0d2a);
  border: 1px solid rgba(124, 58, 237, 0.4);
  border-radius: 24px;
  padding: 30px;
  width: 100%;
  max-width: 520px;
  max-height: min(92vh, 860px);
  overflow-y: auto;
  animation: slideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.modal-title {
  font-size: 20px;
  font-weight: 800;
}

.modal-avail {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.modal-avail span {
  color: var(--cyan);
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 20px;
  transition: color 0.2s;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text);
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.form-select,
.form-input {
  width: 100%;
  background: rgba(10, 8, 24, 0.6);
  border: 1px solid rgba(124, 58, 237, 0.3);
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}

.form-select:focus,
.form-input:focus {
  border-color: var(--purple-light);
}

.form-select option {
  background: #1a1840;
}

.form-note {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

.personal-benefits {
  margin-bottom: 4px;
}

.personal-benefit-item {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 10px 12px;
}

.withdraw-notice {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 12.5px;
  color: #fcd34d;
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 12px;
}

.btn-cancel {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s;
}

.btn-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-confirm-withdraw {
  flex: 2;
  background: var(--grad-main);
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-confirm-withdraw:hover {
  opacity: 0.9;
}

/* ===== ONLINE BADGE ===== */
.online-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #6ee7b7;
}

.online-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 6px #10b981;
  animation: onlinePulse 2s infinite;
}

@keyframes onlinePulse {
  0%, 100% {
    box-shadow: 0 0 4px #10b981;
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 10px #34d399;
    transform: scale(1.2);
  }
}

/* ===== WIN NOTIFICATIONS ===== */
#winNotiContainer {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 4000;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  pointer-events: none;
  max-width: 320px;
}

.win-noti {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(15, 13, 42, 0.96);
  border: 1px solid rgba(124, 58, 237, 0.45);
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(168, 85, 247, 0.1);
  backdrop-filter: blur(16px);
  pointer-events: none;
  animation: notiSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transform: translateX(-120%);
  opacity: 0;
}

.win-noti.show {
  animation: notiSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.win-noti.hide {
  animation: notiSlideOut 0.35s ease-in forwards;
}

@keyframes notiSlideIn {
  from {
    transform: translateX(-110%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes notiSlideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-110%);
    opacity: 0;
  }
}

.win-noti-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(6, 182, 212, 0.2));
  border: 1px solid rgba(124, 58, 237, 0.4);
}

.win-noti-body {
  flex: 1;
  min-width: 0;
}

.win-noti-name {
  font-size: 13px;
  font-weight: 700;
  color: #e2d9f3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.win-noti-prize {
  font-size: 12px;
  color: #a78bfa;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.win-noti-time {
  font-size: 10px;
  color: #6b7280;
  margin-top: 3px;
}

.win-noti-badge {
  font-size: 10px;
  font-weight: 700;
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  color: #fff;
  border-radius: 6px;
  padding: 2px 7px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ===== CONFETTI ===== */
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1500;
  overflow: hidden;
}

@keyframes confettiFall {
  0% {
    transform: translateY(-20px) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

/* ===== PAGE CONTAINER ===== */
.page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .choose-title {
    font-size: 28px;
  }

  .boxes-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(8px, 2vw, 12px);
    padding: 0 clamp(8px, 3vw, 12px);
  }

  .box-card:nth-child(2) {
    margin-top: clamp(8px, 2vw, 16px);
  }

  .home-title {
    font-size: 30px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  #winNotiContainer {
    max-width: 280px;
  }

  .win-noti {
    font-size: 12px;
    padding: 10px 14px;
  }

  /* Online Visitors - Tablet */
  .online-visitors {
    padding: 11px 18px;
    font-size: 13px;
    margin-bottom: 28px;
  }

  .visitor-count {
    font-size: 15px;
  }
}

/* ===== TOAST NOTIFICATION ===== */
#toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(120px);
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.95), rgba(20, 28, 47, 0.95));
  border: 1px solid rgba(124, 58, 237, 0.5);
  border-radius: 16px;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 9999;
  backdrop-filter: blur(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: opacity, transform;
}

#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.toast-text {
  font-size: 15px;
  font-weight: 500;
  color: #f1f5f9;
  text-align: center;
  min-width: 200px;
}

.toast-avatar {
  font-size: 24px;
  flex-shrink: 0;
  animation: pulse 1s infinite;
}

/* Background effects removed */

/* ===== SHOOTING STARS ===== */
/* Background effects removed */

/* ===== ENERGY RIPPLE WAVES ===== */
  /* Background effects removed */

/* ===== HOLOGRAPHIC SCANLINES ===== */
  /* Holographic scanlines removed */

/* ===== QUANTUM TUNNEL EFFECT ===== */
  /* Quantum tunnel effect removed */

/* ===== ROTATING COSMIC ORBS ===== */
  /* Rotating cosmic orbs removed */

/* ===== LIGHT BEAM EFFECTS ===== */
/* Removed boxes-grid::before light beam effect */

/* ===== GLITCH EFFECT ===== */
  /* Glitch effect removed */

/* ===== SHIMMER WAVES ===== */
/* Removed shimmer wave effect */

/* ===== PULSING ENERGY FIELD ===== */
  /* Pulsing energy field removed */

/* ===== CHROMATIC ABERRATION-LIKE EFFECT ===== */
  /* Chromatic aberration effect removed */

/* ===== PORTAL VORTEX ===== */
  /* Portal vortex removed */

/* ===== COLOR SHIFT EFFECT ===== */
  /* Color shift effect removed */

/* ===== NEBULA WAVES ===== */
  /* Nebula waves removed */

/* ===== COSMIC RAYS ===== */
  /* Cosmic rays removed */

/* ===== COMPREHENSIVE RESPONSIVE DESIGN ===== */

/* Mobile First - Extra Small Devices (< 480px) */
@media (max-width: 479px) {
  /* Typography */
  html {
    font-size: 14px;
  }

  /* Navbar */
  .navbar {
    padding: 12px 16px;
  }

  .navbar-title {
    font-size: 16px;
  }

  .nav-buttons {
    gap: 8px;
  }

  .nav-button {
    padding: 8px 12px;
    font-size: 12px;
  }

  /* Hero Section */
  .home-hero {
    padding: 16px 12px;
    max-width: 100%;
  }

  .home-title {
    font-size: 24px;
    margin-bottom: 12px;
  }

  .home-subtitle {
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
  }

  /* Logo Container */
  .home-logo-big {
    max-width: 280px;
    min-height: 150px;
    margin: 0 auto 16px;
    padding: 12px;
  }

  /* Session Input Card */
  .session-input-card {
    padding: 16px;
    margin-bottom: 12px;
  }

  .session-input-label {
    font-size: 13px;
    margin-bottom: 8px;
  }

  .session-input-row {
    flex-direction: column;
    gap: 10px;
  }

  .session-input {
    font-size: 14px;
    padding: 12px;
  }

  .btn-enter {
    font-size: 14px;
    padding: 12px 20px;
    width: 100%;
  }

  .home-note {
    font-size: 11px;
  }

  .customTextContent {
    margin-top: 16px;
    padding: 0 12px;
    font-size: 13px;
  }

  /* Features Row */
  .features-row {
    padding: 12px 8px;
    flex-direction: row;
    gap: 8px;
    margin-top: 20px;
    max-width: 360px;
  }

  .feature-card {
    flex: 0 1 110px;
    padding: 10px 8px;
    border-radius: 10px;
  }

  .feature-icon {
    font-size: 18px;
    margin-bottom: 4px;
  }

  .feature-title {
    font-size: 11px;
  }

  .feature-desc {
    font-size: 9px;
  }

  .feature-card {
    padding: 16px;
    margin: 0;
  }

  .feature-icon {
    font-size: 32px;
    margin-bottom: 8px;
  }

  .feature-title {
    font-size: 14px;
    margin-bottom: 6px;
  }

  .feature-desc {
    font-size: 12px;
  }

  /* Choose Boxes */
  .choose-container {
    padding: 16px 12px;
  }

  .choose-title {
    font-size: 24px;
    margin-bottom: 16px;
  }

  .boxes-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 0 12px;
  }

  .box-card {
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 12px 10px;
  }

  .box-gift-icon {
    font-size: 42px;
    margin: 10px 0 14px;
  }

  .box-label {
    font-size: 11px;
    padding: 5px 10px;
  }

  .box-number {
    font-size: 14px;
  }

  .box-label {
    font-size: 12px;
    margin-top: 8px;
  }

  .box-click-hint {
    font-size: 11px;
  }

  /* Forms */
  .form-group {
    margin-bottom: 14px;
  }

  .form-label {
    font-size: 12px;
  }

  .form-input,
  .form-select,
  textarea {
    font-size: 14px !important;
    padding: 12px !important;
  }

  /* Buttons */
  .btn-primary,
  .btn-secondary,
  .btn-success,
  .btn-danger {
    padding: 12px 16px;
    font-size: 13px;
    border-radius: 12px;
  }

  /* Cards */
  .card {
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 12px;
  }

  /* Grid Layouts */
  .grid-2,
  .inventory-grid,
  .exchange-items {
    grid-template-columns: 1fr;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  /* Personal Info Form */
  .personal-form {
    max-width: 100%;
    padding: 16px 12px;
  }

  /* Modal */
  .modal {
    padding: 16px;
    border-radius: 16px;
    max-width: 90%;
    max-height: 85vh;
  }

  .modal-header {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .modal-card {
    padding: 16px;
    border-radius: 16px;
    max-width: 100%;
    max-height: 88vh;
  }

  .modal-title {
    font-size: 17px;
  }

  .modal-avail {
    margin-bottom: 14px;
    font-size: 12px;
  }

  .modal-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .btn-cancel,
  .btn-confirm-withdraw {
    width: 100%;
    min-height: 44px;
  }

  .modal-close {
    font-size: 20px;
    top: 10px;
    right: 10px;
  }

  /* Toast */
  #toast {
    bottom: 20px;
    left: 12px;
    right: 12px;
    padding: 12px 16px;
    font-size: 13px;
    transform: translateX(0) translateY(120px) !important;
    min-width: auto;
    max-width: none;
  }

  #toast.show {
    transform: translateX(0) translateY(0) !important;
  }

  .toast-text {
    min-width: auto;
    flex: 1;
  }

  /* Stats */
  .stat-value {
    font-size: 20px;
  }

  .stat-label {
    font-size: 11px;
  }

  /* Transactions */
  .tx-item {
    padding: 12px;
    gap: 10px;
  }

  .tx-name {
    font-size: 12px;
  }

  .tx-amount {
    font-size: 13px;
  }

  /* Navbar Wallet Amount */
  #navWalletAmount {
    font-size: 12px;
  }

  /* Online Visitors - Mobile */
  .online-visitors {
    padding: 10px 16px;
    font-size: 12px;
    margin-bottom: 24px;
  }

  .visitor-count {
    font-size: 14px;
  }
}

/* Small Phones (480px - 640px) */
@media (min-width: 480px) and (max-width: 640px) {
  .home-title {
    font-size: 28px;
  }

  .choose-title {
    font-size: 26px;
  }

  .home-logo-big {
    max-width: 300px;
    min-height: 160px;
  }

  .session-input-row {
    flex-direction: row;
    gap: 8px;
  }

  .session-input {
    flex: 1;
  }

  .btn-enter {
    width: auto;
    min-width: 120px;
  }

  .features-row {
    flex-direction: row;
    gap: 10px;
    margin-top: 24px;
    max-width: 420px;
  }

  .feature-card {
    flex: 0 1 130px;
    padding: 11px 9px;
    border-radius: 11px;
  }

  .feature-icon {
    font-size: 19px;
    margin-bottom: 5px;
  }

  .feature-title {
    font-size: 11.5px;
  }

  .feature-desc {
    font-size: 9.5px;
  }

  .boxes-grid {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  .box-card {
    width: calc(50% - 8px);
    max-width: 160px;
  }

  .inventory-grid,
  .exchange-items {
    grid-template-columns: repeat(2, 1fr);
  }

  .session-input-card {
    max-width: 100%;
  }
}

/* Tablets (641px - 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
  .home-hero {
    max-width: 100%;
    padding: 24px;
  }

  .home-logo-big {
    max-width: 320px;
    min-height: 180px;
  }

  .boxes-grid {
    flex-direction: row;
    justify-content: center;
    gap: 20px;
  }

  .box-card {
    width: calc(33.333% - 14px);
    max-width: 200px;
  }

  .inventory-grid,
  .exchange-items {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .choose-title {
    font-size: 32px;
  }

  .session-input-row {
    flex-direction: row;
  }

  .btn-enter {
    width: auto;
  }

  /* Modal on Tablets */
  .modal {
    max-width: 600px;
    max-height: 90vh;
  }
}

/* Desktops (1025px and above) */
@media (min-width: 1025px) {
  .home-logo-big {
    max-width: 350px;
    min-height: 200px;
  }

  .boxes-grid {
    flex-direction: row;
    justify-content: center;
    gap: 24px;
  }

  .box-card {
    width: auto;
    max-width: 250px;
  }

  .inventory-grid,
  .exchange-items {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal {
    max-width: 700px;
  }

  .session-input-card {
    max-width: 100%;
  }
}

/* Extra Large Screens (1440px and above) */
@media (min-width: 1440px) {
  .container,
  .home-hero {
    max-width: 1200px;
    margin: 0 auto;
  }

  .home-logo-big {
    max-width: 400px;
    min-height: 220px;
  }

  .boxes-grid {
    gap: 32px;
  }

  .box-card {
    max-width: 300px;
  }

  .inventory-grid,
  .exchange-items {
    grid-template-columns: repeat(4, 1fr);
  }

  .choose-title {
    font-size: 40px;
  }
}

/* Landscape Orientation Fixes */
@media (orientation: landscape) and (max-height: 600px) {
  .navbar {
    padding: 8px 12px;
  }

  .home-hero {
    padding: 12px;
  }

  .home-logo-big {
    max-width: 150px;
    min-height: 100px;
    margin: 0 auto 12px;
  }

  .home-title {
    font-size: 20px;
  }

  .session-input-card {
    padding: 12px;
  }

  .features-row {
    gap: 8px;
  }

  .feature-card {
    padding: 8px;
  }
}

/* ===== PREMIUM MOBILE OPTIMIZATION ===== */

/* Mobile Safe Areas & Notch Support */
@media (max-width: 640px) {
  body {
    padding-left: max(0px, env(safe-area-inset-left));
    padding-right: max(0px, env(safe-area-inset-right));
    padding-bottom: max(0px, env(safe-area-inset-bottom));
  }

  .navbar {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .page {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
}

/* Mobile Touch Optimization - Improved */
@media (hover: none) and (pointer: coarse) {
  /* Disable transform on active for better performance */
  * {
    -webkit-tap-highlight-color: rgba(168, 85, 247, 0.2);
    touch-action: manipulation;
  }

  /* Larger touch targets (minimum 48px as per WCAG) */
  button,
  a,
  input,
  select,
  textarea,
  .btn-primary,
  .btn-enter,
  .btn-secondary,
  .session-input,
  .box-card,
  .feature-card {
    min-height: 48px;
    min-width: 48px;
    -webkit-user-select: none;
    user-select: none;
  }

  /* Better spacing for touch interactions */
  button,
  .btn-primary,
  .btn-enter {
    padding: 14px 24px !important;
    font-size: 15px;
  }

  input,
  select,
  textarea {
    padding: 16px !important;
    font-size: 16px !important; /* Prevents iOS zoom */
    border-radius: 12px !important;
    border-width: 2px !important;
  }

  input:focus,
  select:focus,
  textarea:focus {
    outline: 2px solid var(--purple-light);
    outline-offset: 2px;
  }

  /* Better card spacing */
  .card,
  .feature-card,
  .box-card,
  .stat-card {
    margin-bottom: 16px;
    padding: 18px;
  }

  /* Remove hover effects, use active states instead */
  .box-card:hover {
    transform: none;
  }

  .box-card:active {
    transform: scale(0.98);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
  }

  .feature-card:hover {
    transform: none;
  }

  .feature-card:active {
    background: rgba(124, 58, 237, 0.1);
  }

  /* Better modal handling on mobile */
  .modal,
  .overlay {
    animation: slideUpMobile 0.3s ease-out;
  }

  @keyframes slideUpMobile {
    from {
      transform: translateY(100%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  /* Better keyboard handling */
  input:focus,
  textarea:focus {
    scroll-margin-top: 100px;
  }

  /* Improved label visibility */
  label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text);
  }

  /* Better form input spacing */
  .form-group {
    margin-bottom: 20px;
  }

  .form-input,
  .form-select {
    width: 100%;
    display: block;
  }
}

/* Small Mobile - Specific (< 360px) */
@media (max-width: 359px) {
  html {
    font-size: 13px;
  }

  .navbar {
    padding: 10px 12px;
    height: auto;
  }

  .navbar-title {
    font-size: 14px;
  }

  .page {
    padding-top: 10px;
  }

  .home-hero {
    padding: 12px;
  }

  .home-logo-big {
    max-width: 240px;
    min-height: 130px;
  }

  .session-input-card {
    padding: 12px;
  }

  .session-input {
    padding: 10px !important;
    font-size: 14px !important;
  }

  .btn-enter {
    width: 100%;
    padding: 10px 16px !important;
  }

  .features-row {
    flex-direction: column;
    gap: 10px;
  }

  .feature-card {
    padding: 12px;
  }

  .feature-icon {
    font-size: 28px;
  }

  .feature-title {
    font-size: 12px;
  }

  .feature-desc {
    font-size: 11px;
  }
}

/* Medium Mobile (360px - 480px) - Better Spread */
@media (min-width: 360px) and (max-width: 480px) {
  .session-input-row {
    flex-direction: row;
    gap: 8px;
  }

  .session-input {
    flex: 1;
    padding: 12px !important;
  }

  .btn-enter {
    width: auto;
    padding: 12px 18px !important;
  }

  .features-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .feature-card:nth-child(3) {
    grid-column: 1 / -1;
  }

  .boxes-grid {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 0 12px;
  }

  .box-card {
    width: 110px;
    height: 110px;
    padding: 12px 10px;
  }

  .inventory-grid,
  .exchange-items {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-card {
    padding: 14px;
  }

  .stat-value {
    font-size: 22px;
  }

  .stat-label {
    font-size: 11px;
  }
}

/* Improved Navbar for Mobile */
@media (max-width: 768px) {
  .navbar {
    background: rgba(10, 8, 24, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(124, 58, 237, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .navbar-title {
    flex: 1;
    text-align: center;
  }

  .nav-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
  }

  .nav-button {
    padding: 10px 14px;
    font-size: 12px;
    border-radius: 20px;
    transition: all 0.2s;
  }

  .nav-button:active {
    background: rgba(124, 58, 237, 0.3);
  }
}

/* Modal Optimization for Mobile */
@media (max-width: 640px) {
  .modal,
  .modal-wrap,
  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
    margin: 0;
  }

  .modal-header {
    position: sticky;
    top: 0;
    background: rgba(10, 8, 24, 0.95);
    backdrop-filter: blur(10px);
    padding: 14px;
    border-bottom: 1px solid var(--border);
    z-index: 10;
  }

  .modal-body {
    padding: 16px;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }

  .modal-body::-webkit-scrollbar {
    display: none;
  }

  .modal-footer {
    position: sticky;
    bottom: 0;
    background: rgba(10, 8, 24, 0.95);
    backdrop-filter: blur(10px);
    padding: 14px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    flex-direction: column;
  }

  .modal-footer button {
    width: 100%;
    padding: 14px !important;
  }
}

/* Form Optimization for Mobile */
@media (max-width: 640px) {
  .form-group {
    margin-bottom: 18px;
  }

  .form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
  }

  .form-input,
  .form-select,
  textarea {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text);
    font-family: inherit;
  }

  .form-input:focus,
  .form-select:focus,
  textarea:focus {
    border-color: var(--purple-light);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
    outline: none;
  }

  textarea {
    resize: vertical;
    min-height: 100px;
  }

  .input-error {
    border-color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.1);
  }

  .input-success {
    border-color: #22c55e !important;
    background: rgba(34, 197, 94, 0.1);
  }
}

/* Table Optimization for Mobile */
@media (max-width: 768px) {
  table {
    font-size: 12px;
  }

  table thead {
    display: none;
  }

  table tr {
    display: block;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 12px;
    background: var(--card);
  }

  table td {
    display: block;
    padding: 10px 0;
    border: none;
  }

  table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--purple-light);
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    text-transform: uppercase;
  }

  /* Alternative: Horizontal scroll for small screens */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-responsive table {
    min-width: 400px;
  }
}

/* Image Optimization */
@media (max-width: 640px) {
  img {
    max-width: 100%;
    height: auto;
  }

  .home-logo-big img,
  .logo-preview img {
    max-width: 100%;
    height: auto;
  }

  /* Responsive video/iframe */
  iframe,
  video {
    max-width: 100%;
    height: auto;
  }
}

/* Toast & Notification Mobile */
@media (max-width: 640px) {
  #toast {
    bottom: 20px;
    left: 16px;
    right: 16px;
    width: auto;
    margin: 0;
    padding: 14px 16px;
    font-size: 14px;
    border-radius: 12px;
  }

  /* Wider notification area */
  .win-noti {
    max-width: calc(100% - 32px);
    margin: 0 16px;
  }
}

/* Bottom Sheet Support */
@media (max-width: 640px) {
  .bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 90vh;
    border-radius: 20px 20px 0 0;
    background: var(--card);
    border-top: 1px solid var(--border);
    animation: slideUp 0.3s ease-out;
    z-index: 500;
  }

  .bottom-sheet-handle {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 12px auto;
  }

  @keyframes slideUp {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }
}

/* Improved Grid for Mobile */
@media (max-width: 640px) {
  .grid-2,
  .grid-3,
  .inventory-grid,
  .exchange-items {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .boxes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: center;
    align-items: start;
    gap: 14px;
    padding: 0 12px;
  }

  .box-card {
    width: min(160px, 42vw);
    aspect-ratio: 1 / 1;
  }

  .box-card:nth-child(odd) {
    justify-self: start;
  }

  .box-card:nth-child(even) {
    justify-self: end;
  }

  /* Two column on medium mobile */
  @media (min-width: 400px) {
    .grid-2,
    .inventory-grid,
    .exchange-items {
      grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
      grid-template-columns: repeat(2, 1fr);
    }
  }
}

/* Loading & Skeleton States */
@media (max-width: 640px) {
  .skeleton {
    background: linear-gradient(
      90deg,
      rgba(124, 58, 237, 0.1) 25%,
      rgba(124, 58, 237, 0.2) 50%,
      rgba(124, 58, 237, 0.1) 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
  }

  @keyframes loading {
    0% {
      background-position: 200% 0;
    }
    100% {
      background-position: -200% 0;
    }
  }
}

/* Accessibility Improvements */
@media (max-width: 640px) {
  /* Larger text for better readability */
  body {
    line-height: 1.6;
    letter-spacing: 0.3px;
  }

  h1 {
    font-size: 24px;
    line-height: 1.3;
  }

  h2 {
    font-size: 20px;
    line-height: 1.3;
  }

  h3 {
    font-size: 16px;
  }

  p {
    font-size: 14px;
    line-height: 1.6;
  }

  /* Better color contrast for mobile */
  .text-dim {
    color: #a8a2b8 !important;
  }

  /* Focus indicators for accessibility */
  :focus-visible {
    outline: 3px solid var(--purple-light);
    outline-offset: 2px;
  }
}

/* Hardware Keyboard Handling */
@media (max-width: 640px) {
  /* Hide on-screen keyboard when hardware keyboard present */
  @media (max-height: 500px) {
    input,
    textarea {
      padding: 10px 12px !important;
      font-size: 14px !important;
    }

    .modal,
    .overlay {
      max-height: 80vh;
    }
  }
}

/* ============================================================================
   MOBILE NAVBAR RESPONSIVE PATCH - HAMBURGER MENU SYSTEM
   ============================================================================ */

/* Default: Desktop (>= 768px) - Show buttons, hide hamburger */
.navbar-hamburger {
  display: none;
}

.navbar-mobile-menu {
  display: none;
}

.nav-right .nav-icon-btn {
  display: flex;
}

/* Mobile (< 768px) - Hide buttons, show hamburger menu */
@media (max-width: 767px) {
  /* Hide all desktop icon buttons */
  .nav-right .nav-icon-btn {
    display: none;
  }

  /* Show hamburger button - VISIBLE ON MOBILE */
  .navbar-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    margin: 0 0 0 auto;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    z-index: 2001;
    position: relative;
  }

  .navbar-hamburger:active {
    transform: scale(0.95);
  }

  /* SVG hamburger icon - styled for visibility */
  .navbar-hamburger svg {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    stroke: #f1f5f9;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.3));
  }

  /* Hamburger rotation on active */
  .navbar-hamburger.active svg {
    transform: rotate(90deg);
  }

  /* Hide middle line when menu open */
  .navbar-hamburger.active .line-2 {
    opacity: 0;
    transition: opacity 0.2s ease 0.1s;
  }

  /* Mobile menu overlay - slide from right */
  .navbar-mobile-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    width: 100%;
    height: calc(100vh - 64px);
    background: rgba(10, 8, 24, 0.97);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    z-index: 1999;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    overscroll-behavior: contain;
  }

  .navbar-mobile-menu::-webkit-scrollbar {
    display: none;
  }

  /* Show mobile menu when active */
  .navbar-mobile-menu.active {
    transform: translateX(0);
  }

  /* Mobile menu items */
  .mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 16px 24px;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    text-align: left;
  }

  .mobile-menu-item:hover {
    background: rgba(124, 58, 237, 0.15);
    color: var(--accent);
  }

  .mobile-menu-item:active {
    background: rgba(124, 58, 237, 0.25);
  }

  .mobile-menu-item svg {
    flex-shrink: 0;
  }

  /* Hide badges on mobile */
  .nav-left .session-badge,
  .nav-left .online-badge {
    display: none;
  }

  /* Reduce navbar height on mobile */
  .navbar {
    height: 56px;
    padding: 0 16px;
  }

  .nav-logo {
    font-size: 16px;
  }

  .nav-logo svg {
    width: 20px;
    height: 20px;
  }
}

/* Mobile choose boxes refresh */
@media (max-width: 640px) {
  #page-choose {
    padding: 70px 14px 32px;
  }

  .choose-header {
    padding: 32px 0 22px;
  }

  .choose-title {
    font-size: 24px;
    margin-bottom: 10px;
  }

  .choose-subtitle {
    font-size: 13px;
  }

  .boxes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 0 10px;
    justify-items: center;
  }

  .box-card {
    width: 100%;
    max-width: 176px;
    padding: 16px 12px 18px;
    border-radius: 18px;
    background: linear-gradient(160deg, #1c1a3c 0%, #0f0c24 100%);
    border: 1px solid rgba(124, 58, 237, 0.45);
    box-shadow: 0 14px 28px rgba(6, 182, 212, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  }

  .box-card:nth-child(3) {
    grid-column: 1 / -1;
    justify-self: center;
    width: min(200px, 60vw);
  }

  .box-gift-icon {
    font-size: 48px;
    margin: 8px 0 6px;
  }

  .box-label {
    font-size: 12px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.45);
    margin-top: 6px;
  }

  .box-status {
    font-size: 11px;
  }

  .box-sparkle {
    top: 10px;
    right: 10px;
  }

  .box-sparkle-bl {
    bottom: 10px;
    left: 10px;
  }

  .choose-tip {
    font-size: 12px;
    margin-top: 24px;
  }
}
