
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&display=swap');

/* Reset & Variables */
:root {
  --card-radius: 16px;
  --border-thickness: 1.5px;
  --accent-1: #4fc3f7;
  --accent-2: #81d4fa;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
  --shadow-md: 0 8px 25px rgba(0,0,0,0.15);
  --shadow-lg: 0 15px 40px rgba(0,0,0,0.2);
}

/* Enhanced Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  padding-bottom: 80px; /* Space for bottom nav */
}

/* Enhanced Background Effects */
#blue-dots {
  position: fixed;
  top: 0; 
  left: 0;
  width: 100vw; 
  height: 100vh;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.bg-shape {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
  animation: floatShape 20s infinite alternate ease-in-out;
  z-index: -2;
}

.bg-shape.one {
  width: 400px; 
  height: 400px;
  background: var(--accent-1);
  top: -100px; 
  left: -100px;
  animation-delay: 0s;
}

.bg-shape.two {
  width: 300px; 
  height: 300px;
  background: var(--accent-2);
  bottom: -150px; 
  right: -150px;
  animation-delay: 2s;
}

@keyframes floatShape {
  0%, 100% { 
    transform: translateY(0) translateX(0) scale(1);
  }
  50% { 
    transform: translateY(-40px) translateX(20px) scale(1.1);
  }
}

.blue-dot {
  position: absolute;
  bottom: -6px;
  width: 6px;
  height: 6px;
  background-color: var(--accent-1);
  border-radius: 50%;
  opacity: 0.7;
  animation-name: moveUpFancy;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

@keyframes moveUpFancy {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.7;
  }
  50% {
    opacity: 1;
    transform: translateY(-50vh) rotate(180deg);
  }
  100% {
    transform: translateY(-100vh) rotate(360deg);
    opacity: 0;
  }
}

/* Enhanced Header */
.main-header {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 1rem 1.5rem;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-md);
  animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.main-header .logo-icon { 
  height: 40px;
  filter: drop-shadow(0 2px 8px rgba(37, 99, 235, 0.3));
  transition: transform 0.3s ease;
}

.main-header .logo-icon:hover {
  transform: scale(1.1) rotate(5deg);
}

.header-center { 
  flex: 1; 
  margin: 0 2rem;
  position: relative;
}

.search-bar {
  width: 100%; 
  padding: 0.8rem 1.2rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.3s ease;
}

.search-bar:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.search-bar::placeholder {
  color: var(--text-muted);
}

#menu-btn {
  background: none; 
  border: none; 
  color: var(--accent-1); 
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

#menu-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s;
}

#menu-btn:hover::before {
  left: 100%;
}

#menu-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.1);
}

/* Search */
.search-icon {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--accent-1);
  font-size: 22px;
  display: flex;
  align-items: center;
  transition: all 0.3s ease;
  
  &:hover {
    color: var(--primary);
    transform: scale(1.1);
  }
}

.search-box {
  position: absolute;
  top: 120%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 400px;
  background: var(--bg-secondary);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 12px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 2px 8px rgba(79, 195, 247, 0.1);
  padding: 12px;
  z-index: 1000;
  animation: searchSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  
  // Center alignment for content
  display: flex;
  flex-direction: column;
  align-items: center;
  
  @keyframes searchSlideIn {
    from {
      opacity: 0;
      transform: translateX(-50%) translateY(-10px) scale(0.95);
    }
    to {
      opacity: 1;
      transform: translateX(-50%) translateY(0) scale(1);
    }
  }
}

.search-box input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  transition: all 0.3s ease;
  
  &::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
  }
  
  &:focus {
    border-color: var(--accent-1);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 
      0 0 0 3px rgba(79, 195, 247, 0.15),
      inset 0 1px 3px rgba(255, 255, 255, 0.1);
  }
}

.search-results {
  margin-top: 8px;
  max-height: 280px;
  overflow-y: auto;
  width: 100%;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  
  // Custom scrollbar
  &::-webkit-scrollbar {
    width: 6px;
  }
  
  &::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
  }
  
  &::-webkit-scrollbar-thumb {
    background: var(--accent-1);
    border-radius: 3px;
    opacity: 0.6;
    
    &:hover {
      opacity: 1;
    }
  }
}

