@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;600;700;800&display=swap');

:root {
    --primary: #10b981; /* Teal from fontgen.cool */
    --primary-hover: #059669;
    --navy: #18222c;
    --navy-light: #64748b;
    --border-color: rgba(0, 0, 0, 0.06);
    --bg-light: #ffffff;
    --bg-dark: #0f172a;
    --text-light: #18222c;
    --text-dark: #f1f5f9;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    
    /* Animation */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-light);
    line-height: 1.6;
    transition: var(--transition);
}

body.dark-mode {
    background-color: var(--bg-dark);
    color: var(--text-dark);
    --border-color: rgba(255, 255, 255, 0.06);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.main-header {
    background: var(--bg-light);
    border-bottom: 0.9px solid var(--border-color);
    position: relative;
    z-index: 1000;
    height: 72px;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

body.dark-mode .main-header {
    background: var(--bg-dark);
}

.header-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--navy);
}

body.dark-mode .logo-link {
    color: #ffffff;
}

.sparkle-icon {
    color: var(--primary);
    font-size: 1.2rem;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--navy-light);
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
}

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

body.dark-mode .nav-links a {
    color: #94a3b8;
}

body.dark-mode .nav-links a:hover, body.dark-mode .nav-links a.active {
    color: #ffffff;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--navy-light);
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--navy);
}

body.dark-mode .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

/* Hero Section */
.hero {
    padding: 48px 0 32px;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.025em;
}

.gradient-text {
    background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.1rem;
    color: var(--navy-light);
    max-width: 600px;
    margin: 0 auto 24px;
}

/* Input Styles */
.input-section {
    max-width: 800px;
    margin: 0 auto;
    position: sticky;
    top: 0; /* Sticky at very top */
    z-index: 900;
    background: var(--bg-light);
    padding: 20px 0;
    margin-top: -10px;
}

body.dark-mode .input-section {
    background: var(--bg-dark);
}

/* Add a subtle shadow when sticky (optional, but looks better with backdrop-filter) */
@supports (backdrop-filter: blur(10px)) {
    .input-section {
        background: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    body.dark-mode .input-section {
        background: rgba(15, 23, 42, 0.8);
    }
}

.input-container {
    position: relative;
    margin-bottom: 20px;
}

.main-input {
    width: 100%;
    padding: 24px 32px;
    font-size: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: #f8fafc;
    color: var(--navy);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

body.dark-mode .main-input {
    background: #1e293b;
    color: #ffffff;
}

.main-input:focus {
    outline: none;
    border-color: var(--primary);
    background: #ffffff;
}

body.dark-mode .main-input:focus {
    background: #0f172a;
}

.clear-btn {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--navy-light);
    cursor: pointer;
    display: none;
    padding: 8px;
    border-radius: 50%;
}

.clear-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Filter Bar */
.tools-bar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 40px;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.filter-chip {
    padding: 8px 18px;
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    border-radius: 99px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--navy-light);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.dark-mode .filter-chip {
    background: #1e293b;
    color: #94a3b8;
}

.filter-chip:hover, .filter-chip.active {
    background: var(--navy);
    color: #ffffff;
    border-color: var(--navy);
}

body.dark-mode .filter-chip:hover, body.dark-mode .filter-chip.active {
    background: #ffffff;
    color: var(--navy);
    border-color: #ffffff;
}

.size-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--navy-light);
}

#sizeSlider {
    width: 200px;
    accent-color: var(--primary);
}

/* Font Grid */
.font-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.font-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 24px;
    position: relative;
    transition: var(--transition);
    cursor: pointer;
}

body.dark-mode .font-card {
    background: #1e293b;
}

.font-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

.font-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--navy-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.font-output {
    font-size: 1.5rem;
    word-break: break-all;
    min-height: 2em;
    color: var(--navy);
    transition: var(--transition);
}

