/* ==========================================================================
   GIGIZA GAMING ECOSYSTEM DESIGN SYSTEM
   Theme: Cyberpunk Premium Neon Glassmorphism
   Target: 60 FPS mobile-first portrait layouts
   ========================================================================== */

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

:root {
  --font-main: 'Outfit', sans-serif;
  
  /* Next-Gen Cyber/Gaming Color Palette */
  --bg-dark: #080B14;
  --bg-dark-accent: #0e1224;
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: rgba(0, 0, 0, 0.65);
  
  /* Cyber Gaming Theme Tokens */
  --accent: #6C63FF;
  --secondary-accent: #00E5FF;
  --highlight: #FF4FD8;
  
  /* Neon Accents Map */
  --neon-cyan: #00E5FF;
  --neon-pink: #FF4FD8;
  --neon-purple: #6C63FF;
  --neon-yellow: #FFD23F;
  --neon-green: #00E676;
  
  /* Text Base */
  --text-primary: #ffffff;
  --text-secondary: #a2a8cc;
  --text-muted: #62698f;
  
  /* UI Constants */
  --border-radius-sm: 12px;
  --border-radius-md: 20px;
  --border-radius-lg: 32px;
  
  --transition-fast: 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-normal: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset & Setup */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Mobile-First Portrait Frame Viewport Wrapper */
#app-shell {
  position: relative;
  width: 100%;
  max-width: 480px; /* limits desktop dimensions */
  height: 100%;
  max-height: 920px;
  background: radial-gradient(circle at 50% 0%, var(--bg-dark-accent) 0%, var(--bg-dark) 100%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}
::-webkit-scrollbar-thumb {
  background: var(--neon-purple);
  border-radius: 10px;
}

/* Neon Text Glow Helpers */
.neon-text-cyan { text-shadow: 0 0 10px rgba(0, 240, 255, 0.6); color: var(--neon-cyan); }
.neon-text-pink { text-shadow: 0 0 10px rgba(255, 0, 127, 0.6); color: var(--neon-pink); }
.neon-text-purple { text-shadow: 0 0 10px rgba(157, 0, 255, 0.6); color: var(--neon-purple); }
.neon-text-yellow { text-shadow: 0 0 10px rgba(255, 223, 0, 0.6); color: var(--neon-yellow); }
.neon-text-green { text-shadow: 0 0 10px rgba(57, 255, 20, 0.6); color: var(--neon-green); }

.glow-btn {
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
  color: white;
  border: none;
  font-weight: 800;
  text-transform: uppercase;
  border-radius: var(--border-radius-md);
  box-shadow: 0 4px 15px rgba(255, 0, 127, 0.4);
  cursor: pointer;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.glow-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(255, 0, 127, 0.6);
}
.glow-btn:active {
  transform: translateY(1px);
}

.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 15px 35px var(--glass-shadow);
  border-radius: var(--border-radius-md);
}

/* Screen Shell Controllers */
.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.04);
  transition: opacity var(--transition-normal), transform var(--transition-normal);
  z-index: 10;
}
.screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

/* Splash Loading Screen */
#screen-splash {
  justify-content: center;
  align-items: center;
  gap: 20px;
  background: radial-gradient(circle at 50% 40%, rgba(157, 0, 255, 0.15) 0%, var(--bg-dark) 80%);
}
.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.logo-title {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: 4px;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fff 30%, var(--neon-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 15px rgba(0, 240, 255, 0.5));
}
.logo-sub {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 6px;
  color: var(--neon-pink);
  font-weight: 600;
  text-shadow: 0 0 8px rgba(255, 0, 127, 0.4);
}
.loading-bar-wrapper {
  width: 70%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.loading-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple), var(--neon-pink));
  box-shadow: 0 0 10px var(--neon-cyan);
  transition: width 0.1s linear;
}

