 :root {
      --primary: #00f5ff;
      --secondary: #ff006e;
      --accent: #8338ec;
      --bg-dark: #0a0a0f;
      --bg-card: rgba(255, 255, 255, 0.05);
      --text: #e2e8f0;
      --text-dim: #94a3b8;
      --glow: rgba(0, 245, 255, 0.4);
      --glow-pink: rgba(255, 0, 110, 0.3);
      --glow-purple: rgba(131, 56, 236, 0.3);
      --sidebar-width: 60px;
      --sidebar-expanded: 280px;
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: 'Inter', sans-serif;
      background: radial-gradient(ellipse at top, #1e1b4b 0%, #0a0a0f 50%, #000000 100%);
      color: var(--text);
      min-height: 100vh;
      overflow-x: hidden;
      position: relative;
      padding-left: var(--sidebar-width);
      transition: padding-left 0.3s ease;
    }

    /* Animated background particles */
    body::before {
      content: '';
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: 
        radial-gradient(circle at 20% 80%, var(--glow) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, var(--glow-pink) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, var(--glow-purple) 0%, transparent 50%);
      opacity: 0.3;
      animation: float 20s ease-in-out infinite;
      pointer-events: none;
      z-index: -1;
    }

    @keyframes float {
      0%, 100% { transform: translate(0px, 0px) rotate(0deg); }
      33% { transform: translate(30px, -30px) rotate(120deg); }
      66% { transform: translate(-20px, 20px) rotate(240deg); }
    }


 .sidebar {
      position: fixed;
      top: 0;
      left: 0;
      width: var(--sidebar-width);
      height: 100vh;
      background: rgba(10, 10, 15, 0.95);
      backdrop-filter: blur(20px);
      border-right: 1px solid rgba(0, 245, 255, 0.2);
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      overflow: hidden;
      z-index: 1000;
    }

    
.sidebar {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}
 

.sidebar-nav::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}
 
 
.sidebar:hover .sidebar-nav::-webkit-scrollbar,
.sidebar.mobile-open .sidebar-nav::-webkit-scrollbar {
  width: 4px;
}
.sidebar:hover .sidebar-nav::-webkit-scrollbar-track,
.sidebar.mobile-open .sidebar-nav::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}
.sidebar:hover .sidebar-nav::-webkit-scrollbar-thumb,
.sidebar.mobile-open .sidebar-nav::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--primary), var(--accent));
  border-radius: 2px;
}
.sidebar:hover .sidebar-nav::-webkit-scrollbar-thumb:hover,
.sidebar.mobile-open .sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(var(--accent), var(--secondary));
}
    .sidebar:hover {
      width: var(--sidebar-expanded);
      box-shadow: 5px 0 30px var(--glow);
    }
    .sidebar-header {
      display: flex;
      align-items: center;
      padding: 1rem;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      min-height: 80px;
    }
    .sidebar-toggle {
      background: none;
      border: none;
      color: var(--primary);
      font-size: 1.5rem;
      cursor: pointer;
      padding: 0.5rem;
      border-radius: 8px;
      transition: all 0.3s ease;
      min-width: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .sidebar-toggle:hover {
      background: rgba(0, 245, 255, 0.1);
      transform: scale(1.1);
    }
    .sidebar-brand {
      margin-left: 1rem;
      font-family: 'Orbitron', monospace;
      font-weight: 700;
      font-size: 1.1rem;
      background: linear-gradient(135deg, var(--primary), var(--secondary));
      background-clip: text;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      white-space: nowrap;
      opacity: 0;
      transform: translateX(-20px);
      transition: all 0.3s ease 0.1s;
    }
    .sidebar:hover .sidebar-brand {
      opacity: 1;
      transform: translateX(0);
    }
    .sidebar-nav {
      padding: 1rem 0;
      flex: 1;
    }
 
    .mobile-sidebar-toggle {
      display: none;
      position: fixed;
      top: 1.5rem;
      left: -22px; 
      width: 40px;
      height: 40px;
      background: rgba(0, 245, 255, 0.1);
      color: var(--primary);
      font-size: 1.5rem;
      border: 2px solid var(--primary);
      border-radius: 0 10px 10px 0;
      box-shadow: 0 0 10px var(--glow);
      z-index: 1100;
      transition: all 0.3s ease;
      cursor: pointer;
      backdrop-filter: blur(15px);
    }
    .mobile-sidebar-toggle:hover {
      transform: scale(1.05);
      box-shadow: 
        0 12px 35px rgba(0, 0, 0, 0.4),
        0 0 30px var(--glow);
      border-color: var(--secondary);
    }
    .mobile-sidebar-toggle:active {
      transform: scale(0.95);
    }
   
    .sidebar.mobile-open + .mobile-sidebar-toggle {
      display: none;
    }
  

    .nav-item {
      display: flex;
      align-items: center;
      padding: 1rem;
      color: var(--text);
      text-decoration: none;
      transition: all 0.3s ease;
      position: relative;
      overflow: hidden;
    }

    .nav-item::before {
      content: '';
      position: absolute;
      left: 0;
      top: 0;
      height: 100%;
      width: 3px;
      background: var(--primary);
      transform: scaleY(0);
      transition: transform 0.3s ease;
    }

    .nav-item:hover::before {
      transform: scaleY(1);
    }

    .nav-item:hover {
      background: rgba(0, 245, 255, 0.1);
      color: var(--primary);
      padding-left: 1.5rem;
    }

    .nav-icon {
      min-width: 24px;
      font-size: 1.2rem;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .nav-text {
      margin-left: 1rem;
      white-space: nowrap;
      opacity: 0;
      transform: translateX(-20px);
      transition: all 0.3s ease 0.1s;
    }

    .sidebar:hover .nav-text {
      opacity: 1;
      transform: translateX(0);
    }

    .sidebar-footer {
      padding: 1rem;
      border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .social-links {
      display: flex;
      gap: 0.5rem;
      justify-content: center;
    }

    .social-link {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 35px;
      height: 35px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.05);
      color: var(--text-dim);
      text-decoration: none;
      transition: all 0.3s ease;
      font-size: 1rem;
    }

    .social-link:hover {
      background: var(--primary);
      color: #000;
      transform: scale(1.1);
    }

  
    /* Main Content */
   header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 245, 255, 0.2);
  position: relative;
  overflow: hidden;
}

    header::before {
      content: '';
      position: absolute;
      top: 0;
      left: -100%;
      width: 100%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(0, 245, 255, 0.1), transparent);
      animation: shimmer 3s infinite;
    }

    @keyframes shimmer {
      0% { left: -100%; }
      100% { left: 100%; }
    }

    /* Your existing H1 style - keep this for "CrazyGame" */
