:root {
    /* Color Tokens - Modern Tech Palette */
    --bg-page: #0f172a; /* Slate 900 */
    --bg-card: rgba(30, 41, 59, 0.7); /* Slate 800 glass */
    --bg-surface: #1e293b;
    --text-main: #f8fafc; /* Slate 50 */
    --text-muted: #94a3b8; /* Slate 400 */
    --accent: #38bdf8; /* Sky 400 */
    --accent-glow: rgba(56, 189, 248, 0.2);
    --border: rgba(148, 163, 184, 0.1);
    
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --radius-lg: 24px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: var(--font-heading);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- Dynamic Background --- */
.bg-noise {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none; z-index: -1;
}

.bg-glow-1, .bg-glow-2 {
    position: fixed; width: 600px; height: 600px; border-radius: 50%; filter: blur(100px); opacity: 0.15; z-index: -2;
    animation: drift 20s infinite alternate ease-in-out;
}
.bg-glow-1 { top: -10%; left: -10%; background: #3b82f6; }
.bg-glow-2 { bottom: -10%; right: -10%; background: #8b5cf6; animation-delay: -10s; }

@keyframes drift { from { transform: translate(0, 0); } to { transform: translate(50px, 50px); } }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* --- Navbar --- */
.navbar {
    position: fixed; top: 0; width: 100%; z-index: 100;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px);
    background: rgba(15, 23, 42, 0.6);
}
.nav-inner { height: 80px; display: flex; justify-content: space-between; align-items: center; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em; }
.logo-seed { width: 24px; height: 24px; background: linear-gradient(135deg, #38bdf8, #818cf8); border-radius: 6px; transform: rotate(45deg); }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-weight: 500; font-size: 0.95rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--text-main); }

/* --- Hero --- */
.hero-stage { padding: 140px 0 80px; text-align: center; }
.hero-header { margin-bottom: 64px; }
.pill-label { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px; background: rgba(56, 189, 248, 0.1); border: 1px solid rgba(56, 189, 248, 0.2); border-radius: 100px; color: #38bdf8; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; margin-bottom: 24px; }
.pulse-dot { width: 6px; height: 6px; background: #38bdf8; border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.5); } 100% { opacity: 1; transform: scale(1); } }

.hero-title { font-size: 4rem; line-height: 1.1; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 24px; }
.text-gradient { background: linear-gradient(to right, #38bdf8, #818cf8, #c084fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-subtitle { font-size: 1.25rem; color: var(--text-muted); max-width: 600px; margin: 0 auto; }

/* --- Generator Card --- */
.generator-stage { max-width: 800px; margin: 0 auto; position: relative; }
.glass-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px; box-shadow: 0 20px 40px -10px rgba(0,0,0,0.3); backdrop-filter: blur(20px); }

/* Display */
.display-row { display: flex; gap: 16px; margin-bottom: 32px; }
.input-wrapper { flex: 1; position: relative; background: #020617; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; display: flex; align-items: center; transition: border-color 0.2s; }
.input-wrapper:focus-within { border-color: var(--accent); }
.password-field { width: 100%; background: transparent; border: none; color: #fff; font-family: var(--font-mono); font-size: 1.5rem; padding: 24px; outline: none; }
.scan-line { position: absolute; bottom: 0; left: 0; height: 2px; width: 100%; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0; transition: opacity 0.3s; }
.input-wrapper:focus-within .scan-line { opacity: 1; }

.actions { display: flex; gap: 12px; }
.action-btn { width: 56px; border: 1px solid var(--border); background: rgba(255,255,255,0.03); color: var(--text-muted); border-radius: var(--radius-md); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.action-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }
.action-btn.primary { background: var(--accent); color: #000; border-color: var(--accent); }
.action-btn.primary:hover { background: #0ea5e9; }

/* Slider */
.controls-stack { display: flex; flex-direction: column; gap: 32px; }
.label-row { display: flex; justify-content: space-between; font-weight: 600; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 12px; }
.value-badge { color: var(--accent); font-family: var(--font-mono); }
.slider-wrapper { position: relative; height: 24px; display: flex; align-items: center; }
input[type=range] { -webkit-appearance: none; width: 100%; background: transparent; cursor: pointer; z-index: 2; position: relative; }
input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; height: 20px; width: 20px; background: var(--accent); border-radius: 50%; margin-top: -8px; box-shadow: 0 0 10px var(--accent-glow); transition: transform 0.1s; }
input[type=range]:hover::-webkit-slider-thumb { transform: scale(1.2); }
.slider-progress { position: absolute; height: 4px; background: var(--accent); border-radius: 2px; left: 0; pointer-events: none; }
.slider-ticks { display: flex; justify-content: space-between; margin-top: 8px; font-size: 0.75rem; color: var(--text-muted); font-family: var(--font-mono); }

/* Custom Checkboxes (Cards) */
.options-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.check-card { cursor: pointer; position: relative; }
.check-card input { display: none; }
.check-content { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: var(--radius-md); transition: all 0.2s; height: 100%; }
.check-title { font-family: var(--font-mono); font-weight: 700; font-size: 1.1rem; margin-bottom: 4px; }
.check-sub { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; font-weight: 600; }
.check-indicator { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--border); transition: background 0.2s; }

.check-card:hover .check-content { background: rgba(255,255,255,0.06); }
.check-card input:checked ~ .check-content { background: rgba(56, 189, 248, 0.1); border-color: var(--accent); }
.check-card input:checked ~ .check-content .check-title { color: var(--accent); }
.check-card input:checked ~ .check-indicator { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }

/* History */
.history-container { margin-top: 32px; border-top: 1px solid var(--border); padding-top: 24px; }
.history-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.history-trigger { background: none; border: none; color: var(--text-muted); cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 0.9rem; font-weight: 600; padding: 8px 0; transition: color 0.2s; }
.history-trigger:hover { color: #fff; }
.icon-wrap svg { transition: transform 0.3s; }
.history-panel:not(.collapsed) ~ .history-bar .icon-wrap svg { transform: rotate(180deg); } /* Wait, sibling selector issue. JS toggles logic usually */
.history-panel:not(.collapsed) .history-trigger svg { transform: rotate(180deg); }

.history-pref { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.history-pref input { display: none; }
.slider-toggle { width: 36px; height: 20px; background: rgba(255,255,255,0.1); border-radius: 20px; position: relative; transition: 0.3s; }
.slider-toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: 0.3s; }
.history-pref input:checked ~ .slider-toggle { background: var(--accent); }
.history-pref input:checked ~ .slider-toggle::after { transform: translateX(16px); }
.label-text { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }

.history-panel { background: rgba(0,0,0,0.2); border-radius: var(--radius-md); overflow: hidden; transition: all 0.3s; max-height: 500px; opacity: 1; }
.history-panel.collapsed { max-height: 0; opacity: 0; padding: 0; }
.history-info-box { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.history-disclaimer { font-size: 0.8rem; color: var(--text-muted); max-width: 70%; line-height: 1.4; }
.clear-btn { background: none; border: none; color: #ef4444; font-size: 0.8rem; font-weight: 600; cursor: pointer; opacity: 0.8; transition: 0.2s; }
.clear-btn:hover { opacity: 1; }
.history-list { max-height: 300px; overflow-y: auto; padding: 10px; }
.history-item { padding: 12px 16px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: background 0.2s; }
.history-item:hover { background: rgba(255,255,255,0.05); }
.history-pw { font-family: var(--font-mono); color: #fff; font-size: 0.9rem; }
.history-time { font-size: 0.75rem; color: #64748b; }

/* Scroll Prompt */
.scroll-prompt { margin-top: 60px; display: flex; flex-direction: column; align-items: center; gap: 16px; color: var(--text-muted); font-size: 0.9rem; animation: fadeUp 1s 1s backwards; }
.scroll-line { width: 1px; height: 60px; background: linear-gradient(to bottom, var(--text-muted), transparent); }

/* --- Feature Grid (Bento) --- */
.section-block { padding: 100px 0; border-top: 1px solid var(--border); position: relative; }
.bg-shape-1 { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(circle at 0% 50%, rgba(56, 189, 248, 0.05) 0%, transparent 50%); pointer-events: none; }
.section-header { text-align: center; max-width: 700px; margin: 0 auto 80px; }
.section-header h2 { font-size: 2.5rem; font-weight: 800; margin-bottom: 16px; }
.section-header p { font-size: 1.1rem; color: var(--text-muted); }
.highlight { color: var(--accent); }

.bento-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; grid-auto-rows: minmax(250px, auto); }
.bento-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 24px; padding: 32px; display: flex; flex-direction: column; gap: 20px; transition: transform 0.3s; }
.bento-card:hover { transform: translateY(-5px); border-color: rgba(56, 189, 248, 0.3); }
.bento-card.large { grid-column: span 2; background: linear-gradient(145deg, var(--bg-surface), rgba(56, 189, 248, 0.05)); }
.card-icon { width: 56px; height: 56px; background: rgba(255,255,255,0.05); border-radius: 16px; display: flex; align-items: center; justify-content: center; color: var(--accent); }
.bento-card h3 { font-size: 1.5rem; font-weight: 700; }
.bento-card p { color: var(--text-muted); font-size: 1rem; line-height: 1.6; }

/* --- Deep Dive (Dark Mode / Code) --- */
.section-block.dark-mode { background: #020617; }
.split-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.content-side h2 { font-size: 3rem; font-weight: 800; line-height: 1.1; margin-bottom: 32px; }
.content-body p { margin-bottom: 24px; color: var(--text-muted); font-size: 1.1rem; }
.feature-list { list-style: none; display: grid; gap: 12px; margin-bottom: 40px; }
.feature-list li { display: flex; align-items: center; gap: 12px; font-weight: 600; color: #fff; }
.feature-list li::before { content: '✓'; color: var(--accent); }
.btn-glow { background: var(--accent); border: none; padding: 16px 32px; border-radius: 100px; font-weight: 700; font-size: 1rem; cursor: pointer; box-shadow: 0 0 20px var(--accent-glow); transition: 0.3s; }
.btn-glow:hover { box-shadow: 0 0 40px var(--accent-glow); transform: scale(1.05); }

.code-window { background: #0f172a; border: 1px solid var(--border); border-radius: 16px; padding: 24px; font-family: var(--font-mono); box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.window-header { display: flex; justify-content: space-between; margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 16px; }
.dots { display: flex; gap: 8px; }
.dots span { width: 10px; height: 10px; border-radius: 50%; background: #334155; }
.dots span:nth-child(1) { background: #ef4444; } .dots span:nth-child(2) { background: #f59e0b; } .dots span:nth-child(3) { background: #10b981; }
.title { font-size: 0.8rem; color: #64748b; }
pre code { display: block; color: #94a3b8; font-size: 0.9rem; line-height: 1.7; }
.k { color: #c084fc; } .v { color: #fff; } .s { color: #10b981; } .f { color: #38bdf8; } .c { color: #f59e0b; }

/* --- FAQ --- */
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.faq-item h4 { font-size: 1.2rem; margin-bottom: 12px; color: #fff; }
.faq-item p { color: var(--text-muted); font-size: 0.95rem; }

/* Footer */
footer { padding: 80px 0; border-top: 1px solid var(--border); background: #020617; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 60px; }
.footer-brand { font-size: 1.5rem; font-weight: 800; color: #fff; margin-bottom: 16px; }
.footer-col h5 { color: #fff; margin-bottom: 24px; font-size: 1rem; }
.footer-col a { display: block; color: var(--text-muted); text-decoration: none; margin-bottom: 12px; transition: color 0.2s; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { text-align: center; color: #475569; font-size: 0.85rem; padding-top: 40px; border-top: 1px solid rgba(255,255,255,0.05); }

/* Toast */
.toast { position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%) translateY(100px); background: #fff; color: #0f172a; padding: 12px 24px; border-radius: 100px; display: flex; align-items: center; gap: 12px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,0.3); opacity: 0; transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1); z-index: 1000; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

@media (max-width: 768px) {
    .hero-title { font-size: 3rem; }
    .display-row { flex-direction: column; }
    .options-row { grid-template-columns: 1fr 1fr; }
    .bento-grid { grid-template-columns: 1fr; }
    .bento-card.large { grid-column: span 1; }
    .split-layout { grid-template-columns: 1fr; gap: 40px; }
    .faq-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; text-align: center; }
}
