:root {
    --primary: #18181b;
    /* Zinc 900 */
    --primary-light: #27272a;
    /* Zinc 800 */
    --accent: #3b82f6;
    /* Blue 500 */
    --text: #e4e4e7;
    /* Zinc 200 */
    --text-muted: #a1a1aa;
    /* Zinc 400 */
    --bg: #09090b;
    /* Zinc 950 */
    --bg-translucent: rgba(9, 9, 11, 0.9);
    --border: #27272a;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --spacing-container: 1200px;
    --header-height: 80px;
    --footer-height: 80px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: var(--header-height);
    padding-bottom: var(--footer-height);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #60a5fa;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: #fff;
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 700;
}

h1 {
    font-size: 3rem;
    letter-spacing: -0.05em;
}

h2 {
    font-size: 2.25rem;
    letter-spacing: -0.03em;
    margin-top: 3rem;
}

h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Niche Rotator Fade Animation */
.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.fade-in {
    opacity: 1;
    transition: opacity 0.5s ease-in;
}

/* Layout */
.container {
    max-width: var(--spacing-container);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Floating Top Bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: var(--bg-translucent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.top-bar .container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.05em;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.cta-button {
    background: var(--accent);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    transition: transform 0.2s, background 0.2s;
}

.cta-button:hover {
    transform: translateY(-2px);
    background: #2563eb;
    color: #fff;
}

/* Floating Bottom Bar */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--footer-height);
    background: var(--bg-translucent);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Parallax Sections */
.parallax-section {
    position: relative;
    padding: 8rem 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    min-height: 60vh;
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    /* Taller for parallax movement */
    background-size: cover;
    background-position: center;
    z-index: -1;
    opacity: 0.3;
    transform: translateZ(-1px) scale(2);
    /* CSS Parallax trick */
    transition: transform 0.1s cubic-bezier(0, 0, 0, 1);
    /* Smooth scroll */
}

.content-section {
    position: relative;
    z-index: 1;
    background: transparent;
}

/* Grid for Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.card {
    background: var(--primary-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.card h3 {
    margin-top: 0;
    color: #fff;
}

/* Footer Legal */
.site-footer {
    background: var(--primary);
    padding: 4rem 0 8rem 0;
    /* Extra bottom padding for floating bar */
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    text-align: center;
    font-size: 0.9rem;
}

.site-footer a {
    color: var(--text-muted);
    margin: 0 1rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
    }

    /* Add mobile menu later if needed */
    .container {
        padding: 0 1.5rem;
    }
}

/* --- New Interactive Styles --- */

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Quiz Section */
.quiz-container {
    background: var(--primary-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.quiz-option {
    display: block;
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    text-align: left;
    color: var(--text);
}

.quiz-option:hover {
    background: var(--primary);
    border-color: var(--accent);
}

.quiz-option.correct {
    background: rgba(16, 185, 129, 0.2);
    /* Green */
    border-color: #10b981;
}

.quiz-option.incorrect {
    background: rgba(239, 68, 68, 0.2);
    /* Red */
    border-color: #ef4444;
}

.quiz-feedback {
    margin-top: 1rem;
    font-weight: 600;
    min-height: 1.5rem;
}

/* Exit Popup */
.exit-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: none;
    /* Hidden by default */
    align-items: center;
    justify-content: center;
}

.exit-popup-content {
    background: var(--primary);
    border: 1px solid var(--accent);
    padding: 3rem;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 0 50px rgba(59, 130, 246, 0.3);
}

.exit-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.reading-time {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* Language Picker */
.language-picker {
    position: relative;
    display: inline-block;
    margin-left: 1rem;
}

.language-picker-button {
    background: var(--primary-light);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.language-picker-button:hover {
    background: var(--primary);
    border-color: var(--accent);
}

.language-picker-button::after {
    content: '▼';
    font-size: 0.7rem;
    opacity: 0.7;
}

.language-picker-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: var(--primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    min-width: 200px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: none;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.language-picker-dropdown.active {
    display: block;
}

.language-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: var(--primary-light);
}

.language-option.current {
    background: var(--primary-light);
    color: var(--accent);
    font-weight: 600;
}

.language-option.current::after {
    content: '✓';
    margin-left: 0.5rem;
}

@media (max-width: 768px) {
    .language-picker {
        margin-left: 0;
        margin-top: 1rem;
    }
    
    .language-picker-dropdown {
        right: auto;
        left: 0;
    }
}