/* ===== CSS Design System for Facebook Name Style Generator v2 ===== */
/* Google Fonts loaded via <link preload> in HTML for performance */

/* === Design Tokens === */
:root {
    --bg-primary: hsl(225, 22%, 7%);
    --bg-surface: hsl(225, 20%, 11%);
    --bg-card: hsl(225, 18%, 15%);
    --bg-card-hover: hsl(225, 18%, 18%);
    --bg-input: hsl(225, 20%, 10%);
    --text-primary: hsl(0, 0%, 96%);
    --text-secondary: hsl(225, 12%, 58%);
    --text-muted: hsl(225, 10%, 42%);
    --accent: hsl(265, 90%, 62%);
    --accent-light: hsl(265, 85%, 72%);
    --accent-dark: hsl(265, 85%, 48%);
    --accent-glow: hsla(265, 90%, 62%, 0.25);
    --accent-gradient: linear-gradient(135deg, hsl(265, 90%, 62%), hsl(300, 80%, 58%));
    --success: hsl(155, 75%, 48%);
    --success-glow: hsla(155, 75%, 48%, 0.2);
    --warning: hsl(38, 90%, 55%);
    --danger: hsl(0, 75%, 55%);
    --border: hsla(225, 25%, 45%, 0.15);
    --border-hover: hsla(265, 90%, 62%, 0.3);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px var(--accent-glow);
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Outfit', sans-serif;
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --max-width: 1200px;
    --transition: 0.2s ease;
}

/* === Reset & Base === */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-main);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: var(--accent-light);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent);
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

input,
textarea {
    font-family: inherit;
}

/* === Typography === */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
}

h2 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    margin-top: var(--space-2xl);
}

h3 {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
}

p {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

/* === Layout === */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section {
    padding: var(--space-2xl) 0;
}

/* === Header / Navbar === */
.navbar {
    background: hsla(225, 22%, 7%, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: var(--space-md) 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-gradient);
    border-radius: 1px;
}

/* === More Tools Dropdown === */
.nav-dropdown {
    position: relative;
}

.nav-dropdown>a {
    cursor: pointer;
}

.nav-dropdown>a::after {
    content: ' ▾';
    font-size: 0.7em;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-sm) 0;
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    z-index: 200;
    animation: fadeInDown 0.2s ease;
    padding-top: calc(var(--space-sm) + 12px);
}

/* Bridge gap between trigger and dropdown so hover doesn't break */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}

/* Decorative arrow */
.dropdown-menu::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-bottom-color: var(--bg-surface);
    border-top: none;
}

.dropdown-menu a {
    display: block;
    padding: var(--space-sm) var(--space-lg);
    color: var(--text-secondary) !important;
    font-size: 0.85rem !important;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: var(--bg-card);
    color: var(--text-primary) !important;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.dropdown-open .dropdown-menu {
    display: block;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    z-index: 101;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* === Hero Section === */
.hero {
    text-align: center;
    padding: var(--space-3xl) 0 var(--space-xl);
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: -60%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero * {
    position: relative;
    z-index: 1;
}

.hero h1 {
    margin-bottom: var(--space-md);
}

.hero h1 .gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto var(--space-xl);
}

/* === Generator Input === */
.generator-input-wrapper {
    max-width: 640px;
    margin: 0 auto;
    position: relative;
}

.generator-input {
    width: 100%;
    padding: var(--space-lg) var(--space-xl);
    font-size: 1.15rem;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.generator-input::placeholder {
    color: var(--text-muted);
}

.generator-input:focus {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow), 0 0 40px var(--accent-glow);
}

.char-count {
    position: absolute;
    right: var(--space-lg);
    bottom: -24px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* === Category Filter Tabs === */
.filter-tabs {
    display: flex;
    gap: var(--space-sm);
    overflow-x: auto;
    padding: var(--space-lg) 0;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 700px;
    margin: 0 auto;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.filter-tab {
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    white-space: nowrap;
    transition: all var(--transition);
    flex-shrink: 0;
}

.filter-tab:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.filter-tab.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 12px var(--accent-glow);
}

/* === Action Bar (Copy All) === */
.action-bar {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
}

.action-btn {
    padding: var(--space-sm) var(--space-xl);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: all var(--transition);
}

.action-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.action-btn.copied {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

/* === Results Grid === */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
    padding: var(--space-md) 0;
}

.style-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    cursor: pointer;
    transition: all var(--transition);
    animation: fadeInUp 0.3s ease both;
}

.style-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.style-card.card-copied {
    border-color: var(--success) !important;
    box-shadow: 0 0 16px var(--success-glow) !important;
}

.style-card-content {
    flex: 1;
    min-width: 0;
}

.style-card-preview {
    font-size: 1.05rem;
    word-break: break-all;
    overflow-wrap: break-word;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    line-height: 1.4;
}

.style-card-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-actions {
    display: flex;
    gap: var(--space-xs);
    flex-shrink: 0;
}

.copy-btn,
.fav-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all var(--transition);
}

.copy-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.1);
}