header h1 {
  font-family: 'Orbitron', monospace;
  font-size: 5rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px var(--glow);
  position: relative;
  z-index: 1;
  margin: 0 auto;
  display: block;
  text-align: center; /* Add this for center alignment */
  line-height: 1; /* Add this for better spacing */
}

/* Add this for the small tagline below */
header h1 .tagline {
  font-family: 'Inter', Arial, sans-serif;
  font-size: 1.2rem;
  font-weight: 500;
  display: block;
  margin-top: 8px;
  color: #666;
  background: none;
  -webkit-text-fill-color: #666;
  text-shadow: none;
  letter-spacing: 0.5px;
  opacity: 0.9;
  line-height: 1.2;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  header h1 {
    font-size: 3.5rem;
  }
  
  header h1 .tagline {
    font-size: 1rem;
    margin-top: 6px;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 2.8rem;
  }
  
  header h1 .tagline {
    font-size: 0.9rem;
    margin-top: 4px;
  }
}

    nav.categories {
      display: flex;
      flex-wrap: wrap;
      gap: 1rem;
      justify-content: center;
      padding: 2rem;
      background: rgba(10, 10, 15, 0.6);
      backdrop-filter: blur(15px);
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    nav button {
      background: rgba(255, 255, 255, 0.05);
      border: 2px solid transparent;
      padding: 0.8rem 1.5rem;
      border-radius: 25px;
      color: var(--text);
      font-weight: 500;
      font-family: 'Inter', sans-serif;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      cursor: pointer;
      position: relative;
      overflow: hidden;
      backdrop-filter: blur(10px);
    }

    nav button::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;
    }

    nav button:hover::before {
      left: 100%;
    }

    nav button:hover {
      border-color: var(--primary);
      box-shadow: 0 5px 15px var(--glow);
      transform: translateY(-2px);
    }

    nav button.active {
      background: linear-gradient(135deg, var(--primary), var(--accent));
      color: #000;
      border-color: var(--primary);
      box-shadow: 0 10px 25px var(--glow);
      font-weight: 600;
    }

    section.games {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: 2rem;
      padding: 3rem 2rem;
      max-width: 1400px;
      margin: 0 auto;
    }

    .game-card {
      background: var(--bg-card);
      backdrop-filter: blur(20px);
      border-radius: 20px;
      overflow: hidden;
      border: 1px solid rgba(255, 255, 255, 0.1);
      transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
      cursor: pointer;
      position: relative;
      transform-style: preserve-3d;
    }

    .game-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(135deg, var(--glow), var(--glow-pink), var(--glow-purple));
      opacity: 0;
      transition: opacity 0.3s ease;
      z-index: -1;
      border-radius: 20px;
    }

    .game-card:hover {
      transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
      box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 30px var(--glow);
      border-color: var(--primary);
    }

    .game-card:hover::before {
      opacity: 0.1;
    }

    .game-card:nth-child(2n):hover {
      transform: translateY(-10px) rotateX(-5deg) rotateY(-5deg);
    }

    .game-image-container {
      position: relative;
      overflow: hidden;
      height: 200px;
    }

    .game-card img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.4s ease;
      filter: brightness(0.9) contrast(1.1);
    }

    .game-card:hover img {
      transform: scale(1.1);
      filter: brightness(1) contrast(1.2);
    }

    .game-overlay {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
      opacity: 0;
      transition: opacity 0.3s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.2rem;
      font-weight: 600;
    }

    .game-card:hover .game-overlay {
      opacity: 1;
    }

    .game-card h3 {
      text-align: center;
      padding: 1.2rem;
      font-size: 1.1rem;
      font-weight: 600;
      background: rgba(0, 0, 0, 0.3);
      backdrop-filter: blur(10px);
      border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .game-category {
      position: absolute;
      top: 10px;
      right: 10px;
      background: rgba(0, 0, 0, 0.7);
      color: var(--primary);
      padding: 0.3rem 0.8rem;
      border-radius: 15px;
      font-size: 0.8rem;
      font-weight: 500;
      backdrop-filter: blur(10px);
      border: 1px solid rgba(0, 245, 255, 0.3);
    }

   

    /* Scrollbar styling */
    ::-webkit-scrollbar {
      width: 8px;
    }

    ::-webkit-scrollbar-track {
      background: var(--bg-dark);
    }

    ::-webkit-scrollbar-thumb {
      background: linear-gradient(var(--primary), var(--accent));
      border-radius: 4px;
    }

    /* Sidebar overlay for mobile */
    .sidebar-overlay {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.5);
      z-index: 999;
      backdrop-filter: blur(5px);
    }

    /* Mobile responsiveness */
    @media (max-width: 768px) {
      body {
        padding-left: 0;
      }

      .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-expanded);
        z-index: 1000;
      }

      .sidebar.mobile-open {
        transform: translateX(0);
      }

      .sidebar-overlay.show {
        display: block;
      }

      .mobile-sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .sidebar-brand {
        opacity: 1;
        transform: translateX(0);
      }

      .nav-text {
        opacity: 1;
        transform: translateX(0);
      }

      header {
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
        padding-top: 5rem;
      }

      header h1 {
        font-size: 2rem;
      }

      nav.categories {
        padding: 1.5rem 1rem;
      }

      nav button {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
      }

      section.games {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
        padding: 2rem 1rem;
      }

      .game-card:hover {
        transform: translateY(-5px);
      }
    }

    /* Extra small screens */
    @media (max-width: 480px) {
      header {
        padding-top: 4.5rem;
      }

      header h1 {
        font-size: 1.8rem;
      }
    }

    /* Loading animation for game cards */
    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(30px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    .game-card {
      animation: fadeInUp 0.6s ease forwards;
    }

    .game-card:nth-child(1) { animation-delay: 0.1s; }
    .game-card:nth-child(2) { animation-delay: 0.2s; }
    .game-card:nth-child(3) { animation-delay: 0.3s; }
    .game-card:nth-child(4) { animation-delay: 0.4s; }
    .game-card:nth-child(5) { animation-delay: 0.5s; }
    
    a {text-decoration: none;}