.result-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.3s ease;
  margin: 2px;
  background: transparent;
  border: 1px solid transparent;
  
  // Center content horizontally
  justify-content: flex-start;
  width: 100%;
  
  &:hover {
    background: rgba(79, 195, 247, 0.1);
    border-color: rgba(79, 195, 247, 0.2);
    transform: translateX(4px);
  }
  
  &:active {
    transform: translateX(4px) scale(0.98);
  }
}

.result-item img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  margin-right: 12px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  
  .result-item:hover & {
    transform: scale(1.1);
    border-color: var(--accent-1);
  }
}

// Result info container for better alignment
.result-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
}

.result-title {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.result-desc {
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.8;
}

.no-result {
  text-align: center;
  padding: 20px 16px;
  color: var(--text-muted);
  font-size: 13px;
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
}

.hidden {
  display: none;
}

// Loading state
.search-loading {
  .search-results {
    position: relative;
    
    &::after {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 20px;
      height: 20px;
      border: 2px solid rgba(255, 255, 255, 0.1);
      border-left: 2px solid var(--accent-1);
      border-radius: 50%;
      animation: searchSpin 1s linear infinite;
    }
  }
}

@keyframes searchSpin {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

// Mobile responsiveness
@media (max-width: 768px) {
  .search-box {
    max-width: 90vw;
    padding: 10px;
    left: 50%;
    transform: translateX(-50%);
  }
  
  .search-box input {
    padding: 10px 14px;
    font-size: 16px; // Better for mobile touch
  }
  
  .result-item {
    padding: 12px 10px;
    font-size: 15px;
  }
  
  .result-item img {
    width: 32px;
    height: 32px;
    margin-right: 12px;
  }
  
  .search-results {
    max-height: 300px;
  }
}

// Small mobile devices
@media (max-width: 480px) {
  .search-box {
    max-width: 95vw;
    padding: 8px;
  }
  
  .search-box input {
    padding: 12px 14px;
  }
  
  .result-item {
    padding: 10px 8px;
  }
  
  .result-item img {
    width: 30px;
    height: 30px;
    margin-right: 10px;
  }
}
/* Enhanced Main Content */
main {
  padding-top: 80px;
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.container {
  padding-left: 24px;
  padding-right: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Enhanced Game Grid - IMAGE ONLY */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  padding: 20px;
}

.game-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--card-radius);
  cursor: pointer;
  aspect-ratio: 4/3;
  animation: cardAppear 0.6s ease-out;
  /* Remove all background colors and gradients */
  background: none;
  box-shadow: var(--shadow-md);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.game-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.6s;
  z-index: 2;
}

.game-card:hover::before {
  left: 100%;
}

.game-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.game-card:hover img {
  transform: scale(1.1);
}

/* Remove game card body since we only want image */
.game-card-body {
  display: none;
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: all 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 1;
}

.game-card:hover .card-overlay {
  opacity: 1;
}

.overlay-text {
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.2rem;
  text-transform: uppercase;
  text-align: center;
  transform: translateY(20px);
  transition: transform 0.4s ease;
}

.game-card:hover .overlay-text {
  transform: translateY(0);
}

.overlay-text .game-name {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.overlay-text .region {
  font-size: 12px;
  color: #ddd;
  opacity: 0;
  transition: opacity 0.4s ease 0.1s;
}

.game-card:hover .overlay-text .region {
  opacity: 1;
}

/* Enhanced Scroll Sections */
.scroll-section {
  padding: 30px 20px;
  position: relative;
}

.scroll-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-1), transparent);
}

.scroll-container {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, 1fr);
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 20px 0;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}

.scroll-container::-webkit-scrollbar {
  height: 8px;
}

.scroll-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

.scroll-container::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 10px;
}

.scroll-container::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

