/* --- 1. CORE VARIABLES & RESET --- */
:root {
  --bg-color: #0d1117;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --solid-bg: #161b22;
  --text-white: #ffffff;
  --text-gray: #cbd5e1; 
  --accent-purple: #a855f7;
  --accent-blue: #3b82f6;
}

* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
}

body { 
  font-family: "Poppins", sans-serif; 
  background-color: var(--bg-color); 
  color: var(--text-white); 
  min-height: 100vh; 
  overflow-x: hidden; 
  -webkit-font-smoothing: antialiased;
}

/* --- PERFORMANCE: PREVENT LAYOUT SHIFTS --- */
#site-header { 
  min-height: 80px; 
  display: block;
}

.main-container {
  padding: 2rem 5%;
  display: block;
  contain: layout; 
  width: 100%;
  max-width: 100vw;
  overflow: hidden; 
}

/* --- TYPOGRAPHY --- */
h1 {
  font-size: 2.5rem;
  line-height: 1.2;
  font-weight: 700;
}

section h1, article h1, nav h1, aside h1 {
  font-size: 2.2rem;
}

article {
  line-height: 1.8; 
  margin-top: 2rem;
}

/* --- 2. BACKGROUND GLOWS --- */
.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  opacity: 0.3;
  pointer-events: none;
  transform: translateZ(0); /* GPU acceleration */
  will-change: transform;
}
.orb-purple { width: 40vw; height: 40vw; background: #6366f1; top: -10%; left: -10%; }
.orb-blue { width: 35vw; height: 35vw; background: #3b82f6; bottom: -5%; right: -5%; }

/* --- UPDATED HEADER & NAVBAR --- */
header { 
    padding: 1rem 5%; 
    position: relative; 
    z-index: 2000; 
}

.logo {
    display: flex;
    align-items: center;
    /* This ensures the logo stays perfectly middle vertically */
    height: 100%; 
}

.logo a {
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 800; /* Extra bold for "ELITE" */
    color: #ffffff;
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    line-height: 1; /* Removes extra vertical space from font */
}

.logo span {
    color: #3b82f6; /* A clean, solid blue */
    font-weight: 300; /* Thin for "NAMEHUB" to create contrast */
    margin-left: 2px;
}

/* Hover effect is just a simple color change (very light on CPU) */
.logo a:hover {
    color: #3b82f6;
}

.logo a:hover span {
    color: #ffffff;
}

/* Mobile: Slightly smaller so it doesn't push the hamburger menu */


.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
}

/* --- HAMBURGER ICON --- */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 2100;
}

.mobile-menu-toggle .bar {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: 0.3s;
}



.nav-links { display: flex; list-style: none; gap: 2rem; align-items: center; }
.nav-links a { 
  text-decoration: none; 
  color: white; 
  font-weight: 500; 
  font-size: 0.95rem; 
  transition: color 0.2s ease; 
}
.nav-links a.active { color: #38bdf8; border-bottom: 2px solid #38bdf8; }

.dropdown { position: relative; }
.dropdown-content {
  display: block; 
  visibility: hidden;
  opacity: 0;
  position: absolute;
  background-color: var(--solid-bg);
  min-width: 220px;
  box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.6);
  border-radius: 12px;
  top: 115%;
  left: 0;
  border: 1px solid var(--glass-border);
  z-index: 1001;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none;
}

.dropdown-content::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 0;
  width: 100%;
  height: 25px;
}