/* Header HUD Bar */
.hud-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  height: 70px;
  border-bottom: 1px solid var(--glass-border);
  background: rgba(7, 9, 19, 0.8);
  backdrop-filter: blur(12px);
  z-index: 50;
}
.hud-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.hud-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--neon-cyan), var(--neon-purple));
  border: 2px solid #fff;
  box-shadow: 0 0 8px var(--neon-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: white;
  font-size: 0.9rem;
}
.hud-level-info {
  display: flex;
  flex-direction: column;
}
.hud-username {
  font-size: 0.9rem;
  font-weight: 600;
}
.hud-xp-bar {
  width: 70px;
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 3px;
}
.hud-xp-fill {
  width: 40%;
  height: 100%;
  background: var(--neon-cyan);
}

.hud-currencies {
  display: flex;
  gap: 10px;
}
.currency-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--border-radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  font-weight: 800;
}
.currency-badge.coins i { color: var(--neon-yellow); }
.currency-badge.gems i { color: var(--neon-cyan); }

/* View Container Scroll */
.screen-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Bottom Navigation */
.bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 75px;
  background: rgba(7, 9, 19, 0.92);
  border-top: 1px solid var(--glass-border);
  backdrop-filter: blur(15px);
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  flex: 1;
  height: 100%;
}
.nav-item i {
  font-size: 1.35rem;
  transition: transform var(--transition-fast);
}
.nav-item:hover, .nav-item.active {
  color: var(--neon-cyan);
}
.nav-item.active i {
  transform: translateY(-4px);
  color: var(--neon-cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.6);
}

/* Welcome Banners */
.welcome-banner {
  padding: 20px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(157, 0, 255, 0.25), rgba(255, 0, 127, 0.25));
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.welcome-text h2 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 3px;
}
.welcome-text p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.claim-daily-btn {
  padding: 8px 14px;
  font-size: 0.75rem;
  border-radius: var(--border-radius-sm);
  background: linear-gradient(135deg, var(--neon-yellow), #ff9f00);
  box-shadow: 0 0 10px rgba(255, 223, 0, 0.35);
  color: #000;
  font-weight: 800;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Grid layout for 6 Games */
.section-title {
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.games-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
}
.game-card {
  height: 185px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 15px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}
.game-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.75) 100%);
  z-index: 1;
}
.game-card:hover {
  transform: translateY(-5px);
  border-color: var(--neon-cyan);
  box-shadow: 0 10px 25px rgba(0, 240, 255, 0.25);
}
.game-icon-holder {
  font-size: 2.2rem;
  z-index: 2;
  transition: transform var(--transition-fast);
}
.game-card:hover .game-icon-holder {
  transform: scale(1.1) rotate(5deg);
}
.game-details {
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}
.game-title {
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
}
.game-meta {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* 7-Day Streak Calendar Grid Styles */
.streak-day-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-sm);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 800;
  transition: var(--transition-fast);
  position: relative;
}
.streak-day-box.active {
  background: rgba(255, 223, 0, 0.1);
  border-color: var(--neon-yellow);
  box-shadow: inset 0 0 10px rgba(255, 223, 0, 0.1);
}
.streak-day-box.claimed {
  background: rgba(57, 255, 20, 0.08);
  border-color: var(--neon-green);
  color: var(--neon-green);
}
.streak-day-box.claimed::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 4px; right: 4px;
  font-size: 0.55rem;
  color: var(--neon-green);
}
.streak-day-coins {
  font-size: 0.55rem;
  color: var(--text-secondary);
}
.streak-day-box.claimed .streak-day-coins {
  color: var(--neon-green);
}

/* Active Missions Progress cards */
.mission-progress-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius-sm);
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  text-align: left;
}
.mission-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mission-desc-txt {
  font-size: 0.8rem;
  font-weight: 800;
}
.mission-progress-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}
.mission-bar-bg {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  overflow: hidden;
}
.mission-bar-fill {
  height: 100%;
  background: var(--neon-pink);
  border-radius: 4px;
}
.mission-ratio-txt {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--text-secondary);
  min-width: 35px;
  text-align: right;
}