.scroll-card {
  position: relative;
  width: 200px;
  height: 180px;
  flex-shrink: 0;
  cursor: pointer;
  text-decoration: none;
  border-radius: var(--card-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.scroll-card:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: var(--shadow-md);
}

.card-img {
  width: 100%;
  height: 140px;
  position: relative;
  overflow: hidden;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.scroll-card:hover img {
  transform: scale(1.1);
}

.card-title {
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  text-transform: uppercase;
  line-height: 1.2;
  padding: 0 8px;
}

.scroll-card:active {
  transform: scale(0.98);
}

.ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  background-color: rgba(59, 130, 246, 0.6);
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Enhanced Category Tabs */
.category-tabs {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  padding: 12px 16px;
  border-radius: 50px;
  width: fit-content;
  max-width: 95%;
  margin: 0 auto 30px;
  overflow-x: auto;
  scrollbar-width: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 80px;
  z-index: 99;
  animation: fadeInDown 0.6s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tabs .tab {
  flex: 0 0 auto;
  border: none;
  outline: none;
  padding: 10px 20px;
  border-radius: 25px;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.category-tabs .tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s;
}

.category-tabs .tab:hover::before {
  left: 100%;
}

.category-tabs .tab.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.category-tabs .tab:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}
 

/* Enhanced Why Us Section */
.why-us {
  font-family: 'Inter', sans-serif;
  padding: 60px 20px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.9));
  position: relative;
}

.why-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.why-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 2px;
}