.dropdown:hover .dropdown-content {
  visibility: visible;
  opacity: 1;
  top: 100%;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-content a { 
  color: white; 
  padding: 12px 20px; 
  display: block; 
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.dropdown-content a:hover { background: rgba(255,255,255,0.05); color: #38bdf8; }

/* --- 4. CARDS & SECTIONS --- */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 45px; 
  margin-bottom: 2rem;
  overflow: hidden; /* Prevent content-push CLS */
}

.glass-card h1, .glass-card h2, .glass-card h3 { margin-bottom: 1.5rem; color: #fff; }
.glass-card p { margin-bottom: 1.2rem; line-height: 1.8; color: #cbd5e1; }

.about-section li { margin-top: 15px; color: var(--text-gray); }
.about-section ul { margin-bottom: 15px; }

/* --- 5. GAMING NAME GRID (FIXED FOR CLS) --- */
.name-grid-container {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
  gap: 12px !important;
  min-height: 400px !important; /* Performance: Space reservation */
  max-height: 450px !important;
  padding: 25px !important;
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: 15px !important;
  overflow-y: auto;
  margin: 2rem 0;
}

.name-grid-container span {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s;
  /* PERFORMANCE FIX: Prevent long names from stretching the grid */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.name-grid-container span:hover {
  background: var(--accent-purple);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(168, 85, 247, 0.3);
}

.name-grid-container::-webkit-scrollbar { width: 6px; }
.name-grid-container::-webkit-scrollbar-thumb { background: var(--accent-purple); border-radius: 10px; }

/* --- 6. FAQ SECTION --- */
.faq-section {
  margin-top: 6rem !important;
  padding: 3.5rem; 
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-radius: 30px; 
  border: 1px solid var(--glass-border);
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.faq-section h2 { margin-bottom: 10px; }

.faq-item { 
  border-bottom: 1px solid rgba(255,255,255,0.05); 
  margin-bottom: 15px;
  padding: 1.5rem 2rem;
  cursor: pointer;
  text-align: left;
}

.faq-question { padding: 1.5rem 0; cursor: pointer; display: flex; justify-content: space-between; font-weight: 600; }

.faq-answer {
  display: none;
  margin-top: 15px;
  color: var(--text-gray);
}

/* --- 7. FOOTER --- */
.footer {
  padding: 30px 0;
  margin-top: 80px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--glass-border);
}

.footer-grid {
  max-width: 1200px;
  margin: auto;
  padding: 0 25px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}

.footer-left { font-size: 0.85rem; color: #cbd5e1; }
.footer-center { display: flex; gap: 16px; justify-content: center; }
.footer-center img { width: 22px; height: 22px; transition: transform 0.2s; }
.footer-center img:hover { transform: scale(1.2); }
.footer-right { text-align: right; }
.footer-right a { margin-left: 16px; font-size: 0.85rem; color: #cbd5e1; text-decoration: none; }
.footer-right a:hover { text-decoration: underline; }

/* --- 8. RUNE CARDS --- */
.glass-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.glass-rune {
    position: relative;
    clip-path: polygon(10% 0, 100% 0, 100% 90%, 90% 100%, 0 100%, 0 10%);
    background: rgba(20, 20, 25, 0.85); 
    @supports (backdrop-filter: blur(15px)) {
        background: rgba(255, 255, 255, 0.03);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px 25px;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    will-change: transform;
}

.glass-rune::before {
    content: "";
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: 0.5s;
}
.glass-rune:hover::before { left: 100%; }
.glass-rune:hover {
    transform: translateY(-10px) scale(1.02);
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.07);
}

.rune-glow {
    position: absolute; bottom: -20px; right: -20px; width: 100px; height: 100px;
    border-radius: 50%; filter: blur(40px); z-index: -1; opacity: 0.5;
    transition: transform 0.4s ease, opacity 0.4s ease;
}
.glass-rune:hover .rune-glow { transform: scale(1.5); opacity: 0.8; }

.void-glass .rune-glow { background: #a855f7; }
.void-glass h3 { color: #d8b4fe; text-shadow: 0 0 10px rgba(168, 85, 247, 0.5); }
.void-glass .btn-glass { background: rgba(168, 85, 247, 0.1); border-color: #a855f7; color: #d8b4fe; }

.frost-glass .rune-glow { background: #06b6d4; }
.frost-glass h3 { color: #a5f3fc; text-shadow: 0 0 10px rgba(6, 182, 212, 0.5); }
.frost-glass .btn-glass { background: rgba(6, 182, 212, 0.1); border-color: #06b6d4; color: #a5f3fc; }

.blaze-glass .rune-glow { background: #ef4444; }
.blaze-glass h3 { color: #fecaca; text-shadow: 0 0 10px rgba(239, 68, 68, 0.5); }
.blaze-glass .btn-glass { background: rgba(239, 68, 68, 0.1); border-color: #ef4444; color: #fecaca; }

.rune-icon { font-size: 3rem; margin-bottom: 20px; filter: drop-shadow(0 0 15px rgba(255,255,255,0.2)); }
.glass-rune h3 { font-family: 'Cinzel', serif; font-size: 1.4rem; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 1px; }
.glass-rune p { color: #cbd5e1; font-size: 0.9rem; line-height: 1.6; margin-bottom: 30px; }
.btn-glass { text-decoration: none; padding: 12px 25px; font-size: 0.8rem; font-weight: bold; text-transform: uppercase; letter-spacing: 2px; border: 1px solid; border-radius: 4px; transition: all 0.3s ease; }
.btn-glass:hover { transform: scale(1.05); box-shadow: 0 0 20px currentColor; color: #fff !important; }

/* --- 9. HERO & CATEGORY --- */
.hero-section { margin-bottom: 3rem; text-align: left; }
.hero-section h1 { font-size: 2.8rem; line-height: 1.2; margin-bottom: 0.5rem; }
.hero-section h2 { font-size: 1.4rem; font-weight: 500; color: var(--text-gray); margin-bottom: 1rem; }
.hero-section p { color: var(--text-gray); font-size: 1.1rem; }

.grid-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-bottom: 4rem; }

.blog-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Always 3 columns per row */
  gap: 30px; /* Space between articles */
  justify-items: start; /* Align articles to start, not stretched */
  align-items: start;
}

/* Optional: make cards take full column width if needed */
.blog-container article {
  width: 100%;
   min-height: 360px; /* Reserve vertical space to avoid layout shifts */
}

.gen-card {
  background: var(--glass-bg); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
  border: 1px solid var(--glass-border); padding: 2.2rem; border-radius: 25px;
  transition: 0.3s ease; border-bottom: 5px solid transparent;
  display: flex; flex-direction: column; align-items: flex-start;
}
.gen-card:hover { transform: translateY(-5px); background: rgba(255, 255, 255, 0.07); }
.icon-box { width: 55px; height: 55px; background: rgba(255, 255, 255, 0.05); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; margin-bottom: 1.2rem; }
.gen-card h3 { margin-bottom: 0.5rem; }
.gen-card p { color: var(--text-gray); font-size: 0.95rem; margin-bottom: 1.5rem; line-height: 1.5; }

.theme-purple { border-bottom-color: #a855f7; }
.theme-pink { border-bottom-color: #ec4899; }
.theme-teal { border-bottom-color: #14b8a6; }
.theme-magenta { border-bottom-color: #d946ef; }
.theme-blue { border-bottom-color: #3b82f6; }
.theme-green { border-bottom-color: #10b981; }

.launch-btn {
  margin-top: auto; background: rgba(255, 255, 255, 0.1); color: white;
  text-decoration: none; padding: 12px 24px; border-radius: 50px;
  font-weight: 600; display: inline-block; transition: 0.3s; width: 100%; text-align: center;
}
.launch-btn:hover { background: white; color: black; }

.section-intro { margin: 3rem 0 1.5rem; text-align: center; }
.section-intro h2 { font-size: 1.8rem; font-weight: 700; letter-spacing: -0.02em; }

/* --- 10. INPUTS & FILTERS --- */
.input-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 15px; }
.filter-align { display: flex; gap: 15px; margin-top: 10px; }
.input-group1 { display: flex; gap: 15px; margin-top: 10px; } 

/* --- 11. BREADCRUMBS --- */
.breadcrumb { min-height: 24px; margin-bottom: 10px; padding: 0 20px; font-size: 14px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.breadcrumb li { display: flex; align-items: center; color: #b5b5b5; line-height: 1.6; word-break: break-word; }
.breadcrumb li a { color: #cfcfff; text-decoration: none; transition: color 0.2s ease; }
.breadcrumb li a:hover { color: #ffffff; text-decoration: underline; }
.breadcrumb li + li::before { content: "›"; margin: 0 6px; color: #777; }
.breadcrumb li[aria-current="page"] { color: #ffffff; font-weight: 500; }

/* --- 12. MISC CLASSES --- */
li { color: var(--text-gray); }
ul { margin-bottom: 1rem; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 1.5rem; }

.gen-results h2 { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

.email-link { color: #b197ff; font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(124, 92, 255, 0.4);}
.email-link:hover { color: #ffffff; background: linear-gradient(90deg, #7c5cff, #00d4ff); padding: 2px 6px; border-radius: 6px; border-bottom: none; }

.content-link { color: #4da6ff; font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(124, 92, 255, 0.4);}


.content-link:hover {
  color: #b197ff;
  padding: 2px 6px;
  border-radius: 6px;
  border-bottom: none;
}


.privacy-note { font-size: 0.9rem; color: #64748b; margin-top: 20px; }
.popular-generators { margin-top: 30px; }
.popular-generators a { display: inline-block; margin: 5px 10px 5px 0; color: #7c3aed; text-decoration: underline; }

/* --- 13. CONTENT VISIBILITY (PERFORMANCE) --- */
.about-section, .related-generators, .faq-section { content-visibility: auto; contain-intrinsic-size: 1px 500px; }

.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 10px;
    margin: 50px 0;
    padding: 0;
}

.section-divider{
  margin-bottom: 2rem;
}


@media (max-width: 1024px) {
    /* 1. NAVBAR: Logo & Hamburger Aligned */
    .navbar {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important; 
        align-items: center !important;
        width: 100% !important;
        height: 70px !important;
        padding: 0 1.5rem !important;
        box-sizing: border-box;
        background: #0d1117;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    @media (max-width: 1024px) {
    
      .logo a {
        font-size: 1.1rem;
        letter-spacing: 0.5px;
    }
    /* ... your existing navbar and sidebar code ... */

    /* THE FIX: Hide the arrow span on mobile */
    .nav-arrow {
        display: none !important;
    }

    /* Extra safety: if you have any CSS-generated arrows, hide them too */
    .dropbtn::after {
        display: none !important;
    }
}

    /* 2. SIDEBAR: The Top-Aligned Drawer */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%; 
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: #0d1117; 
        
        /* THE FIX: Alignment */
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important; /* Categories start at the top */
        align-items: stretch !important;        /* Links take full width */
        
        /* Padding: 80px top to clear the toggle button area */
        padding: 80px 0 2rem 0 !important; 
        
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -20px 0 40px rgba(0,0,0,0.7);
        overflow-y: auto; 
        z-index: 2050;
    }

    .nav-links.active { right: 0; }

    /* 3. LIST ITEMS: Wide Tap Targets */
    .nav-links li {
        width: 100%;
        list-style: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-links a, .dropbtn {
        padding: 18px 25px !important; /* Large area for fingers */
        display: block !important;
        width: 100%;
        color: #ffffff !important;
        font-size: 1.1rem;
        text-decoration: none;
        box-sizing: border-box;
        transition: background 0.2s;
    }

    .nav-links a:active {
        background: rgba(255, 255, 255, 0.05);
    }

    /* 4. PREVIOUS FUNCTIONALITY: Direct Navigation */
    /* We hide the dropdown content to focus on the Category Page link */
    .dropdown-content {
        display: none !important;
    }

    /* Hamburger Animation Logic */
    .mobile-menu-toggle { display: flex !important; z-index: 2100; }
    .mobile-menu-toggle.open .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .mobile-menu-toggle.open .bar:nth-child(2) { opacity: 0; }
    .mobile-menu-toggle.open .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}
/* --- 14. 100% RESPONSIVE BREAKPOINTS --- */
@media (max-width: 992px) {
  .footer-grid { grid-template-columns: 1fr; text-align: center; gap: 30px; }
  .footer-right { text-align: center; }
  .hero-section h1 { font-size: 2.2rem; }
  .info-grid { grid-template-columns: 1fr; }
    .blog-container {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
  .blog-container article {
    min-height: 340px;
  }

}

@media (max-width: 768px) {
  @media (max-width: 768px) {
  header { 
    padding: 1rem 3%; 
    /* BOLT 1: LOCK THE HEIGHT
       If your mobile header looks like it's about 150px tall, set this. 
       This stops the main-container from jumping when the page loads. */
    min-height: 155px; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    
    /* BOLT 2: CONTAINMENT
       This tells the browser: "Don't recalculate the whole page when 
       the navbar items load." This is the key to 100% score. */
    contain: layout size; 
  }

  .navbar { 
    flex-direction: column; 
    border-radius: 20px; 
    padding: 1.2rem; 
    gap: 15px; 
    width: 100%;
    
    /* BOLT 3: GPU ACCELERATION
       Ensures the 'glass' blur doesn't slow down the mobile CPU. */
    transform: translateZ(0);
    will-change: transform;
  }

  .nav-links { 
    flex-wrap: wrap; 
    justify-content: center; 
    gap: 12px; 
  }

  /* Ensure the breadcrumb doesn't hide */
  .breadcrumb { 
    font-size: 13px; 
    margin: 15px auto 8px; 
    position: relative;
    z-index: 10;
  }
  .pagination { flex-wrap: wrap; }
}

  /* Rest of your classes remain untouched */
  .glass-card { padding: 30px 20px; }
  .name-grid-container { grid-template-columns: repeat(2, 1fr) !important; }
  .faq-section { padding: 2rem 1.5rem; }
  .grid-container { grid-template-columns: 1fr; }
  .hero-section { text-align: center; }
  .hero-section h1 { font-size: 1.8rem; }
  .glass-grid { grid-template-columns: 1fr; padding: 0 15px; }
  .section-intro h2 { font-size: 1.5rem; }
  .breadcrumb ol { gap: 4px; }
  .breadcrumb li + li::before { margin: 0 4px; }
   .blog-container {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
  .blog-container article {
    min-height: 320px;
  }
}

@media (max-width: 480px) {
  .name-grid-container { grid-template-columns: 1fr !important; }
  .breadcrumb { font-size: 12px; }
   .blog-container {
    grid-template-columns: 1fr; /* Single column on small screens */
  }
  .blog-container article {
    min-height: 280px;
  }
}