/* =============================================
   CreaNext Prompt Studio � Reimagined Styles
   ============================================= */

/* -- Variables -- */
:root {
    --bg:          #07070d;
    --surface:     #0f0f1a;
    --surface-2:   #14141f;
    --border:      rgba(255,255,255,0.07);
    --border-soft: rgba(255,255,255,0.04);
    --text:        #f0f0f8;
    --muted:       #6b6b85;
    --muted-2:     #3a3a52;
    --accent:      #4f6ef7;
    --accent-2:    #8b5cf6;
    --accent-glow: rgba(79,110,247,0.35);
    --green:       #22c55e;
    --red:         #ef4444;
    --yellow:      #eab308;
    --radius-sm:   10px;
    --radius-md:   16px;
    --radius-lg:   24px;
    --radius-xl:   32px;
    --font:        'Inter', sans-serif;
    --font-display:'Syne', sans-serif;
    --header-h:    64px;
    --transition:  0.22s cubic-bezier(.4,0,.2,1);
    --shadow-glow: 0 0 60px rgba(79,110,247,0.12);
    --shadow-card: 0 8px 40px rgba(0,0,0,0.5);
}

/* -- Reset & Base -- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: color var(--transition); }
ul { list-style: none; }
button { font-family: inherit; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--muted-2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.container { max-width: 1160px; margin: 0 auto; padding: 0 1.5rem; width: 100%; }

/* -- Header -- */
header {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: rgba(7,7,13,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 900;
    display: flex;
    align-items: center;
}
header .container { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }

.logo { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; }
.logo-icon {
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.logo-text { font-size: 1.05rem; color: var(--text); font-weight: 600; }
.logo-accent { color: var(--accent); }

nav ul { display: flex; gap: 2rem; }
nav a { font-size: 0.88rem; font-weight: 500; color: var(--muted); transition: color var(--transition); }
nav a:hover { color: var(--text); }

.gh-link { font-size: 1.3rem; color: var(--muted); transition: color var(--transition); }
.gh-link:hover { color: var(--text); }

.mobile-menu-btn { display: none; background: none; border: none; font-size: 1.25rem; color: var(--text); cursor: pointer; z-index: 1100; }

/* -- Hero -- */
.hero {
    position: relative;
    padding-top: calc(var(--header-h) + 80px);
    padding-bottom: 100px;
    overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero-blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.25; }
.blob-a { width: 600px; height: 600px; background: radial-gradient(circle, #4f6ef7, transparent 70%); top: -200px; right: -100px; animation: blobFloat 12s ease-in-out infinite; }
.blob-b { width: 400px; height: 400px; background: radial-gradient(circle, #8b5cf6, transparent 70%); bottom: -100px; left: 10%; animation: blobFloat 16s ease-in-out infinite reverse; }
.hero-grid-lines {
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black, transparent);
}
.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }

.hero-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    background: rgba(79,110,247,0.12);
    border: 1px solid rgba(79,110,247,0.25);
    border-radius: 99px;
    font-size: 0.78rem; font-weight: 600; color: #8ba6ff;
    letter-spacing: 0.04em; text-transform: uppercase;
    margin-bottom: 1.5rem;
}
.badge-dot { width: 7px; height: 7px; background: #4f9af7; border-radius: 50%; animation: blink 2s ease-in-out infinite; }

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 800; line-height: 1.1; letter-spacing: -1px;
    margin-bottom: 1.25rem; color: var(--text);
}
.hero-title-highlight {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-desc { font-size: 1.05rem; color: var(--muted); max-width: 420px; line-height: 1.8; margin-bottom: 2rem; }

.hero-ctas { display: flex; align-items: center; gap: 1rem; margin-bottom: 2.5rem; flex-wrap: wrap; }

.btn-primary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff; border: none; border-radius: 99px;
    font-size: 0.95rem; font-weight: 600; cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 4px 24px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(79,110,247,0.5); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--border); border-radius: 99px;
    font-size: 0.9rem; font-weight: 500; color: var(--muted);
    transition: color var(--transition), border-color var(--transition);
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,0.15); }

.hero-stats { display: flex; align-items: center; gap: 1.5rem; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num { font-size: 1.4rem; font-weight: 700; color: var(--text); line-height: 1; }
.stat-label { font-size: 0.75rem; color: var(--muted); }
.stat-div { width: 1px; height: 36px; background: var(--border); }

/* -- Preview Card -- */
.preview-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: 1.5rem;
    box-shadow: var(--shadow-card), var(--shadow-glow);
    animation: cardFloat 6s ease-in-out infinite;
}
.preview-topbar { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 1.25rem; }
.preview-dot { width: 10px; height: 10px; border-radius: 50%; }
.preview-dot.red    { background: #ef4444; }
.preview-dot.yellow { background: #eab308; }
.preview-dot.green  { background: #22c55e; }
.preview-label { margin-left: auto; font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

.preview-tool-row { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }
.preview-tool { padding: 0.3rem 0.8rem; border-radius: 99px; font-size: 0.75rem; font-weight: 500; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.preview-tool.active { background: rgba(79,110,247,0.15); border-color: rgba(79,110,247,0.3); color: #8ba6ff; }

.preview-idea { display: flex; flex-direction: column; gap: 0.3rem; padding: 0.9rem 1rem; background: var(--surface-2); border-radius: var(--radius-sm); border: 1px solid var(--border-soft); margin-bottom: 1rem; }
.preview-idea-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 600; }
.preview-idea-text { font-size: 0.9rem; font-weight: 500; color: var(--text); }
.preview-arrow { text-align: center; color: var(--accent); font-size: 0.8rem; margin-bottom: 1rem; opacity: 0.7; }
.preview-output { font-size: 0.82rem; color: #a8b4e8; line-height: 1.7; font-family: 'Courier New', monospace; padding: 1rem; background: rgba(79,110,247,0.06); border-radius: var(--radius-sm); border: 1px solid rgba(79,110,247,0.15); margin-bottom: 1rem; }
.preview-footer { display: flex; justify-content: space-between; align-items: center; }
.preview-category { display: flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; color: var(--muted); }
.preview-tokens { font-size: 0.72rem; color: var(--muted-2); }

/* -- Studio Section -- */
.studio-section { padding: 80px 0 100px; }
.studio-header { text-align: center; margin-bottom: 3rem; }
.section-kicker { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600; color: var(--accent); margin-bottom: 0.75rem; }
.section-title { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 800; letter-spacing: -0.5px; color: var(--text); }

.studio-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: clamp(1.5rem, 4vw, 2.5rem); box-shadow: var(--shadow-card); max-width: 860px; margin: 0 auto; }

/* Tool Tabs */
.tool-selector { display: flex; gap: 0.5rem; padding: 0.4rem; background: var(--surface-2); border-radius: var(--radius-md); border: 1px solid var(--border); margin-bottom: 2rem; flex-wrap: wrap; }
.tool-tab { flex: 1; min-width: 100px; display: flex; align-items: center; justify-content: center; gap: 0.45rem; padding: 0.6rem 1rem; border-radius: var(--radius-sm); border: none; background: transparent; color: var(--muted); font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all var(--transition); }
.tool-tab:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.tool-tab.active { background: linear-gradient(135deg, rgba(79,110,247,0.2), rgba(139,92,246,0.15)); color: #a5b8ff; border: 1px solid rgba(79,110,247,0.25); }
.tool-tab i { font-size: 0.8rem; }
.history-tab { flex: 0; min-width: unset; padding: 0.6rem 0.9rem; margin-left: auto; }
.history-tab.open { background: rgba(255,255,255,0.06); color: var(--text); }

/* History Dropdown */
.history-dropdown {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    overflow: hidden;
    animation: slideDown 0.18s ease;
}
@keyframes slideDown { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }
.history-header { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); font-size: 0.78rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.history-clear-btn { background: none; border: none; color: var(--muted-2); cursor: pointer; font-size: 0.8rem; padding: 0.2rem 0.4rem; border-radius: 6px; transition: color var(--transition); }
.history-clear-btn:hover { color: var(--red); }
.history-list { list-style: none; max-height: 200px; overflow-y: auto; }
.history-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 1rem; cursor: pointer; border-bottom: 1px solid var(--border-soft); transition: background var(--transition); font-size: 0.875rem; color: var(--text); }
.history-item:last-child { border-bottom: none; }
.history-item:hover { background: rgba(79,110,247,0.06); }
.history-item i { color: var(--muted-2); font-size: 0.75rem; flex-shrink: 0; }
.history-item-text { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-empty { padding: 1.25rem 1rem; font-size: 0.85rem; color: var(--muted-2); text-align: center; }

/* Input Area */
.input-area { margin-bottom: 1.5rem; }
.input-label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.6rem; flex-wrap: wrap; gap: 0.4rem; }
.input-label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.kbd-hint { font-size: 0.7rem; color: var(--muted-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 0.2rem 0.55rem; font-family: var(--font); pointer-events: none; white-space: nowrap; }
.textarea-wrap { position: relative; }
textarea { width: 100%; min-height: 130px; padding: 1rem 1.25rem; padding-bottom: 2rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text); font-size: 0.95rem; font-family: var(--font); resize: vertical; transition: border-color var(--transition), box-shadow var(--transition); line-height: 1.65; }
textarea::placeholder { color: var(--muted-2); }
textarea:focus { outline: none; border-color: rgba(79,110,247,0.5); box-shadow: 0 0 0 3px rgba(79,110,247,0.08); background: rgba(20,20,31,0.9); }
.char-count { position: absolute; bottom: 0.6rem; right: 1rem; font-size: 0.72rem; color: var(--muted-2); pointer-events: none; transition: color var(--transition); }
.char-count.warn { color: var(--yellow); }
.char-count.over { color: var(--red); }

/* Meta Row */
.meta-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2rem; flex-wrap: wrap; }
.category-display { display: flex; flex-direction: column; gap: 0.5rem; }
.meta-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 600; }
.category-chip { position: relative; display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.45rem 1rem; border-radius: 99px; background: rgba(79,110,247,0.1); border: 1px solid rgba(79,110,247,0.25); color: #a5b8ff; font-size: 0.88rem; font-weight: 500; overflow: hidden; max-width: 260px; }
.category-shimmer { position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent); transform: skewX(-20deg); animation: shimmer 3.5s ease-in-out infinite; }
.cat-icon { font-size: 0.75rem; color: var(--accent); }

.btn-generate { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.75rem 2rem; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border: none; border-radius: 99px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: transform var(--transition), box-shadow var(--transition); box-shadow: 0 4px 20px var(--accent-glow); white-space: nowrap; }
.btn-generate:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(79,110,247,0.5); }
.btn-generate:active { transform: translateY(0); }
.btn-generate:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

/* Output */
.output-area { border-top: 1px solid var(--border); padding-top: 1.75rem; }
.output-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.output-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 600; }
.token-badge { font-size: 0.72rem; padding: 0.2rem 0.7rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 99px; color: var(--muted); }
.output-box { min-height: 120px; padding: 1.25rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-md); font-family: 'Courier New', monospace; font-size: 0.9rem; line-height: 1.75; color: #c5d0f5; white-space: pre-wrap; word-break: break-word; transition: opacity 0.2s ease, transform 0.2s ease; margin-bottom: 1rem; }
.output-placeholder { color: var(--muted-2); font-family: var(--font); font-size: 0.9rem; }
.output-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.action-btn { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.55rem 1.25rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: transparent; color: var(--text); font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all var(--transition); }
.action-btn:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.12); }
.action-btn.secondary { color: var(--muted); }
.action-btn.copied { background: rgba(34,197,94,0.1); border-color: rgba(34,197,94,0.3); color: #4ade80; }

/* -- How It Works -- */
.how-section { padding: 80px 0 100px; text-align: center; }
.how-section .section-kicker, .how-section .section-title { margin-bottom: 0.5rem; }
.how-section .section-title { margin-bottom: 3.5rem; }
.steps-grid { display: flex; align-items: center; justify-content: center; gap: 1.5rem; flex-wrap: wrap; }
.step-card { flex: 1; min-width: 200px; max-width: 260px; padding: 2rem 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); text-align: left; transition: transform var(--transition), border-color var(--transition); }
.step-card:hover { transform: translateY(-5px); border-color: rgba(79,110,247,0.3); }
.step-num { font-family: var(--font-display); font-size: 2.5rem; font-weight: 800; color: var(--border); line-height: 1; margin-bottom: 0.75rem; }
.step-icon { width: 44px; height: 44px; background: linear-gradient(135deg, rgba(79,110,247,0.15), rgba(139,92,246,0.1)); border: 1px solid rgba(79,110,247,0.2); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: #8ba6ff; margin-bottom: 1rem; }
.step-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.step-card p { font-size: 0.875rem; color: var(--muted); line-height: 1.65; }
.step-connector { color: var(--muted-2); font-size: 1rem; flex-shrink: 0; }

/* -- Toast -- */
.toast { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%) translateY(20px); background: #1a1a2e; border: 1px solid var(--border); color: var(--text); padding: 0.65rem 1.4rem; border-radius: 99px; font-size: 0.875rem; font-weight: 500; z-index: 9999; opacity: 0; transition: opacity 0.25s ease, transform 0.25s ease; pointer-events: none; white-space: nowrap; box-shadow: 0 8px 30px rgba(0,0,0,0.4); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { border-color: rgba(34,197,94,0.3); color: #4ade80; }
.toast.error   { border-color: rgba(239,68,68,0.3);  color: #f87171; }

/* -- Footer -- */
footer { border-top: 1px solid var(--border); padding: 1.75rem 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 0.6rem; }.footer-icon { font-size: 1rem; background: linear-gradient(135deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }.footer-name { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.footer-copy { font-size: 0.8rem; color: var(--muted); }
.footer-links { display: flex; align-items: center; gap: 1.25rem; }
.footer-links a { font-size: 0.82rem; color: var(--muted); transition: color var(--transition); }
.footer-links a:hover { color: var(--text); }
.footer-links .fa-brands { font-size: 1.1rem; }

/* -- Custom Cursor -- */
@media (hover: hover) and (pointer: fine) {
    .cursor { position: fixed; width: 7px; height: 7px; background: var(--accent); border-radius: 50%; pointer-events: none; z-index: 9999; transform: translate(-50%,-50%); transition: transform 0.08s ease; mix-blend-mode: screen; }
    .cursor-follower { position: fixed; width: 36px; height: 36px; border: 1px solid rgba(79,110,247,0.4); border-radius: 50%; pointer-events: none; z-index: 9998; transform: translate(-50%,-50%); transition: transform 0.14s ease-out; }
}

/* -- Animations -- */
@keyframes blobFloat { 0%, 100% { transform: translate(0,0) scale(1); } 33% { transform: translate(30px,-20px) scale(1.03); } 66% { transform: translate(-20px,15px) scale(0.97); } }
@keyframes cardFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes shimmer { 0% { left: -100%; } 100% { left: 200%; } }
@keyframes spin { to { transform: rotate(360deg); } }
.fa-spin { animation: spin 0.8s linear infinite; }
/* ── Scroll Reveal ── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.6s cubic-bezier(.4,0,.2,1), transform 0.6s cubic-bezier(.4,0,.2,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
/* -- Mobile -- */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; gap: 3rem; }
    .hero-right { order: -1; max-width: 480px; margin: 0 auto; }
    .preview-card { animation: none; }
}
@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }
    nav { position: fixed; top: 0; right: -100%; width: 75%; height: 100vh; background: rgba(7,7,13,0.97); backdrop-filter: blur(20px); padding: 5rem 2rem 2rem; z-index: 1000; border-left: 1px solid var(--border); transition: right 0.3s ease; display: flex; flex-direction: column; }
    nav.active { right: 0; }
    nav ul { flex-direction: column; gap: 1.5rem; }
    nav a { font-size: 1.2rem; color: var(--text); }
    .header-buttons { display: flex; align-items: center; gap: 0.5rem; }
    .header-buttons .gh-link { display: none; }
    .hero { padding-top: calc(var(--header-h) + 40px); padding-bottom: 60px; }
    .hero-stats { gap: 1rem; }
    .stat-num { font-size: 1.1rem; }
    .meta-row { flex-direction: column; align-items: stretch; }
    .btn-generate { width: 100%; justify-content: center; }
    .steps-grid { flex-direction: column; align-items: center; }
    .step-connector { transform: rotate(90deg); }
    .footer-inner { flex-direction: column; text-align: center; gap: 0.75rem; }
    .tool-selector { gap: 0.35rem; }
    .tool-tab { min-width: 80px; font-size: 0.78rem; padding: 0.5rem 0.6rem; gap: 0.3rem; }
}
@media (max-width: 400px) {
    .hero-ctas { flex-direction: column; }
    .btn-primary, .btn-ghost { width: 100%; justify-content: center; }
}