.why-title .highlight {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.feature-card {
  background: var(--bg-card);
  padding: 40px 30px;
  border-radius: var(--card-radius);
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  opacity: 0;
  transform: translateY(40px);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.feature-card .icon img {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  display: block;
  transition: transform 0.4s ease;
}

.feature-card:hover .icon img {
  transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin: 20px 0 15px;
  color: var(--text-primary);
  position: relative;
}

.feature-card p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.feature-card.show {
  animation: fadeSlideUp 0.8s ease forwards;
}

@keyframes fadeSlideUp {
  0% { opacity: 0; transform: translateY(40px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Enhanced Section Title */
.section-title {
  position: relative;
  display: inline-block;
  font-family: 'Orbitron', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  padding: 12px 40px;
  transform: skewX(-12deg);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
  letter-spacing: 1.5px;
  margin: 30px auto;
  text-transform: uppercase;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
  from {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
  }
  to {
    box-shadow: 0 6px 30px rgba(37, 99, 235, 0.8), 0 0 40px rgba(37, 99, 235, 0.3);
  }
}

.section-title span {
  display: inline-block;
  transform: skewX(12deg);
}

.section-title:hover {
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.6);
  transform: skewX(-12deg) scale(1.05);
}

.section-title .icon-png {
  width: 32px;
  height: 32px;
  object-fit: contain;
  margin-right: 10px;
  vertical-align: middle;
}

/* Enhanced Banner */
.banner-container {
  width: calc(100% - 40px);
  max-height: 400px;
  overflow: hidden;
  border-radius: 20px;
  margin: 30px auto 0 auto;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: bannerSlideIn 0.8s ease-out;
}

@keyframes bannerSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.banner-container::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.3) 0%, transparent 50%);
  pointer-events: none;
}

.banner-slider {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.banner-slider img {
  width: 100%;
  max-height: 400px;
  height: auto;
  border-radius: 20px;
  flex-shrink: 0;
  object-fit: cover;
}

/* Bottom Navigation - Enhanced */
.bottom-nav {
  position: fixed;
  bottom: 10px;
  left: 10px;
  right: 10px;
  height: 70px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 25px;
  box-shadow: 0 10px 35px rgba(0,0,0,0.3);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 999;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.nav-item {
  flex: 1;
  text-align: center;
  color: var(--text-secondary);
  font-size: 12px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  padding: 12px 0;
  transition: all 0.3s ease;
  border-radius: 15px;
}

.nav-item::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 50%;
  z-index: -1;
  box-shadow: 0 5px 20px rgba(37, 99, 235, 0.4);
  transition: all 0.3s ease;
  opacity: 0;
}

.nav-item.active::before {
  opacity: 1;
  animation: bubblePulse 2s infinite;
}

@keyframes bubblePulse {
  0%, 100% {
    box-shadow: 0 5px 20px rgba(37, 99, 235, 0.4);
  }
  50% {
    box-shadow: 0 5px 25px rgba(37, 99, 235, 0.6), 0 0 30px rgba(37, 99, 235, 0.3);
  }
}

.nav-item.active i {
  transform: translateY(-6px) scale(1.25);
  color: #fff;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.nav-item.active span {
  transform: translateY(-4px);
  color: var(--primary);
  font-weight: 600;
}

.nav-item:not(.active):hover i {
  transform: translateY(-3px) scale(1.15);
  color: var(--accent-1);
}

.nav-item i {
  font-size: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item span {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
}

/* Enhanced Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(10px);
  }
}

.modal.show {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  width: 400px;
  max-width: 90%;
  padding: 30px;
  border-radius: 20px;
  position: relative;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: modalSlideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}

.btn {
  display: block;
  margin: 15px 0;
  padding: 14px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 16px;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.terms {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 20px;
  line-height: 1.5;
}

.terms a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.terms a:hover {
  color: var(--accent-1);
  text-decoration: underline;
}

/* Enhanced Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: -300px;
  width: 300px;
  height: 100%;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  box-shadow: 8px 0 30px rgba(0,0,0,0.3);
  transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar.open {
  left: 0;
}

.sidebar-header {
  display: flex;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin-right: 15px;
  border: 3px solid var(--primary);
  transition: transform 0.3s ease;
}

.profile-img:hover {
  transform: scale(1.05);
}

.profile-info {
  display: flex;
  flex-direction: column;
  font-size: 0.95rem;
}

.profile-info span {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1.1rem;
}

.profile-info p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 1rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.sidebar-links a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s;
}

.sidebar-links a:hover::before {
  left: 100%;
}

.sidebar-links a i {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.sidebar-links a:hover,
.sidebar-links a.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  transform: translateX(5px);
}

.sidebar-links a:hover i,
.sidebar-links a.active i {
  transform: scale(1.1);
  color: var(--accent-1);
}

.sidebar-footer {
  margin-top: auto;
  padding: 20px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer p {
  margin: 0;
}

.creator-icon img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.creator-icon img:hover {
  transform: scale(1.1);
}

/* Enhanced Buttons */
.button-blue {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 12px 24px;
  border-radius: 50px;
  border: none;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

.button-blue::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.button-blue:hover::before {
  left: 100%;
}

.button-blue:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.btn-topup {
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: 25px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.btn-topup::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn-topup:hover::before {
  left: 100%;
}

.btn-topup:hover {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(79, 195, 247, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
  .game-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 16px;
  }
  
  .scroll-card {
    width: 160px;
    height: 160px;
  }
  
  .card-img {
    height: 120px;
  }
  
  .section-title {
    font-size: 20px;
    padding: 10px 30px;
  }
  
  .why-title {
    font-size: 2rem;
  }
  
  .feature-card {
    padding: 30px 20px;
  }
  
  .flash-card {
    width: 180px;
  }
  
  .bottom-nav {
    left: 8px;
    right: 8px;
    height: 65px;
  }
}

@media (max-width: 480px) {
  .game-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .scroll-card {
    width: 140px;
    height: 150px;
  }
  
  .card-img {
    height: 110px;
  }
  
  .card-title {
    font-size: 0.8rem;
  }
  
  .section-title {
    font-size: 18px;
    padding: 8px 24px;
  }
  
  .category-tabs .tab {
    padding: 8px 16px;
    font-size: 13px;
  }
  
  .bottom-nav {
    left: 5px;
    right: 5px;
    height: 60px;
  }
  
  .nav-item {
    font-size: 11px;
    padding: 10px 0;
  }
  
  .nav-item i {
    font-size: 18px;
  }
}

/* Utility Classes */
.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

.bounce-in {
  animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Loading Animation */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-left: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Hover Effects */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.hover-glow {
  transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 20px rgba(79, 195, 247, 0.4);
}

/* Focus States */
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}