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

:root {
    --primary: #2563eb;
    --primary-glow: rgba(37, 99, 235, 0.4);
    --bg-dark: #0f1115;
    --text-main: #e2e8f0;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    /* Background enhancement */
    background-image:
        radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 40%);
}

/* Landing Page Specifics */
.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(15, 17, 21, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
}

.logo span {
    color: #3b82f6;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: white;
}

.hero-section {
    text-align: center;
    padding: 6rem 1rem 4rem;
    max-width: 1000px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content h1 span {
    background: linear-gradient(to right, #3b82f6, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.25rem;
    color: #94a3b8;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 50px;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.5);
}

.app-section {
    padding: 2rem 1rem;
    /* Keeps original container happy */
}

.features-section {
    padding: 5rem 1rem;
    background: rgba(0, 0, 0, 0.2);
    text-align: center;
}

.features-section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.feature-card {
    background: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 20px;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(30, 41, 59, 0.6);
}

.feature-card .icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: white;
}

.feature-card p {
    color: #94a3b8;
    line-height: 1.6;
}

.seo-section {
    padding: 5rem 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.seo-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.faq-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-item h3 {
    margin-bottom: 0.5rem;
    color: #e2e8f0;
}

.faq-item p {
    color: #94a3b8;
}

footer {
    text-align: center;
    padding: 2rem;
    color: #64748b;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Setup Container Override (to fit app into section) */
.setup-container {
    /* No minimal height, let it flow */
    min-height: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /* Don't force center vertically entire page */
    padding: 20px;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 24px;
    width: 100%;
    max-width: 800px;
    /* Wider for desktop */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    color: #fff;
}

/* App Header */
.app-header {
    margin-bottom: 2rem;
}

/* Input Group */
.input-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: #94a3b8;
}

textarea {
    width: 100%;
    height: 300px;
    /* Taller */
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    color: #f1f5f9;
    font-size: 1.1rem;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* Controls Grid */
.controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Sliders */
input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Primary Button */
.primary-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #2563eb, #6366f1);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
}

/* Prompter Overlay - Must cover entire viewport */
.prompter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: scroll;
    /* Allow scrolling text */
    scrollbar-width: none;
    /* Firefox */
    scroll-behavior: auto;
    /* Manual scroll smoothness handled by JS or CSS? */
}

/* Video Preview - Must be behind text */
.webcam-preview {
    position: fixed;
    /* FIXED so it doesn't scroll with text */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Cover full screen */
    z-index: -1;
    /* Behind text */
    pointer-events: none;
    /* Let clicks pass through */
}

/* Ensure prompter hides the landing page scroll */
/* Ensure prompter hides the landing page scroll and CONTENT */
body.prompter-active {
    overflow: hidden;
}

body.prompter-active>.main-nav,
body.prompter-active>.hero-section,
body.prompter-active>.app-section {
    display: none;
    /* Hide background content so camera feed is clean */
}

.prompter-overlay::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

/* Scroll Container */
.scroll-container {
    width: 100%;
    max-width: 90%;
    /* Default margin */
    flex-grow: 1;
    /* Fill play space */
    position: relative;
    /* For absolute children if needed */
    margin-top: 100px;
    /* Space for Toolbar */
    padding-bottom: 50vh;
    /* Space to scroll last line to middle */
}

.prompter-text {
    color: white;
    font-weight: bold;
    line-height: 1.5;
    text-align: left;
    white-space: pre-wrap;
    /* Preserve newlines */
    transform-origin: center center;
    /* For mirroring */
}

.mirror-mode .prompter-text {
    transform: scaleX(-1);
}

/* Guide Line */
.guide-line {
    position: fixed;
    top: 50%;
    left: 10%;
    width: 80%;
    height: 2px;
    background-color: rgba(255, 0, 0, 0.3);
    pointer-events: none;
    z-index: 1200;
    display: none;
    /* Hidden by default until played? Or useful to have always? */
}

/* Hidden Class */
.hidden {
    display: none !important;
}

/* Privacy Badge */
.privacy-badge {
    display: inline-block;
    background: rgba(16, 185, 129, 0.1);
    /* Emerald green tint */
    color: #34d399;
    /* Emerald green text */
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 1rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .glass-panel {
        padding: 1.5rem;
        margin: 1rem;
    }

    header h1 {
        font-size: 2rem;
    }

    .controls-grid {
        grid-template-columns: 1fr;
        /* Stack controls */
        gap: 1rem;
    }

    .toolbar {
        padding: 0.5rem 1rem;
        gap: 1rem;
        justify-content: flex-start;
        /* Horizontal scroll */
    }

    .toolbar::-webkit-scrollbar {
        height: 0px;
        background: transparent;
        /* Optional: hide scrollbar */
    }

    .toolbar button {
        font-size: 1.8rem;
        /* Larger touch targets */
        padding: 0.5rem;
    }

    input[type="range"] {
        height: 12px;
        /* Thicker slider for touch */
    }

    input[type="range"]::-webkit-slider-thumb {
        width: 24px;
        /* Larger thumb */
        height: 24px;
    }

    .primary-btn {
        padding: 1.2rem;
        /* Easier to tap */
    }
}