/* ==========================================================================
   RYUK OFFICIAL PREMIUM GAMING THEME DESIGN SYSTEM
   ========================================================================== */

/* Typography & Global Variables */
:root {
  --font-primary: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-secondary: 'Inter', sans-serif;

  /* Colors - Tailored HSL Palette */
  --color-bg-base: #06070a;        /* Ultra dark gaming charcoal */
  --color-bg-surface: #0e1017;     /* Slate midnight slate */
  --color-bg-glass: rgba(14, 16, 23, 0.72);
  --color-border-glass: rgba(255, 255, 255, 0.08);
  --color-border-glow: rgba(var(--color-primary-rgb), 0.15);

  --color-primary: #0084ff;        /* Vibrant Gaming Blue */
  --color-primary-rgb: 0, 132, 255; /* RGB components for flexible rgba transparency */
  --color-primary-glow: rgba(var(--color-primary-rgb), 0.45);
  --color-primary-hover: #0070da;
  --color-primary-text: #ffffff;   /* Crisp white text for contrast on blue */

  --color-text-white: #ffffff;
  --color-text-muted: #888e9e;
  --color-text-dim: #5c6273;
  
  --shadow-premium: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 8px 24px var(--color-primary-glow);
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease-out;
  
  --border-radius-card: 28px;      /* Extreme rounded corners matching JioGames */
  --border-radius-pill: 50px;
}

/* Reset and Global Setup */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-primary);
  background-color: #000;
  color: var(--color-text-white);
  line-height: 1.5;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

/* Responsive App Container Wrapper (Borderless full-screen viewport) */
.app-container {
  width: 100%;
  min-height: 100vh;
  background-color: var(--color-bg-base);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Button & Icon Core Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-primary);
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  outline: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-primary-text);
  padding: 14px 28px;
  border-radius: var(--border-radius-pill);
  font-size: 1rem;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(var(--color-primary-rgb), 0.6);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--color-text-white);
  padding: 12px 24px;
  border-radius: var(--border-radius-pill);
  border: 1px solid var(--color-border-glass);
  font-size: 0.95rem;
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}

.icon-btn {
  background: none;
  border: none;
  color: var(--color-text-white);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.icon-btn:hover {
  background-color: rgba(255, 255, 255, 0.08);
  transform: scale(1.05);
}

/* ==========================================================================
   HEADER SECTION
   ========================================================================== */
.main-header {
  position: fixed; /* Fixed flat header edge-to-edge */
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  background-color: #06070a; /* Sleek AMOLED dark base matching the background base color */
  border-bottom: 1px solid rgba(255, 255, 255, 0.08); /* Divider exactly as in JioGames */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Squircle Sidebar/Menu Button */
.sidebar-trigger {
  width: 44px;
  height: 44px;
  background-color: #0e1017; /* Slate midnight surface, matching --color-bg-surface */
  border-radius: 12px; /* High-end rounded squircle */
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
}

.sidebar-trigger:hover {
  background-color: #171b26;
  transform: scale(1.04);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px; /* Space between logo circle and text */
  margin-left: 6px;
}

.brand-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
  font-family: var(--font-primary);
  letter-spacing: -0.3px;
}

/* Blue Coordinated Round Trigger Buttons */
.search-trigger, .profile-trigger {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(var(--color-primary-rgb), 0.12) !important; /* Elegant gaming blue transparent background */
  color: var(--color-primary) !important; /* Vivid Blue Icon */
  border: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.search-trigger:hover, .profile-trigger:hover {
  background-color: rgba(var(--color-primary-rgb), 0.22) !important;
  color: var(--color-primary) !important;
  transform: scale(1.05);
}

/* ==========================================================================
   HERO CAROUSEL SECTION
   ========================================================================== */
.hero-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: #000;
}

/* Cinematic Bottom Feathering (Blends sharp bottom cut into page base seamlessly) */
.hero-carousel::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30%; /* Balanced responsive feather depth relative to container height */
  background: linear-gradient(to bottom, 
              rgba(6, 7, 10, 0) 0%, 
              rgba(6, 7, 10, 0.4) 40%, 
              rgba(6, 7, 10, 0.85) 75%, 
              var(--color-bg-base) 100%);
  z-index: 3;
  pointer-events: none; /* Let clicks pass through to slideshow nodes */
}