body.dark-mode .font-output {
    color: #ffffff;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    background: none;
    border: 1px solid var(--border-color);
    padding: 8px;
    border-radius: 10px;
    cursor: pointer;
    color: var(--navy-light);
    transition: var(--transition);
}

.action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.action-btn.fav.active {
    color: #ef4444;
    border-color: #ef4444;
}

.copy-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--navy);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 99px;
    font-size: 0.9rem;
    font-weight: 700;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
    z-index: 10;
}

body.dark-mode .copy-badge {
    background: var(--primary);
}

.font-card.copied .copy-badge {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.font-card.copied .font-output {
    opacity: 0.2;
    filter: blur(2px);
}

/* Footer */
.main-footer {
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-row {
    margin-bottom: 16px;
}

.copyright {
    color: var(--navy-light);
    font-weight: 500;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    color: var(--navy-light);
}

.footer-links a {
    text-decoration: none;
    color: var(--navy-light);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--navy);
}

body.dark-mode .footer-links a:hover {
    color: #ffffff;
}

.dot {
    opacity: 0.5;
}

/* Scroll Top */
.scroll-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 100;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-4px);
    background: var(--primary-hover);
}

/* Ad Unit */
.adsense-wrap {
    margin: 40px auto;
    max-width: 960px;
    text-align: center;
}
.ad-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--navy-light);
    opacity: 0.5;
    margin-bottom: 6px;
}

/* Load More */
.load-more-container {
    display: flex;
    justify-content: center;
    margin: 40px 0 80px;
}

.btn-load-more {
    padding: 16px 48px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 99px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

body.dark-mode .btn-load-more {
    background: #1e293b;
    color: #ffffff;
}

.btn-load-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

/* Mobile Menu Styling */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-bar {
    width: 100%;
    height: 2px;
    background-color: var(--navy);
    transition: var(--transition);
}

body.dark-mode .menu-bar {
    background-color: #ffffff;
}

/* --- Desktop Dropdown --- */
.nav-dropdown {
    position: relative;
    cursor: pointer;
}

.dropdown-trigger {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--navy-light);
    display: flex;
    align-items: center;
    gap: 4px;
}

body.dark-mode .dropdown-trigger {
    color: #94a3b8;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    list-style: none;
    padding: 8px 0;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 1000;
}

body.dark-mode .dropdown-menu {
    background: #1e293b;
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    display: block;
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--navy);
    font-size: 0.9rem;
    font-weight: 500;
}

body.dark-mode .dropdown-menu a {
    color: #e2e8f0;
}

.dropdown-menu a:hover {
    background: var(--bg-light);
    color: var(--primary);
}

body.dark-mode .dropdown-menu a:hover {
    background: rgba(255,255,255,0.05);
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: #ffffff;
    z-index: 2000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 24px;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
}

body.dark-mode .mobile-drawer {
    background: var(--bg-dark);
}

.mobile-drawer.open {
    transform: translateX(-300px);
}

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

.close-drawer {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--navy-light);
    cursor: pointer;
}

.mobile-nav ul {
    list-style: none;
}

.mobile-nav li {
    margin-bottom: 24px;
}

.mobile-nav a {
    text-decoration: none;
    color: var(--navy);
    font-size: 1.2rem;
    font-weight: 600;
    transition: var(--transition);
}

body.dark-mode .mobile-nav a {
    color: #ffffff;
}

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.drawer-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* EEAT Section */
.eeat-section {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 32px;
    border-radius: 20px;
    margin: 40px 0;
    text-align: left;
}

.eeat-badge {
    display: inline-block;
    background: var(--primary);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.eeat-section h3 {
    margin-bottom: 12px;
    font-size: 1.5rem;
}

.eeat-features {
    display: flex;
    gap: 24px;
    margin-top: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary);
}

/* =====================================================
   STATIC PAGES (About, Privacy, etc.)
   ===================================================== */