/* Profile screen large icons */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 15px;
}
.profile-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--neon-pink), var(--neon-purple));
  border: 3px solid #fff;
  box-shadow: 0 0 15px var(--neon-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 800;
  color: white;
}
.profile-name {
  font-size: 1.4rem;
  font-weight: 800;
  text-transform: uppercase;
}
.profile-level-badge {
  background: rgba(0, 240, 255, 0.15);
  border: 1px solid var(--neon-cyan);
  padding: 3px 12px;
  border-radius: var(--border-radius-sm);
  color: var(--neon-cyan);
  font-size: 0.75rem;
  font-weight: 800;
}
.stats-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.stat-box {
  padding: 12px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-val {
  font-size: 1.15rem;
  font-weight: 800;
}
.stat-label {
  font-size: 0.65rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}
.achievements-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.achievement-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px;
  text-align: left;
}
.achievement-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--border-radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.achievement-row.unlocked .achievement-icon {
  background: rgba(57, 255, 20, 0.15);
  border-color: var(--neon-green);
  color: var(--neon-green);
  box-shadow: 0 0 10px rgba(57, 255, 20, 0.2);
}
.achievement-details {
  flex: 1;
}
.achievement-title {
  font-size: 0.85rem;
  font-weight: 800;
}
.achievement-desc {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

/* Rewards screen layouts */
.rewards-hero {
  padding: 20px;
  background: radial-gradient(circle at 100% 100%, rgba(255, 223, 0, 0.15) 0%, rgba(7, 9, 19, 0) 100%), linear-gradient(135deg, rgba(15, 18, 37, 0.9), rgba(7, 9, 19, 0.9));
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.daily-spin-btn {
  padding: 12px 25px;
  font-size: 0.9rem;
}
.reward-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.reward-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-radius: var(--border-radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.reward-item.claimable {
  background: linear-gradient(90deg, rgba(157, 0, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-color: var(--neon-purple);
}
.reward-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.reward-icon {
  font-size: 1.6rem;
  color: var(--neon-yellow);
}
.reward-text-title {
  font-size: 0.85rem;
  font-weight: 800;
}
.reward-subtext {
  font-size: 0.7rem;
  color: var(--text-secondary);
}
.claim-btn {
  padding: 6px 12px;
  font-size: 0.7rem;
  border-radius: var(--border-radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: none;
  font-weight: 800;
  cursor: pointer;
}
.claim-btn.claimable, .claimable .claim-btn {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
  color: white;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

/* Competitive Ranks Leaderboard Tabs */
.leaderboard-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--border-radius-sm);
  padding: 3px;
}
.leaderboard-tab {
  flex: 1;
  padding: 8px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  border-radius: var(--border-radius-sm);
  color: var(--text-secondary);
}
.leaderboard-tab.active {
  background: var(--neon-purple);
  color: white;
  box-shadow: 0 0 8px rgba(157, 0, 255, 0.5);
}
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  text-align: left;
}
.leaderboard-rank {
  font-size: 1rem;
  font-weight: 800;
  width: 25px;
  text-align: center;
}
.leaderboard-row:nth-child(1) .leaderboard-rank { color: var(--neon-yellow); }
.leaderboard-row:nth-child(2) .leaderboard-rank { color: #c0c0c0; }
.leaderboard-row:nth-child(3) .leaderboard-rank { color: #cd7f32; }
.leaderboard-row.my-score {
  border-color: var(--neon-cyan);
  background: rgba(0, 240, 255, 0.04);
}
.leaderboard-row.my-score .leaderboard-rank {
  color: var(--neon-cyan);
}
.leaderboard-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
}
.leaderboard-username {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 600;
}
.leaderboard-score {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--neon-cyan);
}

/* Settings lists */
.settings-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
}
.settings-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}
.settings-label {
  font-size: 0.9rem;
  font-weight: 800;
}
.settings-desc {
  font-size: 0.7rem;
  color: var(--text-secondary);
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: .3s;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}
input:checked + .toggle-slider {
  background-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}
input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

/* Overlays Modal systems */
.modal-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(5, 6, 12, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-content {
  width: 85%;
  max-width: 380px;
  padding: 25px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transform: scale(0.9);
  transition: transform var(--transition-fast);
}
.modal-overlay.active .modal-content {
  transform: scale(1);
}
.modal-icon {
  font-size: 3rem;
}
.modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  text-transform: uppercase;
}
.modal-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Spinning Daily Wheel */
.wheel-spinner {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 4px solid var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.4);
  position: relative;
  overflow: hidden;
  margin: 10px auto;
  background: conic-gradient(
    var(--neon-purple) 0deg 60deg,
    var(--neon-pink) 60deg 120deg,
    var(--neon-cyan) 120deg 180deg,
    var(--neon-yellow) 180deg 240deg,
    var(--bg-dark-accent) 240deg 300deg,
    var(--neon-purple) 300deg 360deg
  );
  transition: transform 3s cubic-bezier(0.1, 0.8, 0.1, 1);
}
.wheel-spinner::after {
  content: '✦';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  width: 30px; height: 30px;
  border-radius: 50%;
  color: var(--bg-dark);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}
.wheel-pointer {
  width: 0; height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 20px solid var(--neon-pink);
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  filter: drop-shadow(0 0 5px var(--neon-pink));
}

/* Active running game HUD overlay viewport container */
#screen-game {
  background: #000;
  z-index: 80;
}
#game-canvas-container {
  width: 100%;
  height: 100%;
  position: relative;
}
.game-hud {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 90;
  pointer-events: none;
}
.game-hud-score {
  font-size: 1.5rem;
  font-weight: 800;
  text-shadow: 0 2px 5px rgba(0,0,0,0.8);
  pointer-events: auto;
}
.game-hud-controls {
  display: flex;
  gap: 10px;
  pointer-events: auto;
}
.game-hud-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: transform var(--transition-fast);
}
.game-hud-btn:active {
  transform: scale(0.9);
}