.copy-btn.copied {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.fav-btn {
    font-size: 0.9rem;
}

.fav-btn:hover {
    border-color: hsl(340, 80%, 55%);
    color: hsl(340, 80%, 55%);
}

.fav-btn.fav-active {
    background: hsl(340, 70%, 50%);
    border-color: hsl(340, 70%, 50%);
    color: white;
}

.fav-btn.fav-pulse {
    animation: favPop 0.4s ease;
}

@keyframes favPop {
    0% {
        transform: scale(1)
    }

    50% {
        transform: scale(1.35)
    }

    100% {
        transform: scale(1)
    }
}

/* === Toast === */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--success);
    color: white;
    padding: var(--space-sm) var(--space-xl);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    z-index: 9999;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    box-shadow: 0 4px 20px var(--success-glow);
}

.toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-icon {
    font-size: 1.1rem;
}

/* === Recently Used & Favorites === */
.recent-section,
.favorites-section {
    padding: var(--space-xl) 0;
}

.recent-section h2,
.favorites-section h2 {
    margin-top: 0;
    margin-bottom: var(--space-md);
    font-size: 1.1rem;
}

.recent-strip,
.favorites-strip {
    display: flex;
    gap: var(--space-sm);
    overflow-x: auto;
    padding: var(--space-sm) 0;
    scrollbar-width: none;
}

.recent-strip::-webkit-scrollbar,
.favorites-strip::-webkit-scrollbar {
    display: none;
}

.recent-item {
    flex-shrink: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-sm) var(--space-md);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.recent-item:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
}

.fav-item {
    max-width: none;
    position: relative;
}

.fav-remove {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--bg-card-hover);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: var(--text-muted);
    transition: all var(--transition);
}

.fav-remove:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

/* === Sections: Popular, Trending, Symbols === */
.names-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-sm);
}

.name-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all var(--transition);
    font-size: 0.95rem;
    -webkit-tap-highlight-color: transparent;
}

.name-item:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.name-item:active {
    transform: scale(0.98);
}

.name-item .copy-icon {
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* === FAQ Accordion === */
.faq-list {
    max-width: 800px;
    margin: var(--space-lg) auto;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: var(--space-lg);
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-card);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.faq-question:hover {
    background: var(--bg-card-hover);
}

.faq-arrow {
    transition: transform var(--transition);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.faq-item.active .faq-arrow {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--bg-surface);
}

.faq-answer-inner {
    padding: var(--space-lg);
    color: var(--text-secondary);
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

/* === Guide Section === */
.guide-steps {
    max-width: 700px;
    margin: var(--space-lg) auto;
}

.guide-step {
    display: flex;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: white;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.step-content h3 {
    margin-bottom: var(--space-xs);
    font-size: 1.05rem;
}

.step-content p {
    font-size: 0.9rem;
}

/* === Footer === */
.footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    padding: var(--space-2xl) 0 var(--space-lg);
    margin-top: var(--space-3xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-col h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: var(--space-sm);
}

.footer-col a {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.footer-col a:hover {
    color: var(--accent-light);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* === Breadcrumbs === */
.breadcrumbs {
    padding: var(--space-md) 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.breadcrumbs a {
    color: var(--text-muted);
}

.breadcrumbs a:hover {
    color: var(--accent-light);
}

.breadcrumbs .separator {
    margin: 0 var(--space-xs);
}

/* === Blog Cards === */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-lg);
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition);
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

.blog-card-body {
    padding: var(--space-lg);
}

.blog-card-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent-light);
    background: var(--accent-glow);
    padding: 2px 8px;
    border-radius: var(--radius-xs);
    margin-bottom: var(--space-sm);
}

.blog-card h3 {
    font-size: 1.05rem;
    margin-bottom: var(--space-sm);
}

.blog-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* === Section Headers === */
.section-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.section-header h2 {
    margin-top: 0;
    margin-bottom: var(--space-sm);
}

.section-header p {
    max-width: 550px;
    margin: 0 auto;
    font-size: 0.95rem;
}

/* === SEO Content === */
.seo-content {
    max-width: 800px;
    margin: 0 auto;
}

.seo-content h2 {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
}

.seo-content p {
    font-size: 0.95rem;
    line-height: 1.8;
}

.seo-content ul,
.seo-content ol {
    padding-left: var(--space-xl);
    margin: var(--space-md) 0;
}

.seo-content li {
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    font-size: 0.95rem;
}

/* === Internal Link Cards === */
.internal-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-md);
    margin: var(--space-xl) 0;
}