.carousel-bg-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.carousel-bg-layer {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.68) saturate(1.05); /* Fully sharp cinematic banner visuals, slightly darkened for text legibility */
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

.carousel-bg-layer.active {
  opacity: 1;
}

.carousel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: none;
  z-index: 2;
  pointer-events: none;
}

.carousel-slides {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 3;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Left-aligned slide text on mobile */
  justify-content: flex-end;
  padding: 0 24px 80px 24px;
  opacity: 0;
  transform: translateY(15px);
  pointer-events: none;
  transition: opacity 0.6s ease-in-out, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-title::before {
  content: 'RYUK OFFICIAL ZONE';
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: 2px;
  margin-bottom: 8px;
  text-shadow: 0 0 10px rgba(var(--color-primary-rgb), 0.2);
  text-transform: uppercase;
}

.slide-visual {
  display: none; /* Hide any separate visual, letting the sharp landscape background image be the main banner! */
}

.carousel-slide.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.slide-content {
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.slide-title {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 12px;
  color: var(--color-text-white);
  letter-spacing: -1px;
}

.slide-description {
  font-family: var(--font-secondary);
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 24px;
  line-height: 1.4;
  /* Line clamp for description */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.know-more-btn {
  font-size: 0.95rem;
  padding: 12px 36px;
  height: 48px;
}

.carousel-pagination {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 4;
}

.carousel-pagination .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.carousel-pagination .dot.active {
  width: 28px;
  height: 8px;
  border-radius: var(--border-radius-pill);
  background-color: var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary-glow);
}

/* Desktop Grid/Layout updates for Hero Section */
@media (min-width: 768px) {
  .hero-carousel {
    height: 480px;
    aspect-ratio: auto;
  }
  .slide-title {
    font-size: 2.8rem;
  }
}

/* ==========================================================================
   CATEGORIES SECTION
   ========================================================================== */
.categories-section {
  padding: 16px 0 8px 0;
  background-color: var(--color-bg-base);
}

.section-header-compact {
  padding: 0 16px;
  margin-bottom: 10px;
}

.section-header-compact h2 {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--color-text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.categories-wrapper {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 16px 12px 16px;
  scrollbar-width: none; /* Hide scrollbar on Firefox */
}

.categories-wrapper::-webkit-scrollbar {
  display: none; /* Hide scrollbar on Chrome/Safari */
}

.category-chip {
  flex: 0 0 auto;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border-glass);
  color: var(--color-text-muted);
  padding: 10px 18px;
  border-radius: var(--border-radius-pill);
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-fast);
}

.category-chip i {
  font-size: 0.85rem;
}

.category-chip:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--color-text-white);
  transform: translateY(-1px);
}

.category-chip.active {
  background-color: rgba(var(--color-primary-rgb), 0.12);
  color: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 0 15px rgba(var(--color-primary-rgb), 0.1);
}

/* ==========================================================================
   TRENDING GALLERY
   ========================================================================== */
.trending-section, .editors-pick-section {
  padding: 16px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.section-header h2::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-primary);
  margin-left: 6px;
  box-shadow: 0 0 8px var(--color-primary);
}

.section-header .view-all {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.trending-gallery {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}

.trending-gallery::-webkit-scrollbar {
  display: none;
}

.trending-card {
  flex: 0 0 140px;
  background-color: var(--color-bg-surface);
  border: 1px solid var(--color-border-glass);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.trending-card-img {
  width: 100%;
  height: 95px;
  object-fit: cover;
  border-bottom: 1px solid var(--color-border-glass);
}

.trending-card-info {
  padding: 8px 10px;
}

.trending-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.trending-card-genre {
  font-family: var(--font-secondary);
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.trending-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-premium);
}

/* ==========================================================================
   GAME CARDS GRID (EDITOR'S PICK)
   ========================================================================== */
.game-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (min-width: 768px) {
  .game-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .game-cards-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.game-card {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--border-radius-card);
  overflow: hidden;
  cursor: pointer;
  background-color: var(--color-bg-surface);
  border: 1px solid var(--color-border-glass);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  transform: translateZ(0); /* Fix rounded corner overflow on safari */
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
              border-color 0.4s ease;
}

.game-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.game-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, 
              rgba(0, 0, 0, 0) 40%, 
              rgba(0, 0, 0, 0.55) 70%, 
              rgba(0, 0, 0, 0.9) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  z-index: 2;
}