/* Interactive Tutorials slow-motion hand vectors styling */
.tutorial-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 92;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px;
  text-align: center;
  color: white;
}
.tutorial-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  animation: pulse-glow-juice 1.5s infinite;
}
.tutorial-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.tutorial-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
  line-height: 1.5;
}

/* Keyframes animations */
@keyframes pulse-glow-juice {
  0% { transform: scale(1); filter: drop-shadow(0 0 5px var(--neon-cyan)); }
  50% { transform: scale(1.08); filter: drop-shadow(0 0 15px var(--neon-cyan)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 5px var(--neon-cyan)); }
}

/* Fullscreen Ad Screen mockup overlay */
.ad-overlay-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px;
  color: white;
}
.ad-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ad-timer {
  background: rgba(255, 255, 255, 0.1);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 800;
}
.ad-video-frame {
  flex: 1;
  margin: 30px 0;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--neon-cyan);
  background: #000;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  box-shadow: inset 0 0 40px rgba(0, 240, 255, 0.2);
}
.ad-sponsor-logo {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: var(--neon-cyan);
}
.ad-sponsor-name {
  font-size: 1.2rem;
  font-weight: 800;
  text-transform: uppercase;
}
.ad-action-btn {
  margin-top: 15px;
  padding: 10px 20px;
  font-size: 0.8rem;
}
.ad-footer-status {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.particle-boom {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  animation: boom 0.6s ease-out forwards;
}

@keyframes boom {
  0% { transform: scale(0); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

/* ==========================================================================
   NEXT-GENERATION GAMES PAGE REDESIGN STYLES
   ========================================================================== */

/* 3D Headings & Typography */
.text-3d-glowing {
  font-family: var(--font-main);
  font-weight: 800;
  font-size: 2.1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #ffffff 10%, var(--neon-cyan) 55%, var(--neon-pink) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.4));
  text-shadow: 
    0 1px 0 rgba(108, 99, 255, 0.4),
    0 2px 0 rgba(8, 11, 20, 0.8),
    0 3px 8px rgba(0, 0, 0, 0.8);
  animation: textShadowPulse 3s infinite alternate;
  line-height: 1.1;
  z-index: 2;
  position: relative;
}

@keyframes textShadowPulse {
  from {
    filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.4));
  }
  to {
    filter: drop-shadow(0 0 20px rgba(255, 79, 216, 0.6));
  }
}

/* Hero Section */
.hero-section-next {
  position: relative;
  padding: 35px 20px;
  margin: -20px -20px 15px -20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: radial-gradient(circle at 50% 40%, rgba(108, 99, 255, 0.18) 0%, rgba(8, 11, 20, 0) 80%);
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  min-height: 180px;
  justify-content: center;
}

.hero-particle-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

.hero-particle {
  position: absolute;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.3) 0%, rgba(0,0,0,0) 70%);
  border-radius: 50%;
  animation: floatUp 10s infinite linear;
}
.hero-particle:nth-child(1) { width: 100px; height: 100px; left: 10%; animation-duration: 12s; animation-delay: 0s; }
.hero-particle:nth-child(2) { width: 150px; height: 150px; left: 65%; animation-duration: 16s; animation-delay: -3s; }
.hero-particle:nth-child(3) { width: 70px; height: 70px; left: 35%; animation-duration: 9s; animation-delay: -5s; }
.hero-particle:nth-child(4) { width: 110px; height: 110px; left: 80%; animation-duration: 14s; animation-delay: -2s; }