.page-content {
    max-width: 800px;
    margin: 60px auto 100px;
    padding: 0 20px;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 40px;
    color: var(--navy);
    letter-spacing: -0.02em;
}

body.dark-mode .page-title {
    color: #ffffff;
}

.card-glass {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.02);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--navy-light);
}

body.dark-mode .card-glass {
    background: #1e293b;
    border-color: rgba(255,255,255,0.05);
    color: #cbd5e1;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

@supports (backdrop-filter: blur(10px)) {
    .card-glass {
        background: rgba(255, 255, 255, 0.7);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
    body.dark-mode .card-glass {
        background: rgba(30, 41, 59, 0.7);
    }
}

.card-glass h2 {
    font-size: 1.5rem;
    color: var(--navy);
    margin: 40px 0 16px;
    font-weight: 700;
}

body.dark-mode .card-glass h2 {
    color: #ffffff;
}

.card-glass p {
    margin-bottom: 20px;
}

.card-glass ul {
    margin-bottom: 24px;
    padding-left: 20px;
}

.card-glass li {
    margin-bottom: 12px;
}

/* SEO Content Section */
.seo-content {
    margin-top: 80px;
    padding-top: 80px;
    border-top: 1px solid var(--border-color);
}

.content-image-wrapper {
    margin: 40px 0;
    text-align: center;
}

.content-image-wrapper img {
    max-width: 100%;
    height: auto;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

body.dark-mode .content-image-wrapper img {
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.guides-section {
    max-width: 900px;
    margin: 0 auto;
}

.guides-section h2 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 32px;
    color: var(--navy);
}

body.dark-mode .guides-section h2 {
    color: #ffffff;
}

.guides-section h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 48px 0 24px;
    color: var(--navy);
}

body.dark-mode .guides-section h3 {
    color: #ffffff;
}

.guides-section p {
    font-size: 1.1rem;
    color: var(--navy-light);
    margin-bottom: 24px;
    line-height: 1.8;
}

body.dark-mode .guides-section p {
    color: #94a3b8;
}

.guides-section ul, .guides-section ol {
    margin-bottom: 32px;
    padding-left: 24px;
}

.guides-section li {
    font-size: 1.1rem;
    color: var(--navy-light);
    margin-bottom: 12px;
    line-height: 1.6;
}

body.dark-mode .guides-section li {
    color: #94a3b8;
}

/* SEO Grid */
.seo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin: 40px 0;
}

.seo-item {
    background: #f8fafc;
    padding: 32px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

body.dark-mode .seo-item {
    background: #1e293b;
}

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

.seo-item h3, .seo-item h4 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 1.25rem;
}

/* FAQ Styling */
.faq-section {
    margin-top: 60px;
}

.faq-item {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 16px;
}

body.dark-mode .faq-item {
    background: #1e293b;
}

.faq-item h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 12px;
}

body.dark-mode .faq-item h4 {
    color: #ffffff;
}

.faq-item h4::before {
    content: "Q:";
    color: var(--primary);
    font-weight: 800;
}

/* Step Grid */
.step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.step-card {
    position: relative;
    padding: 40px 32px 32px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
}

body.dark-mode .step-card {
    background: #1e293b;
}

.step-num {
    position: absolute;
    top: -12px;
    left: 32px;
    background: var(--primary);
    color: #ffffff;
    padding: 4px 16px;
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 800;
}

/* =====================================================
   NEW UX FEATURE STYLES
   ===================================================== */