.game-card-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: var(--color-primary);
  color: var(--color-primary-text);
  padding: 4px 10px;
  border-radius: var(--border-radius-pill);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(var(--color-primary-rgb), 0.35);
  z-index: 3;
}

.game-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-text-white);
  margin-bottom: 2px;
  letter-spacing: -0.3px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.game-card-genre {
  font-family: var(--font-secondary);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 5px;
}

.game-card-genre i {
  color: var(--color-primary);
}

/* Card Hover/Interaction States */
.game-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--color-primary);
  box-shadow: 0 15px 35px rgba(var(--color-primary-rgb), 0.25);
  z-index: 5;
}

.game-card:hover .game-card-img {
  transform: scale(1.06);
}

/* Skeleton Loading Animation placeholder */
.card-skeleton {
  aspect-ratio: 3 / 4;
  border-radius: var(--border-radius-card);
  background: linear-gradient(90deg, #12141a 25%, #1d202b 50%, #12141a 75%);
  background-size: 200% 100%;
  animation: loadingGlow 1.5s infinite;
}

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

/* ==========================================================================
   SIDE DRAWER MENU
   ========================================================================== */
.side-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  visibility: hidden;
  transition: visibility 0.4s;
}

.side-drawer.open {
  visibility: visible;
}

.drawer-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.side-drawer.open .drawer-overlay {
  opacity: 1;
}

.drawer-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 80%;
  max-width: 320px;
  height: 100%;
  background-color: var(--color-bg-surface);
  border-right: 1px solid var(--color-border-glass);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 24px;
}

.side-drawer.open .drawer-content {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.drawer-header .brand {
  margin-left: 0;
}

.close-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border-glass);
  color: var(--color-text-white);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.close-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--color-primary);
}

.drawer-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 12px 16px;
  border-radius: 16px;
  transition: var(--transition-fast);
}

.nav-link i {
  font-size: 1.15rem;
  width: 24px;
  color: var(--color-text-dim);
  transition: var(--transition-fast);
}

.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--color-text-white);
}

.nav-link:hover i {
  color: var(--color-primary);
}

.nav-link.active {
  background-color: rgba(var(--color-primary-rgb), 0.08);
  color: var(--color-primary);
}

.nav-link.active i {
  color: var(--color-primary);
}

.drawer-logo-container {
  margin-top: auto;
  display: flex;
  justify-content: center;
  padding: 24px 0;
  opacity: 0.15;
}

.drawer-logo-vector {
  width: 120px;
  height: auto;
}

.drawer-footer {
  font-family: var(--font-secondary);
  font-size: 0.75rem;
  color: var(--color-text-dim);
  text-align: center;
  border-top: 1px solid var(--color-border-glass);
  padding-top: 16px;
}

/* ==========================================================================
   DYNAMIC SEARCH OVERLAY
   ========================================================================== */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-bg-base);
  z-index: 2500;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-overlay.open {
  transform: translateY(0);
}

.search-header {
  height: 70px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  border-bottom: 1px solid var(--color-border-glass);
}

.back-btn {
  background: none;
  border: none;
  color: var(--color-text-white);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 8px;
}

.search-input-wrapper {
  flex: 1;
  position: relative;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border-glass);
  border-radius: var(--border-radius-pill);
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 14px;
}

.search-input-wrapper:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 15px rgba(var(--color-primary-rgb), 0.15);
}

.search-icon {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-right: 10px;
}

.search-input-wrapper input {
  flex: 1;
  background: none;
  border: none;
  color: var(--color-text-white);
  font-family: var(--font-primary);
  font-size: 1rem;
  outline: none;
}

.search-input-wrapper input::placeholder {
  color: var(--color-text-dim);
}