/* ── Theme Toggle ── */
.theme-toggle {
    background: none; border: 1px solid var(--border); border-radius: 99px;
    color: var(--muted); font-size: 0.9rem; cursor: pointer;
    padding: 0.3rem 0.65rem;
    transition: color var(--transition), border-color var(--transition), background var(--transition);
    display: flex; align-items: center;
}
.theme-toggle:hover { color: var(--text); border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.04); }

/* ── Light Mode ── */
body.light {
    --bg:          #f4f5fd;
    --surface:     #ffffff;
    --surface-2:   #eef0fb;
    --border:      rgba(0,0,0,0.08);
    --border-soft: rgba(0,0,0,0.04);
    --text:        #0f0f1a;
    --muted:       #6b6b85;
    --muted-2:     #a0a0b8;
    --accent-glow: rgba(79,110,247,0.2);
    --shadow-glow: 0 0 60px rgba(79,110,247,0.08);
    --shadow-card: 0 8px 40px rgba(0,0,0,0.1);
}
body.light header { background: rgba(244,245,253,0.9); }
body.light .hero-grid-lines { background-image: linear-gradient(rgba(0,0,0,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(0,0,0,0.03) 1px, transparent 1px); }
body.light .hero-blob { opacity: 0.12; }
body.light .output-box { color: #1e2060; }
body.light .cursor { background: var(--accent); }
body.light .cursor-follower { border-color: rgba(79,110,247,0.3); }
body.light .toast { background: #fff; }
body.light nav { background: rgba(244,245,253,0.97); }
body.light ::-webkit-scrollbar-track { background: var(--bg); }

/* ── Word Count Row ── */
.word-count-row {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 0.45rem; padding: 0 0.1rem;
}
.word-count { font-size: 0.72rem; color: var(--muted-2); }
.live-category-preview {
    font-size: 0.72rem; color: var(--accent); font-weight: 500;
    opacity: 0; transform: translateY(4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    display: flex; align-items: center; gap: 0.35rem;
}
.live-category-preview.visible { opacity: 1; transform: translateY(0); }

/* ── Prompt Length Slider ── */
.length-row {
    display: flex; align-items: center; gap: 1rem;
    margin-bottom: 1.75rem; flex-wrap: wrap; padding: 0.8rem 1rem;
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: var(--radius-md);
}
.length-label { font-size: 0.8rem; font-weight: 600; color: var(--muted); white-space: nowrap; display: flex; align-items: center; gap: 0.4rem; }
.length-slider-wrap { display: flex; align-items: center; gap: 0.6rem; flex: 1; min-width: 160px; }
.length-tick { font-size: 0.7rem; color: var(--muted-2); white-space: nowrap; }
.length-slider {
    flex: 1; -webkit-appearance: none; appearance: none;
    height: 4px; background: var(--border);
    border-radius: 99px; cursor: pointer;
    accent-color: var(--accent);
    transition: background var(--transition);
}
.length-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 16px; height: 16px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    cursor: pointer; box-shadow: 0 0 8px var(--accent-glow);
}
.length-value {
    font-size: 0.78rem; font-weight: 600;
    color: #8ba6ff; background: rgba(79,110,247,0.1);
    border: 1px solid rgba(79,110,247,0.2); border-radius: 99px;
    padding: 0.15rem 0.7rem; white-space: nowrap;
}

/* ── Regen / Share / Download Buttons ── */
#regen-btn { color: #a5b8ff; border-color: rgba(79,110,247,0.25); }
#regen-btn:hover { background: rgba(79,110,247,0.08); }
#regen-btn.spinning i { animation: spin 0.5s linear infinite; }
#share-btn.shared { background: rgba(34,197,94,0.1); border-color: rgba(34,197,94,0.3); color: #4ade80; }
#download-btn:hover { background: rgba(139,92,246,0.08); border-color: rgba(139,92,246,0.25); color: #c4b5fd; }

/* ── Hero Preview Cycling Dots ── */
.preview-cycle-dots {
    display: flex; gap: 0.4rem; justify-content: center; margin-top: 1rem;
}
.cycle-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--muted-2); cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}
.cycle-dot.active { background: var(--accent); transform: scale(1.3); }

/* ── Prefers Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
    .hero-blob { animation: none !important; }
    .preview-card { animation: none !important; }
    .badge-dot { animation: none !important; }
    .category-shimmer { animation: none !important; }
    .reveal { opacity: 1 !important; transform: none !important; }
}

/* ========================================
   SITE-WIDE SHARED COMPONENTS
   ======================================== */

/* ── Active nav link ── */
nav a.nav-active { color: var(--text) !important; }

/* ── Back to Top Button ── */
.back-to-top {
    position: fixed; bottom: 1.75rem; right: 1.75rem; z-index: 9000;
    width: 42px; height: 42px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff; border: none; cursor: pointer; font-size: 0.85rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px var(--accent-glow);
    opacity: 0; transform: translateY(16px); pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(79,110,247,0.5); }

/* ========================================
   PAGE HERO (about + features)
   ======================================== */
.page-hero {
    position: relative;
    padding-top: calc(var(--header-h) + 80px);
    padding-bottom: 80px;
    overflow: hidden;
    text-align: center;
}
.page-hero-inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 1.25rem; }
.page-hero-title { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 800; line-height: 1.1; letter-spacing: -1px; color: var(--text); }
.page-hero-desc { font-size: 1.05rem; color: var(--muted); max-width: 540px; line-height: 1.8; }

