*, *::before, *::after { box-sizing: border-box; }

/* === LIQUID GLASS DESIGN SYSTEM === */
.bg-grid-pattern {
  background-size: 32px 32px;
  background-image: radial-gradient(circle, rgba(255,255,255,0.012) 1px, transparent 1px);
}

/* Enhanced Glassmorphism */
.glass-mica {
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  background: rgba(18, 18, 18, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.glass-card {
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:active {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
}

/* Ambient Background Blurs (Mesh Gradients) */
.blur-orb {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.4;
  pointer-events: none;
}

.nav-pill {
  background: rgba(25, 25, 25, 0.65);
  backdrop-filter: blur(32px) saturate(150%);
  -webkit-backdrop-filter: blur(32px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0.5px 0 rgba(255, 255, 255, 0.2), 0 10px 40px rgba(0, 0, 0, 0.5);
}

.btn-ios {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.btn-ios:active {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(0.98);
}

/* Redefining old card-acrylic class to use glass-card styles */
.card-acrylic {
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-acrylic:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
}

.card-acrylic-accent {
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.1), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(0, 122, 255, 0.25);
  box-shadow: 0 8px 32px rgba(0, 122, 255, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Subtle Typography Effects */
.text-3d { text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.text-neon-cyan { text-shadow: 0 0 20px rgba(0, 122, 255, 0.25); }
.text-neon-purple { text-shadow: 0 0 20px rgba(162, 162, 162, 0.25); }

/* Buttons - Liquid Glass */
.btn-game {
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.95), rgba(0, 100, 220, 0.95));
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.btn-game:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 122, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.btn-game:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.15);
}

.btn-game-purple {
  background: linear-gradient(135deg, rgba(162, 162, 162, 0.2), rgba(255, 255, 255, 0.05));
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.btn-game-purple:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.btn-game-purple:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Choice Buttons */
.choice-btn-pad {
  background: rgba(255,255,255,0.018);
  border: 1px solid rgba(255,255,255,0.05);
  backdrop-filter: blur(8px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.choice-btn-pad:hover {
  background: rgba(0, 122, 255, 0.05);
  border-color: rgba(0, 122, 255, 0.2);
  box-shadow: 0 4px 16px rgba(0, 122, 255, 0.08);
  transform: translateY(-2px);
}
.choice-btn-pad:active { transform: translateY(0px) scale(0.98); }

/* Animations */
@keyframes fast-pulse {
  0%, 100% { transform: scale(1); opacity: 1; text-shadow: 0 0 10px rgba(239,68,68,0.8); }
  50% { transform: scale(1.08); opacity: 0.8; text-shadow: 0 0 20px rgba(239,68,68,1); }
}
.animate-fast-pulse { animation: fast-pulse 0.6s infinite ease-in-out; }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-slide-in { animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.animate-fade-in { animation: fadeIn 0.2s ease-out forwards; }

/* Shimmer */
.shimmer-hover { position: relative; overflow: hidden; }
.shimmer-hover::after {
  content: '';
  position: absolute;
  top: 0; left: -150%;
  width: 50%; height: 100%;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.03), transparent);
  transform: skewX(-25deg);
  transition: 0.8s;
}
.shimmer-hover:hover::after { left: 150%; }

/* Scrollbar */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* Game Card */
.game-card { transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1); }
.game-card:hover { transform: translateY(-3px); }
.game-card:active { transform: translateY(0px) scale(0.98); }

/* Focus Styles */
input:focus, select:focus {
  outline: none;
  border-color: rgba(0, 122, 255, 0.4) !important;
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.08);
}

/* Section Label */
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-bottom: 10px;
  border-bottom: 1px solid;
  margin-bottom: 4px;
}

/* Virtual Fullscreen fallback for iOS Safari */
body.virtual-fullscreen header {
  display: none !important;
}
body.virtual-fullscreen nav {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  height: 0 !important;
  padding: 0 !important;
  pointer-events: none !important;
}
body.virtual-fullscreen nav button:not(#tab-fullscreen) {
  display: none !important;
}
body.virtual-fullscreen main {
  padding-top: env(safe-area-inset-top, 16px) !important;
  padding-bottom: env(safe-area-inset-bottom, 16px) !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  overflow-y: auto !important;
}
body.virtual-fullscreen #tab-fullscreen {
  position: fixed !important;
  top: calc(env(safe-area-inset-top, 16px) + 8px) !important;
  right: calc(env(safe-area-inset-right, 16px) + 8px) !important;
  z-index: 100001 !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 9999px !important;
  background: rgba(0, 0, 0, 0.55) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: rgba(255, 255, 255, 0.8) !important;
  pointer-events: auto !important;
}
body.virtual-fullscreen #tab-fullscreen span:not(.material-symbols-outlined) {
  display: none !important;
}
body:has(#whoami-fullscreen-overlay) #tab-fullscreen {
  display: none !important;
}