/* --- Toast Notification --- */
.toast-notification {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: var(--navy);
    color: #fff;
    padding: 12px 24px;
    border-radius: 99px;
    font-size: 0.95rem;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 9999;
    white-space: nowrap;
    pointer-events: none;
}
.toast-notification.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
body.dark-mode .toast-notification { background: var(--primary); color: #fff; }
.toast-notification.warning { background: #f59e0b; }
.toast-notification.share   { background: #3b82f6; }

/* --- Input Meta Row (counter + keyboard hint) --- */
.input-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 4px 0;
    min-height: 22px;
}
.input-counter {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--navy-light);
    display: none;
    transition: var(--transition);
}
.input-counter.over-limit { color: #ef4444; }
.input-counter.near-limit { color: #f59e0b; }
.keyboard-hint {
    font-size: 0.78rem;
    color: var(--navy-light);
    opacity: 0.6;
    letter-spacing: 0.01em;
}
body.dark-mode .keyboard-hint { color: #94a3b8; }

/* --- First-Visit Banner --- */
.first-visit-banner {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(135deg, rgba(16,185,129,0.1), rgba(59,130,246,0.08));
    border: 1px solid rgba(16,185,129,0.3);
    border-radius: 14px;
    padding: 12px 18px;
    margin: 12px 0 0;
    font-size: 0.9rem;
    color: var(--navy);
    animation: slideDown 0.4s ease;
}
body.dark-mode .first-visit-banner { color: #e2e8f0; }
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.dismiss-banner {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 99px;
    padding: 6px 16px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
    flex-shrink: 0;
}
.dismiss-banner:hover { background: var(--primary-hover); }

/* --- Style Search --- */
.style-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}
.search-icon-lbl {
    position: absolute;
    left: 16px;
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
}
.style-search {
    width: 100%;
    padding: 12px 44px 12px 44px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: #f8fafc;
    color: var(--navy);
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 500;
    transition: var(--transition);
}
body.dark-mode .style-search { background: #1e293b; color: #fff; }
.style-search:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
}
body.dark-mode .style-search:focus { background: #0f172a; }
.style-search-clear {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    font-size: 1rem;
    color: var(--navy-light);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 50%;
    transition: var(--transition);
}
.style-search-clear:hover { background: rgba(0,0,0,0.06); }

/* --- Platform Presets Row --- */
.platform-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.preset-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--navy-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.platform-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.preset-chip {
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: 99px;
    background: #f1f5f9;
    color: var(--navy-light);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}
body.dark-mode .preset-chip { background: #1e293b; color: #94a3b8; }
.preset-chip:hover { border-color: var(--primary); color: var(--primary); }
.preset-chip.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* --- Toolbar Bottom Row --- */
.toolbar-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.copy-all-btn {
    padding: 9px 20px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 99px;
    font-size: 0.88rem;
    font-weight: 700;
    font-family: inherit;
    color: var(--navy);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
    white-space: nowrap;
}
body.dark-mode .copy-all-btn { background: #1e293b; color: #fff; }
.copy-all-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

/* --- Surprise Me Button --- */
.surprise-btn {
    background: linear-gradient(135deg, #f59e0b, #ef4444) !important;
    color: #fff !important;
    border-color: transparent !important;
    font-weight: 700;
}
.surprise-btn:hover {
    opacity: 0.88;
    transform: scale(1.04);
}

/* --- Surprise Highlight Animation --- */
@keyframes surprisePulse {
    0%   { box-shadow: 0 0 0 0 rgba(16,185,129,0.6); transform: scale(1); }
    40%  { box-shadow: 0 0 0 16px rgba(16,185,129,0); transform: scale(1.03); }
    100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); transform: scale(1); }
}
.font-card.surprise-highlight {
    animation: surprisePulse 0.7s ease 2;
    border-color: var(--primary) !important;
}

/* --- Sticky Input Shadow --- */
.input-section.is-sticky {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-bottom: 1px solid var(--border-color);
}

/* --- History Section --- */
.history-section {
    display: none;
    margin-bottom: 48px;
}
.section-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.section-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--navy);
    margin: 0;
}
body.dark-mode .section-label { color: #e2e8f0; }
.clear-history-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--navy-light);
    cursor: pointer;
    transition: var(--transition);
}
.clear-history-btn:hover { border-color: #ef4444; color: #ef4444; }
.history-grid { margin-bottom: 0; }

/* --- Share Action Button --- */
.action-btn.share:hover { border-color: #3b82f6; color: #3b82f6; }

/* --- No Results State --- */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 24px;
    font-size: 1.1rem;
    color: var(--navy-light);
    font-weight: 500;
}

/* =====================================================
   RESPONSIVE — MOBILE FRIENDLY
   ===================================================== */

@media (max-width: 768px) {
    /* Navigation */
    .nav-links   { display: none; }
    .menu-toggle { display: flex; }

    /* Hero */
    .hero        { padding: 32px 0 24px; }
    .hero h1     { font-size: 2rem; }
    .hero p      { font-size: 1rem; margin-bottom: 16px; }

    /* Input */
    .main-input  { padding: 16px 20px; font-size: 1.1rem; border-radius: 14px; }
    .input-section { padding: 12px 0; }
    .input-meta  { justify-content: flex-start; }
    .keyboard-hint { display: none; }

    /* First-visit banner */
    .first-visit-banner { flex-direction: column; align-items: flex-start; gap: 10px; }

    /* Style search */
    .style-search { font-size: 0.9rem; }

    /* Platform presets */
    .platform-row { gap: 6px; flex-wrap: wrap; }
    .preset-chip  { font-size: 0.78rem; padding: 5px 10px; }
    .preset-label { display: none; } /* hide label on small screens */

    /* Filter chips */
    .filter-chips { gap: 8px; }
    .filter-chip  { padding: 8px 14px; font-size: 0.82rem; }

    /* Toolbar bottom */
    .toolbar-bottom { flex-direction: column; align-items: stretch; gap: 10px; }
    .copy-all-btn   { text-align: center; width: 100%; }
    .size-control   { justify-content: center; }
    #sizeSlider     { width: 160px; }

    /* Font grid */
    .font-grid { grid-template-columns: 1fr; gap: 16px; }

    /* Card tap targets */
    .action-btn { padding: 10px; min-width: 40px; min-height: 40px; }
    .font-output { font-size: 1.2rem; word-break: break-word; }

    /* History section */
    .history-section { margin-bottom: 32px; }

    /* EEAT */
    .eeat-features { flex-wrap: wrap; gap: 12px; }

    /* SEO content */
    .guides-section h2  { font-size: 1.6rem; }
    .guides-section h3  { font-size: 1.3rem; }
    .seo-grid           { grid-template-columns: 1fr; gap: 16px; }
    .step-grid          { grid-template-columns: 1fr; gap: 16px; }
    .faq-item           { padding: 18px; }

    /* Load more */
    .btn-load-more { padding: 14px 32px; }

    /* Scroll top btn — keep above mobile browsers' bottom bar */
    .scroll-top { bottom: 20px; right: 16px; width: 44px; height: 44px; }

    /* Toast — full width on mobile */
    .toast-notification {
        left: 16px;
        right: 16px;
        bottom: 20px;
        transform: translateY(16px);
        border-radius: 14px;
        white-space: normal;
        text-align: center;
    }
    .toast-notification.visible {
        transform: translateY(0);
    }

    /* Mobile drawer */
    .mobile-drawer { width: 280px; right: -280px; }
    .mobile-drawer.open { transform: translateX(-280px); }
}

@media (max-width: 480px) {
    /* Extra small phones */
    .container    { padding: 0 16px; }
    .hero h1      { font-size: 1.75rem; }
    .hero p       { font-size: 0.95rem; }
    .main-input   { padding: 14px 16px; font-size: 1rem; }
    .filter-chip  { padding: 7px 12px; font-size: 0.78rem; }
    .font-card    { padding: 18px; border-radius: 14px; }
    .font-label   { font-size: 0.72rem; }
    .guides-section h2 { font-size: 1.4rem; }
    .step-card    { padding: 32px 20px 20px; }
    .eeat-section { padding: 24px 18px; }
    .first-visit-banner { padding: 10px 14px; font-size: 0.85rem; }
}