@keyframes floatUp {
  0% { transform: translateY(120%) scale(0.7); opacity: 0; }
  10% { opacity: 0.4; }
  90% { opacity: 0.4; }
  100% { transform: translateY(-120%) scale(1.2); opacity: 0; }
}

.hero-ctas-next {
  display: flex;
  gap: 12px;
  width: 100%;
  max-width: 320px;
  z-index: 2;
}

.hero-btn-primary {
  flex: 1;
  padding: 12px 15px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  border-radius: var(--border-radius-sm);
  border: none;
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-pink));
  color: #fff;
  box-shadow: 0 4px 15px rgba(108, 99, 255, 0.4);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  letter-spacing: 0.5px;
}
.hero-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 79, 216, 0.6);
}
.hero-btn-primary:active {
  transform: translateY(1px);
}

.hero-btn-secondary {
  flex: 1;
  padding: 12px 15px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  letter-spacing: 0.5px;
}
.hero-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* Statistics counters */
.stats-grid-next {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 5px;
}

.stat-card-next {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--border-radius-sm);
  padding: 12px 5px;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}
.stat-card-next::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(108, 99, 255, 0.08) 0%, transparent 65%);
  pointer-events: none;
}
.stat-card-next:hover {
  transform: translateY(-2px);
  border-color: var(--neon-cyan);
  box-shadow: 0 6px 20px rgba(0, 229, 255, 0.2);
}
.stat-card-number {
  font-size: 1.1rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff, var(--neon-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.stat-card-label {
  font-size: 0.6rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 3px;
}

/* Featured Carousel */
.featured-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 5px;
}

.carousel-container {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 10px 5px;
  scrollbar-width: none;
}
.carousel-container::-webkit-scrollbar {
  display: none;
}

.carousel-card {
  flex: 0 0 82%;
  scroll-snap-align: center;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  position: relative;
  height: 150px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: 0 8px 30px var(--glass-shadow);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 15px;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
  cursor: pointer;
}
.carousel-card:hover {
  transform: scale(1.02);
  border-color: var(--neon-pink);
  box-shadow: 0 10px 25px rgba(255, 79, 216, 0.3);
}

.carousel-card-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  z-index: 0;
  transition: transform var(--transition-normal);
}
.carousel-card:hover .carousel-card-bg {
  transform: scale(1.06);
}

.carousel-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to top, rgba(8, 11, 20, 0.95) 0%, rgba(8, 11, 20, 0.6) 45%, rgba(8, 11, 20, 0.1) 100%);
  z-index: 1;
}