.clear-search-btn {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 1.05rem;
  display: none;
}

.clear-search-btn.active {
  display: block;
}

.search-results-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px 16px;
}

.results-header {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}

.search-results-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background-color: var(--color-bg-surface);
  border: 1px solid var(--color-border-glass);
  padding: 10px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.search-item-img {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  object-fit: cover;
}

.search-item-info {
  flex: 1;
}

.search-item-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.search-item-genre {
  font-family: var(--font-secondary);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.search-item:hover {
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

/* ==========================================================================
   USER PROFILE & WALLET PANEL
   ========================================================================== */
.profile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  visibility: hidden;
  transition: visibility 0.4s;
}

.profile-drawer.open {
  visibility: visible;
}

.profile-overlay-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.profile-drawer.open .profile-overlay-bg {
  opacity: 1;
}

.profile-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 85%;
  max-width: 360px;
  height: 100%;
  background-color: var(--color-bg-surface);
  border-left: 1px solid var(--color-border-glass);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 24px;
}

.profile-drawer.open .profile-content {
  transform: translateX(0);
}

.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.profile-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border-glass);
  padding: 16px;
  border-radius: 20px;
  margin-bottom: 20px;
}

.user-avatar-large {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: rgba(var(--color-primary-rgb), 0.12);
  border: 1px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: var(--color-primary);
  box-shadow: 0 0 10px rgba(var(--color-primary-rgb), 0.2);
}

.user-info h4 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 2px;
}

.user-info p {
  font-family: var(--font-secondary);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background-color: #ffd700;
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
}

.wallet-card {
  background: linear-gradient(135deg, rgba(var(--color-primary-rgb), 0.15) 0%, rgba(0, 0, 0, 0) 100%);
  border: 1px solid rgba(var(--color-primary-rgb), 0.3);
  padding: 20px;
  border-radius: 24px;
  margin-bottom: 24px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.wallet-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.wallet-top i {
  color: var(--color-primary);
}

.wallet-balance {
  display: flex;
  align-items: baseline;
  margin-bottom: 16px;
}

.wallet-balance .currency {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-right: 4px;
}

.wallet-balance .amount {
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -1px;
}

.recharge-btn-action {
  width: 100%;
  height: 46px;
  gap: 8px;
  font-size: 0.95rem;
}

.profile-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--color-text-white);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 14px 16px;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border-glass);
  border-radius: 16px;
  transition: var(--transition-fast);
}

.menu-item i {
  color: var(--color-text-muted);
  font-size: 1.1rem;
}

.menu-item:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

/* ==========================================================================
   GAME DETAILS SHEET DRAWER (MODAL)
   ========================================================================== */
.details-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3000;
  visibility: hidden;
  transition: visibility 0.4s;
}

.details-drawer.open {
  visibility: visible;
}

.details-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.details-drawer.open .details-overlay {
  opacity: 1;
}

.details-sheet {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translate(-50%, 100%);
  width: 100%;
  max-width: 480px;
  height: 85%;
  background-color: var(--color-bg-base);
  border-top: 1px solid var(--color-border-glass);
  border-top-left-radius: 32px;
  border-top-right-radius: 32px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 768px) {
  .details-sheet {
    max-width: 700px;
    border-left: 1px solid var(--color-border-glass);
    border-right: 1px solid var(--color-border-glass);
  }
}

.details-drawer.open .details-sheet {
  transform: translate(-50%, 0);
}

.sheet-puller {
  width: 40px;
  height: 5px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius-pill);
  margin: 12px auto;
  z-index: 10;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.sheet-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--color-border-glass);
  color: var(--color-text-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.sheet-close-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--color-primary);
}

.sheet-hero {
  position: relative;
  width: 100%;
  height: 220px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}

.sheet-hero-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, 
              rgba(6, 7, 10, 0) 40%, 
              rgba(6, 7, 10, 0.8) 80%, 
              var(--color-bg-base) 100%);
}

.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 24px 24px 24px;
}

.sheet-meta {
  margin-bottom: 20px;
}