/* ========================================
   ABOUT PAGE
   ======================================== */

/* Stats */
.about-stats-section { padding: 60px 0; }
.about-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.about-stat-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 2rem 1.5rem;
    text-align: center; transition: transform var(--transition), border-color var(--transition);
}
.about-stat-card:hover { transform: translateY(-4px); border-color: rgba(79,110,247,0.3); }
.about-stat-num-row { display: flex; align-items: baseline; justify-content: center; gap: 0.15rem; margin-bottom: 0.5rem; }
.about-stat-num { font-family: var(--font-display); font-size: 2.8rem; font-weight: 800; color: var(--text); line-height: 1; }
.about-stat-suffix { font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; color: var(--accent); }
.about-stat-label { font-size: 0.82rem; color: var(--muted); font-weight: 500; }

/* Mission split */
.about-mission { padding: 80px 0; }
.about-split { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.about-body { font-size: 1rem; color: var(--muted); line-height: 1.85; margin-bottom: 1rem; }
.about-quote-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-xl); padding: 2rem;
    box-shadow: var(--shadow-card);
}
.about-quote-icon { font-size: 1.8rem; color: var(--accent); opacity: 0.4; margin-bottom: 1rem; }
.about-quote-text { font-size: 1.05rem; line-height: 1.75; color: var(--text); font-style: italic; margin-bottom: 1.5rem; }
.about-quote-author { display: flex; align-items: center; gap: 0.75rem; }
.about-quote-avatar { width: 40px; height: 40px; background: linear-gradient(135deg, rgba(79,110,247,0.2), rgba(139,92,246,0.15)); border: 1px solid rgba(79,110,247,0.25); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #8ba6ff; }
.about-quote-name { display: block; font-size: 0.9rem; font-weight: 600; color: var(--text); }
.about-quote-role { display: block; font-size: 0.75rem; color: var(--muted); }

/* Tech stack */
.about-tech { padding: 80px 0; }
.tech-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 3rem; }
.tech-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.75rem 1.5rem;
    transition: transform var(--transition), border-color var(--transition);
}
.tech-card:hover { transform: translateY(-4px); border-color: rgba(79,110,247,0.25); }
.tech-icon { font-size: 1.75rem; margin-bottom: 0.9rem; }
.tech-card h3 { font-size: 0.95rem; font-weight: 700; color: var(--text); margin-bottom: 0.4rem; }
.tech-card p { font-size: 0.85rem; color: var(--muted); line-height: 1.65; }