.carousel-details {
  z-index: 2;
  position: relative;
  text-align: left;
}
.carousel-title {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
  letter-spacing: 0.5px;
}
.carousel-meta {
  font-size: 0.7rem;
  color: var(--neon-cyan);
  font-weight: 600;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Sticky Filter & Search Bar */
.sticky-filter-wrapper {
  position: sticky;
  top: 0;
  z-index: 45;
  background: rgba(8, 11, 20, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  margin: 0 -20px;
  padding: 15px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-box-wrapper {
  position: relative;
  width: 100%;
}
.search-input-next {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 15px 10px 42px;
  border-radius: var(--border-radius-sm);
  color: #fff;
  font-family: var(--font-main);
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
.search-input-next:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.2);
  background: rgba(255, 255, 255, 0.07);
}
.search-icon-next {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.category-chips-wrapper {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 3px;
  scrollbar-width: none;
}
.category-chips-wrapper::-webkit-scrollbar {
  display: none;
}

.category-chip-next {
  white-space: nowrap;
  padding: 7px 15px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}
.category-chip-next.active {
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 229, 255, 0.3);
  transform: translateY(-1px);
}

/* Redesigned Grid & Game Cards */
.games-grid-next {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 5px;
}

.game-card-next {
  position: relative;
  height: 205px;
  border-radius: var(--border-radius-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  box-shadow: 0 10px 25px var(--glass-shadow);
  transition: all var(--transition-normal);
  will-change: transform, box-shadow;
  perspective: 800px;
}

.game-card-thumbnail {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 55%;
  z-index: 0;
  overflow: hidden;
  transition: transform var(--transition-normal);
  background-size: cover;
  background-position: center;
}

/* Thematic Dynamic BG Gradients for thumbnails */
.thumb-skyDash { background: linear-gradient(135deg, rgba(0, 110, 255, 0.6), rgba(0, 229, 255, 0.6)); }
.thumb-stackTower { background: linear-gradient(135deg, rgba(255, 79, 216, 0.6), rgba(108, 99, 255, 0.6)); }
.thumb-colorSwitch { background: linear-gradient(135deg, rgba(157, 0, 255, 0.6), rgba(255, 79, 216, 0.6)); }
.thumb-trafficEscape { background: linear-gradient(135deg, rgba(57, 255, 20, 0.6), rgba(255, 210, 63, 0.6)); }
.thumb-bladeClash { background: linear-gradient(135deg, rgba(255, 210, 63, 0.6), rgba(255, 79, 216, 0.6)); }
.thumb-hoopStar { background: linear-gradient(135deg, #ff5500aa, rgba(255, 79, 216, 0.6)); }
.thumb-waveRider { background: linear-gradient(135deg, rgba(0, 229, 255, 0.6), rgba(108, 99, 255, 0.6)); }
.thumb-sliceNinja { background: linear-gradient(135deg, rgba(255, 79, 216, 0.6), rgba(157, 0, 255, 0.6)); }
.thumb-helixJump { background: linear-gradient(135deg, rgba(57, 255, 20, 0.6), rgba(108, 99, 255, 0.6)); }
.thumb-spaceDefender { background: linear-gradient(135deg, #ff4500aa, rgba(0, 229, 255, 0.6)); }
.thumb-brickBreaker { background: linear-gradient(135deg, rgba(255, 210, 63, 0.6), rgba(57, 255, 20, 0.6)); }
.thumb-tankBattle { background: linear-gradient(135deg, rgba(255, 79, 216, 0.6), rgba(157, 0, 255, 0.6)); }
.thumb-cyberCommando { background: linear-gradient(135deg, rgba(0, 229, 255, 0.6), rgba(108, 99, 255, 0.6)); }
.thumb-neonDrifter { background: linear-gradient(135deg, rgba(255, 210, 63, 0.6), rgba(157, 0, 255, 0.6)); }
.thumb-cyberSniper { background: linear-gradient(135deg, rgba(255, 79, 216, 0.6), rgba(0, 229, 255, 0.6)); }
.thumb-spaceRanger { background: linear-gradient(135deg, rgba(157, 0, 255, 0.6), rgba(0, 229, 255, 0.6)); }
.thumb-swordLegend { background: linear-gradient(135deg, rgba(57, 255, 20, 0.6), rgba(255, 79, 216, 0.6)); }
.thumb-cyberBowling { background: linear-gradient(135deg, #ff4500aa, rgba(108, 99, 255, 0.6)); }
.thumb-neonArchery { background: linear-gradient(135deg, rgba(255, 210, 63, 0.6), rgba(0, 229, 255, 0.6)); }
.thumb-astroMiner { background: linear-gradient(135deg, rgba(0, 229, 255, 0.6), rgba(157, 0, 255, 0.6)); }
.thumb-gridRunner { background: linear-gradient(135deg, rgba(255, 79, 216, 0.6), rgba(108, 99, 255, 0.6)); }
.thumb-silentMansion { background: linear-gradient(135deg, #ff3333aa, rgba(8, 11, 20, 0.8)); }
.thumb-zombieEscape { background: linear-gradient(135deg, #990000aa, rgba(8, 11, 20, 0.8)); }

.game-card-thumbnail svg {
  width: 100%; height: 100%;
}

.game-card-next::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; width: 100%; height: 70%;
  background: linear-gradient(to top, rgba(8, 11, 20, 1) 0%, rgba(8, 11, 20, 0.8) 55%, rgba(8, 11, 20, 0) 100%);
  z-index: 1;
  transition: height var(--transition-normal);
}

.game-card-next:hover {
  transform: translateY(-6px) rotateX(3deg) scale(1.02);
  border-color: var(--neon-cyan);
  box-shadow: 0 15px 30px rgba(0, 229, 255, 0.25);
}

.game-card-next:hover .game-card-thumbnail {
  transform: scale(1.08);
}

.game-card-next:hover::after {
  height: 80%;
}

.card-reward-badge {
  position: absolute;
  top: 8px; right: 8px;
  z-index: 2;
  background: rgba(255, 210, 63, 0.15);
  border: 1px solid var(--neon-yellow);
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--neon-yellow);
  display: flex;
  align-items: center;
  gap: 3px;
  text-shadow: 0 0 4px rgba(255, 210, 63, 0.4);
}

.card-trending-badge {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 2;
  background: rgba(255, 79, 216, 0.15);
  border: 1px solid var(--neon-pink);
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--neon-pink);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: badgePulse 1.2s infinite alternate;
}

@keyframes badgePulse {
  from { box-shadow: 0 0 6px rgba(255, 79, 216, 0.2); border-color: rgba(255, 79, 216, 0.4); }
  to { box-shadow: 0 0 12px rgba(255, 79, 216, 0.7); border-color: rgba(255, 79, 216, 1); }
}

.card-category-tag {
  position: absolute;
  bottom: 54px; left: 12px;
  z-index: 2;
  background: rgba(108, 99, 255, 0.15);
  border: 1px solid var(--neon-purple);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.52rem;
  font-weight: 600;
  color: #c9c5ff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-details-next {
  z-index: 2;
  position: relative;
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.card-title-next {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.card-meta-next {
  font-size: 0.65rem;
  color: var(--text-secondary);
}

.card-play-btn-next {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-cyan));
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(108, 99, 255, 0.4);
  opacity: 0.8;
  transform: scale(0.95);
  transition: all var(--transition-fast);
}

.game-card-next:hover .card-play-btn-next {
  opacity: 1;
  transform: scale(1.08);
  box-shadow: 0 4px 15px rgba(0, 229, 255, 0.6);
}

/* Skeleton Loading utility classes */
.skeleton-box {
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
  background-size: 200% 100%;
  animation: skeletonLoading 1.5s infinite;
  border-radius: var(--border-radius-sm);
}

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

.fade-in-up {
  animation: fadeInUp 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  opacity: 0;
  transform: translateY(15px);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