.sheet-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.sheet-title-row h2 {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.sheet-badge {
  background-color: rgba(var(--color-primary-rgb), 0.1);
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
  padding: 4px 12px;
  border-radius: var(--border-radius-pill);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.rating-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rating-row .stars {
  color: #ffd700;
  font-size: 0.85rem;
}

.rating-text {
  font-family: var(--font-secondary);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.sheet-desc-section {
  margin-bottom: 24px;
}

.sheet-desc-section h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.sheet-desc-section p {
  font-family: var(--font-secondary);
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Recharge Layout UI (For MLBB/recharge types) */
.recharge-panel-container {
  margin-bottom: 24px;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border-glass);
  padding: 16px;
  border-radius: 20px;
}

.recharge-panel-container.hidden {
  display: none;
}

.panel-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.recharge-options-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.recharge-card-option {
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border-glass);
  padding: 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.recharge-card-option.active {
  border-color: var(--color-primary);
  background-color: rgba(var(--color-primary-rgb), 0.08);
}

.opt-value {
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.opt-value i {
  color: var(--color-primary);
}

.opt-price {
  font-family: var(--font-secondary);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.recharge-card-option.active .opt-price {
  color: var(--color-text-white);
  font-weight: 700;
}

.recharge-input-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.gamer-inputs {
  display: flex;
  gap: 8px;
}

.recharge-text-input, .recharge-text-input-short {
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--color-border-glass);
  color: var(--color-text-white);
  border-radius: 12px;
  height: 42px;
  padding: 0 12px;
  font-family: var(--font-primary);
  font-size: 0.95rem;
  outline: none;
}

.recharge-text-input {
  flex: 1;
}

.recharge-text-input-short {
  width: 100px;
}

.recharge-text-input:focus, .recharge-text-input-short:focus {
  border-color: var(--color-primary);
}

.features-row {
  display: flex;
  justify-content: space-between;
  background-color: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--color-border-glass);
  padding: 12px 20px;
  border-radius: 20px;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.feature-item i {
  font-size: 1.15rem;
  color: var(--color-primary);
}

.feature-item span {
  font-family: var(--font-secondary);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.sheet-footer {
  height: 80px;
  border-top: 1px solid var(--color-border-glass);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  flex-shrink: 0;
  background-color: var(--color-bg-surface);
}

.share-btn {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border-glass);
}

.action-play-btn {
  flex: 1;
  height: 50px;
  border-radius: 16px;
  gap: 8px;
  font-size: 1.05rem;
}

/* ==========================================================================
   TOAST NOTIFICATION SYSTEM
   ========================================================================== */
.toast-notification {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 400px;
  background-color: #0c131a;
  border: 1px solid var(--color-primary);
  border-radius: 16px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 5000;
  box-shadow: 0 10px 30px rgba(var(--color-primary-rgb), 0.15);
  transition: top 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-notification.show {
  top: 20px;
}

.toast-icon {
  font-size: 1.6rem;
  color: var(--color-primary);
}

.toast-content h5 {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-text-white);
  margin-bottom: 2px;
}

.toast-content p {
  font-family: var(--font-secondary);
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* ==========================================================================
   WIDESCREEN RESPONSIVE DESKTOP LAYOUT OVERRIDES
   ========================================================================== */

@media (min-width: 768px) {
  /* Dynamic Content Gutters for centered look */
  .main-header {
    padding: 0 5%;
  }
  
  .categories-section, 
  .trending-section, 
  .editors-pick-section {
    padding-left: 5%;
    padding-right: 5%;
  }

  .section-header-compact {
    padding: 0;
  }

  /* Widescreen Hero Carousel (Full-bleed immersive background) */
  .hero-carousel {
    height: 650px; /* Tall cinematic height mirroring Kissland Store */
    aspect-ratio: auto;
  }



  .carousel-slide {
    padding: 0 5% 120px 5%;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 0;
  }

  .slide-content {
    text-align: left;
    max-width: 48%; /* Left column layout */
    margin: 0;
  }

  .slide-title {
    font-size: 3.2rem;
    line-height: 1.05;
    margin-bottom: 16px;
  }

  .slide-description {
    font-size: 1.05rem;
    margin-bottom: 28px;
    line-height: 1.5;
  }

  /* Wrapped Category chips (removes scroll bars on desktop) */
  .categories-wrapper {
    padding: 4px 0 12px 0;
    overflow-x: visible;
    flex-wrap: wrap;
    gap: 12px;
  }

  .category-chip {
    padding: 12px 22px;
    font-size: 0.95rem;
  }

  /* Responsive Trending gallery cards wrap */
  .trending-gallery {
    overflow-x: visible;
    flex-wrap: wrap;
    gap: 18px;
    padding-bottom: 0;
  }

  .trending-card {
    flex: 0 0 calc((100% - 54px) / 4); /* 4 elegant columns */
  }

  .trending-card-img {
    height: 120px;
  }

  .trending-card-info {
    padding: 12px;
  }

  .trending-card-title {
    font-size: 0.9rem;
  }

  /* Card Grid upgrades */
  .game-cards-grid {
    gap: 24px;
  }

  .game-card-overlay {
    padding: 20px;
  }

  .game-card-title {
    font-size: 1.3rem;
  }

  /* Search overlays alignment */
  .search-header {
    padding: 0 5%;
  }

  .search-results-container {
    padding: 30px 5%;
  }

  /* Floating scale-up Lightbox Details Modal (Center card layout) */
  .details-sheet {
    max-width: 650px;
    height: auto;
    max-height: 85vh;
    bottom: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%) scale(0.95);
    border-radius: 32px;
    border: 1px solid var(--color-border-glass);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .details-drawer.open .details-sheet {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }

  .sheet-hero {
    height: 250px;
  }

  .sheet-body {
    padding: 0 32px 32px 32px;
  }

  .sheet-title-row h2 {
    font-size: 1.8rem;
  }

  .features-row {
    padding: 16px 28px;
  }
}

@media (min-width: 1200px) {
  /* Constrain content alignment for super wide monitors to avoid extreme stretching */
  .main-header {
    padding: 0 calc((100% - 1300px) / 2);
  }

  .categories-section, 
  .trending-section, 
  .editors-pick-section {
    padding-left: calc((100% - 1300px) / 2);
    padding-right: calc((100% - 1300px) / 2);
  }

  .carousel-slide {
    padding: 0 calc((100% - 1300px) / 2) 110px calc((100% - 1300px) / 2);
  }

  .trending-card {
    flex: 0 0 calc((100% - 90px) / 6); /* 6 elegant columns on HD desktop */
  }

  .search-header {
    padding: 0 calc((100% - 1300px) / 2);
  }

  .search-results-container {
    padding: 30px calc((100% - 1300px) / 2);
  }
}

@media (min-width: 1600px) {
  /* 5 grid cards on ultra-wide screens */
  .game-cards-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* Sticky Glassmorphic Bottom Navigation Bar */
.bottom-navbar {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 1200px;
  height: 64px;
  background-color: rgba(10, 11, 16, 0.48);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border-glass);
  border-radius: var(--border-radius-pill);
  display: flex;
  align-items: center;
  justify-content: space-around; /* Distribute buttons evenly */
  padding: 0 16px;
  z-index: 1000;
  box-shadow: var(--shadow-premium), 0 -8px 24px rgba(0, 0, 0, 0.3);
  transition: var(--transition-smooth);
}

.bottom-navbar .icon-btn {
  color: var(--color-text-white);
  background: none;
  font-size: 1.15rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  border: 1px solid transparent;
}

.bottom-navbar .icon-btn:hover {
  background-color: rgba(var(--color-primary-rgb), 0.1);
  color: var(--color-primary);
  border-color: var(--color-border-glow);
  transform: scale(1.08);
}

/* Add padding to main content on both index and mlbb pages to clear the top bar and bottom navbar */
main.main-content {
  padding-top: 64px;
  padding-bottom: 96px;
}
/* Scroll Autohide States */
.main-header.hide-header {
  transform: translateY(-80px); /* Slide up out of viewport cleanly (since no longer horizontal centered) */
}

.bottom-navbar.hide-navbar {
  transform: translate(-50%, 100px); /* Slide down out of viewport (preserving horizontal center) */
}