.internal-link-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-align: center;
    transition: all var(--transition);
    display: block;
}

.internal-link-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.internal-link-card .link-icon {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
    display: block;
}

.internal-link-card h3 {
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* === Legal Pages === */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-xl) 0;
}

.legal-content h1 {
    margin-bottom: var(--space-xl);
}

.legal-content h2 {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
    font-size: 1.3rem;
}

.legal-content p,
.legal-content li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
}

.legal-content ul {
    padding-left: var(--space-xl);
    margin: var(--space-md) 0;
}

.legal-content li {
    margin-bottom: var(--space-sm);
}

/* === Admin Dashboard === */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-align: center;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    font-family: var(--font-display);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: var(--space-xs);
}

.admin-btn {
    padding: var(--space-sm) var(--space-xl);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
}

.admin-btn-primary {
    background: var(--accent-gradient);
    color: white;
}

.admin-btn-primary:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.admin-btn-danger {
    background: var(--danger);
    color: white;
}

.admin-btn-danger:hover {
    opacity: 0.9;
}

.admin-btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.admin-btn-secondary:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.posts-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: var(--space-md);
}

.posts-table th,
.posts-table td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.posts-table th {
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.posts-table td {
    color: var(--text-secondary);
}

.posts-table tr:hover td {
    background: var(--bg-card);
}

.post-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.post-status.published {
    background: var(--success-glow);
    color: var(--success);
}

.post-status.draft {
    background: hsla(38, 90%, 55%, 0.15);
    color: var(--warning);
}

.editor-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
    margin-top: var(--space-lg);
}

.editor-form input[type="text"],
.editor-form textarea,
.editor-form select {
    width: 100%;
    padding: var(--space-md);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: border-color var(--transition);
}

.editor-form input:focus,
.editor-form textarea:focus,
.editor-form select:focus {
    border-color: var(--accent);
}

.editor-form textarea {
    min-height: 320px;
    resize: vertical;
    font-family: monospace;
    line-height: 1.6;
}

.editor-toolbar {
    display: flex;
    gap: var(--space-xs);
    padding: var(--space-sm);
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    flex-wrap: wrap;
}

.toolbar-btn {
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-xs);
    font-size: 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: all var(--transition);
}

.toolbar-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.editor-form textarea.with-toolbar {
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

/* === Contact Form === */
.contact-form {
    max-width: 600px;
    margin: var(--space-xl) auto;
}

.contact-form .form-group {
    margin-bottom: var(--space-lg);
}

.contact-form label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: var(--space-xs);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: var(--space-md);
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: border-color var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--accent);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form .submit-btn {
    padding: var(--space-md) var(--space-2xl);
    background: var(--accent-gradient);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition);
}

.contact-form .submit-btn:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