/* Values */
.about-values { padding: 80px 0; }
.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 3rem; }
.value-item { text-align: center; }
.value-icon { width: 52px; height: 52px; margin: 0 auto 1rem; background: linear-gradient(135deg, rgba(79,110,247,0.15), rgba(139,92,246,0.1)); border: 1px solid rgba(79,110,247,0.2); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: #8ba6ff; }
.value-item h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.4rem; color: var(--text); }
.value-item p { font-size: 0.85rem; color: var(--muted); line-height: 1.65; }

/* Maker */
.about-maker { padding: 60px 0; }
.maker-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 2.5rem; display: flex; align-items: center; gap: 2.5rem; max-width: 720px; margin: 0 auto; box-shadow: var(--shadow-card); }
.maker-avatar { width: 80px; height: 80px; flex-shrink: 0; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #fff; }
.maker-name { font-family: var(--font-display); font-size: 1.8rem; font-weight: 800; color: var(--text); margin-bottom: 0.5rem; }
.maker-bio { font-size: 0.92rem; color: var(--muted); line-height: 1.7; margin-bottom: 1rem; }
.maker-links { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.maker-link { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.9rem; border: 1px solid var(--border); border-radius: 99px; font-size: 0.82rem; color: var(--muted); transition: color var(--transition), border-color var(--transition); }
.maker-link:hover { color: var(--text); border-color: rgba(255,255,255,0.15); }

/* CTA Card */
.about-cta { padding: 60px 0 100px; }
.cta-card { position: relative; background: var(--surface); border: 1px solid rgba(79,110,247,0.2); border-radius: var(--radius-xl); padding: 4rem 2rem; text-align: center; overflow: hidden; box-shadow: var(--shadow-glow), var(--shadow-card); }

/* ========================================
   FEATURES PAGE
   ======================================== */
.features-page-section { padding: 80px 0; }
.features-full-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 3rem; }
.feat-card {
    position: relative; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.75rem 1.5rem;
    transition: transform var(--transition), border-color var(--transition);
}
.feat-card:hover { transform: translateY(-4px); border-color: rgba(79,110,247,0.25); }
.feat-icon { width: 44px; height: 44px; background: linear-gradient(135deg, rgba(79,110,247,0.15), rgba(139,92,246,0.1)); border: 1px solid rgba(79,110,247,0.2); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 1.05rem; color: #8ba6ff; margin-bottom: 1rem; }
.feat-card h3 { font-size: 0.95rem; font-weight: 700; color: var(--text); margin-bottom: 0.4rem; }
.feat-card p { font-size: 0.85rem; color: var(--muted); line-height: 1.65; }
.feat-badge { position: absolute; top: 1rem; right: 1rem; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.15rem 0.55rem; border-radius: 99px; }
.feat-badge.new { background: rgba(79,110,247,0.15); color: #8ba6ff; border: 1px solid rgba(79,110,247,0.25); }
.feat-kbd { display: inline-block; padding: 0.1rem 0.45rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; font-size: 0.75rem; font-family: var(--font); color: var(--muted); }
.feat-code { font-size: 0.82rem; font-family: 'Courier New', monospace; color: #a5b8ff; background: rgba(79,110,247,0.1); padding: 0.1rem 0.4rem; border-radius: 4px; }

/* Deep dives */
.feat-highlights { padding: 60px 0 80px; }
.feat-hl-item { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; margin-bottom: 5rem; padding: 2.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); }
.feat-hl-item:last-child { margin-bottom: 0; }
.feat-hl-reverse { direction: rtl; }
.feat-hl-reverse > * { direction: ltr; }
.feat-hl-num { font-family: var(--font-display); font-size: 3.5rem; font-weight: 800; color: var(--border); line-height: 1; margin-bottom: 0.5rem; }
.feat-hl-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--text); margin-bottom: 0.75rem; }
.feat-hl-desc { font-size: 0.95rem; color: var(--muted); line-height: 1.8; }
.feat-hl-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; }
.feat-hl-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.feat-hl-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 600; min-width: 64px; }
.feat-hl-val { font-size: 0.9rem; color: var(--text); }
.feat-hl-arrow { text-align: center; color: var(--accent); margin: 0.5rem 0; font-size: 0.85rem; }
.category-chip-demo { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.8rem; background: rgba(79,110,247,0.1); border: 1px solid rgba(79,110,247,0.25); color: #a5b8ff; border-radius: 99px; font-size: 0.85rem; font-weight: 500; }
.feat-tool-row { display: flex; gap: 0.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.feat-tool-chip { padding: 0.3rem 0.75rem; border-radius: 99px; font-size: 0.75rem; font-weight: 500; background: var(--surface); border: 1px solid var(--border); color: var(--muted); }
.feat-tool-chip.active { background: rgba(79,110,247,0.12); border-color: rgba(79,110,247,0.3); color: #8ba6ff; }
.feat-hl-code { font-family: 'Courier New', monospace; font-size: 0.82rem; color: #a5b8ff; background: rgba(79,110,247,0.06); border: 1px solid rgba(79,110,247,0.15); padding: 0.75rem 1rem; border-radius: var(--radius-sm); }
.feat-steps { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.feat-step { font-size: 0.8rem; color: var(--muted); font-weight: 500; padding: 0.3rem 0.7rem; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); }
.feat-step.active { background: rgba(79,110,247,0.12); border-color: rgba(79,110,247,0.3); color: #8ba6ff; }
.feat-step-arrow { color: var(--muted-2); font-size: 0.7rem; }
.feat-actions-demo { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.action-demo-btn { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.45rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: transparent; color: var(--text); font-size: 0.8rem; }

/* FAQ */
.faq-section { padding: 60px 0 80px; }
.faq-list { max-width: 780px; margin: 3rem auto 0; display: flex; flex-direction: column; gap: 0.75rem; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; transition: border-color var(--transition); }
.faq-item[open] { border-color: rgba(79,110,247,0.3); }
.faq-q {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.1rem 1.4rem; cursor: pointer;
    font-size: 0.93rem; font-weight: 600; color: var(--text);
    list-style: none; user-select: none;
    transition: background var(--transition);
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q:hover { background: rgba(255,255,255,0.03); }
.faq-icon { font-size: 0.75rem; color: var(--muted); flex-shrink: 0; transition: transform 0.25s ease; }
.faq-item[open] .faq-icon { transform: rotate(180deg); color: var(--accent); }
.faq-a { padding: 0 1.4rem 1.25rem; font-size: 0.9rem; color: var(--muted); line-height: 1.75; }

/* ── Page-specific mobile responsiveness ── */
@media (max-width: 900px) {
    .about-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .about-split { grid-template-columns: 1fr; gap: 2.5rem; }
    .tech-grid { grid-template-columns: repeat(2, 1fr); }
    .values-grid { grid-template-columns: repeat(2, 1fr); }
    .features-full-grid { grid-template-columns: repeat(2, 1fr); }
    .feat-hl-item { grid-template-columns: 1fr; gap: 2rem; }
    .feat-hl-reverse { direction: ltr; }
}
@media (max-width: 600px) {
    .about-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .tech-grid { grid-template-columns: 1fr; }
    .values-grid { grid-template-columns: repeat(2, 1fr); }
    .features-full-grid { grid-template-columns: 1fr; }
    .maker-card { flex-direction: column; text-align: center; gap: 1.5rem; }
    .maker-links { justify-content: center; }
    .feat-hl-item { padding: 1.5rem; }
}