/* === Animations === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

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

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* === Mobile: 768px === */
@media (max-width: 768px) {

    /* Mobile overlay behind menu */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 99;
    }

    .nav-overlay.active {
        display: block;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        height: 100dvh;
        width: 300px;
        max-width: 85vw;
        flex-direction: column;
        background: var(--bg-primary);
        border-left: 1px solid var(--border);
        padding: 60px var(--space-md) var(--space-md) !important;
        z-index: 101;
        box-shadow: -4px 0 30px rgba(0, 0, 0, 0.4);
        overflow-y: auto;
        gap: 0 !important;
        margin: 0 !important;
    }

    .nav-links.open {
        display: flex;
        animation: slideInRight 0.25s ease;
    }

    @keyframes slideInRight {
        from {
            transform: translateX(100%);
        }

        to {
            transform: translateX(0);
        }
    }

    .hamburger {
        display: flex;
        z-index: 102;
    }

    /* Mobile dropdown: collapsible */
    .nav-dropdown .dropdown-menu {
        display: none;
        position: static;
        transform: none;
        background: rgba(255, 255, 255, 0.04);
        border: none;
        border-radius: var(--radius-sm);
        padding: var(--space-xs) 0;
        min-width: auto;
        box-shadow: none;
        animation: none;
        padding-left: var(--space-md);
        margin-top: var(--space-xs);
    }

    .nav-dropdown .dropdown-menu::before,
    .nav-dropdown .dropdown-menu::after {
        display: none;
    }

    .nav-dropdown.mobile-open .dropdown-menu {
        display: block;
    }

    .nav-dropdown .dropdown-menu a {
        padding: var(--space-sm) var(--space-sm);
        font-size: 0.85rem !important;
        border-radius: var(--radius-sm);
    }

    .nav-dropdown>a::after {
        content: ' ▾';
        font-size: 0.7em;
        transition: transform 0.2s ease;
        display: inline-block;
    }

    .nav-dropdown.mobile-open>a::after {
        transform: rotate(180deg);
    }

    .nav-links li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding-bottom: 0;
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        font-size: 0.95rem;
        padding: 10px 8px;
        display: block;
        color: rgba(255, 255, 255, 0.85) !important;
        min-height: 40px;
        line-height: 1.3;
    }

    .nav-links a:hover,
    .nav-links a.active {
        color: #fff !important;
    }

    .nav-links .nav-dropdown>a {
        color: rgba(255, 255, 255, 0.85) !important;
    }

    .nav-dropdown.mobile-open>a {
        color: var(--accent) !important;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .names-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: var(--space-xl) 0 var(--space-md);
    }

    .hero::before {
        width: 300px;
        height: 300px;
    }

    .generator-input {
        font-size: 1rem;
        padding: var(--space-md) var(--space-lg);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .internal-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-tabs {
        justify-content: flex-start;
        flex-wrap: nowrap;
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }

    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .admin-header {
        flex-direction: column;
        gap: var(--space-md);
        align-items: flex-start;
    }

    .posts-table {
        font-size: 0.8rem;
    }

    .posts-table th,
    .posts-table td {
        padding: var(--space-sm);
    }

    .style-card {
        padding: var(--space-md);
    }

    .style-card-preview {
        font-size: 0.95rem;
    }

    .copy-btn,
    .fav-btn {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }

    .name-item {
        padding: var(--space-md);
        min-height: 48px;
    }

    .faq-question {
        padding: var(--space-md);
        font-size: 0.95rem;
    }
}

/* === Mobile: 480px === */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-md);
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .internal-links {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    .action-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-stats {
        grid-template-columns: 1fr;
    }
}

/* === Mobile: 320px === */
@media (max-width: 375px) {
    .style-card {
        gap: var(--space-sm);
    }

    .filter-tab {
        padding: var(--space-xs) var(--space-md);
        font-size: 0.78rem;
    }

    .generator-input {
        padding: var(--space-sm) var(--space-md);
        font-size: 0.9rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }
}

/* === Back to Top Button === */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.6);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 16px;
        right: 16px;
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
}

/* === Utility === */
.text-center {
    text-align: center;
}

.text-accent {
    color: var(--accent-light);
}

.mt-sm {
    margin-top: var(--space-sm);
}

.mt-md {
    margin-top: var(--space-md);
}

.mt-lg {
    margin-top: var(--space-lg);
}

.mb-md {
    margin-bottom: var(--space-md);
}

.mb-lg {
    margin-bottom: var(--space-lg);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* === CLS Prevention (PageSpeed Optimization) === */
.hero {
    min-height: 320px;
    contain: layout style;
}

@media (max-width: 768px) {
    .hero {
        min-height: 260px;
    }
}

.filter-tabs {
    min-height: 56px;
    contain: layout style;
}

.results-grid {
    min-height: 600px;
    contain: layout style;
}

.action-bar {
    min-height: 50px;
    contain: layout style;
}

.generator-input-wrapper {
    min-height: 62px;
}

.navbar {
    min-height: 60px;
    contain: layout style;
}

.navbar .container {
    min-height: 36px;
}

/* Hide skeleton when real content loads */
.skeleton-placeholder {
    animation: pulse 1.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    from {
        opacity: 0.15;
    }

    to {
        opacity: 0.35;
    }
}

/* Below-fold optimization */
.seo-section,
.trending-names,
.about-section {
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

/* Style cards — prevent reflow */
.style-card {
    contain: layout style;
    min-height: 90px;
}