:root {
    /* Color Palette - Vibrant & Premium */
    --primary-color: #050505;
    /* Blackest black */
    --secondary-color: #0a0a0a;
    /* Deep dark */

    /* Vibrant Neon Accents */
    --accent-color: #00ff9d;
    /* Neon Green */
    --accent-hover: #00cc7d;
    --accent-blue: #00f0ff;
    /* Cyan */
    --accent-purple: #bd00ff;
    /* Neon Purple */

    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --border-color: #222;
    --card-bg: #111;

    --gradient-start: #00ff9d;
    --gradient-end: #00f0ff;

    /* Typography */
    --font-heading: 'Cal Sans', 'Inter', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Spacing */
    --container-max-width: 1200px;
    --header-height: 80px;

    /* Effects */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.8);
    --shadow-lg: 0 10px 15px -3px rgba(0, 255, 157, 0.1);
    /* Green glow */
    --radius-md: 8px;
    --radius-lg: 16px;
}

/* Light Mode Variables */
body.light-mode {
    --primary-color: #ffffff;
    --secondary-color: #f4f6f8;

    --accent-color: #00a86b;
    /* Darker Green for contrast */
    --accent-hover: #008f5d;
    --accent-blue: #007acc;
    --accent-purple: #8e44ad;

    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --border-color: #e1e4e8;
    --card-bg: #ffffff;
    --shadow-lg: 0 10px 15px -3px rgba(0, 168, 107, 0.15);
}

/* Light Mode Overrides for Premium Feel */
body.light-mode .feature-card {
    background: linear-gradient(145deg, #ffffff, #f4f6f8);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e1e4e8;
}

body.light-mode .footer-cta h2 {
    background: linear-gradient(120deg, #1a1a1a, #00a86b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.light-mode .footer-cta {
    background: linear-gradient(180deg, #ffffff 0%, rgba(35, 134, 54, 0.05) 100%);
}

/* Theme Toggle Button */
.theme-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn:hover {
    color: var(--accent-color);
    background-color: rgba(128, 128, 128, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--primary-color);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    line-height: 1.2;
}

/* Container */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header & Nav */
header {
    background-color: rgba(13, 17, 23, 0.85);
    /* Glassmorphism */
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    height: var(--header-height);
    display: flex;
    align-items: center;
}

body.light-mode header {
    background-color: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid var(--border-color);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    max-width: var(--container-max-width);
    padding: 0 1.5rem;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-left: auto;
    /* Pushes links to the right */
    padding-left: 2rem;
    /* Minimum barrier from logo */
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.github-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.2s;
}

.github-link:hover {
    background-color: var(--border-color);
    border-color: var(--text-secondary);
}

/* Hero Section */
#hero {
    position: relative;
    padding: 0;
    border-top: none;
    overflow: hidden;
}

#hero .hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 10% 20%, rgba(35, 134, 54, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(31, 111, 235, 0.15) 0%, transparent 40%);
    z-index: -1;
    pointer-events: none;
}

.hero-content {
    margin-top: 100px;
    /* Offset for fixed header */
    text-align: center;
    padding: 6rem 0 8rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.eyebrow-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: rgba(56, 139, 253, 0.1);
    border: 1px solid rgba(56, 139, 253, 0.4);
    color: #58a6ff;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 1px rgba(27, 31, 35, 0.15), 0 1px 0 rgba(27, 31, 35, 0.04);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(35, 134, 54, 0.4);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--text-secondary);
    background-color: var(--secondary-color);
}

/* Badges */
.badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-md);
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.badge i {
    color: var(--text-primary);
}

/* Main Content Sections */
section {
    padding: 5rem 0;
    border-top: 1px solid rgba(48, 54, 61, 0.5);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Grids & Cards */
.grid {
    display: grid;
    gap: 2rem;
}

.feature-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--text-secondary);
    box-shadow: var(--shadow-lg);
}

/* Feature Cards (Why SponsorStream) */
.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px -10px rgba(0, 255, 157, 0.1);
}

.feature-card .icon-box {
    width: 56px;
    height: 56px;
    background: rgba(35, 134, 54, 0.1);
    color: var(--accent-color);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(35, 134, 54, 0.2);
    transition: all 0.3s ease;
}

.feature-card:hover .icon-box {
    background: var(--accent-color);
    color: #0d1117;
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.4);
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.feature-card ul {
    margin-top: 1rem;
    padding-left: 1rem;
}

.feature-card li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* Use Cases */
.three-col {
    grid-template-columns: repeat(3, 1fr);
}

.four-col {
    grid-template-columns: repeat(4, 1fr);
}

.use-case-card {
    text-align: center;
    padding: 3rem 2rem;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    background: rgba(0, 255, 157, 0.05);
    width: 80px;
    height: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(0, 255, 157, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 157, 0.1);
    transition: all 0.3s ease;
}

.use-case-card:hover .card-icon {
    transform: scale(1.1);
    color: var(--accent-blue);
    border-color: var(--accent-blue);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.2);
}

/* Flow Steps */
.steps-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.step-item {
    position: relative;
    padding: 1rem;
}

.step-number {
    font-size: 4rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.05);
    margin-bottom: -1.5rem;
    z-index: 0;
    position: relative;
}

body.light-mode .step-number {
    color: rgba(0, 0, 0, 0.05);
}

.step-item h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.step-item p {
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

/* Architecture */
.architecture-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.arch-card {
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.arch-card.engine {
    background: linear-gradient(180deg, var(--card-bg) 0%, rgba(35, 134, 54, 0.05) 100%);
    border-top: 3px solid var(--accent-color);
}

.arch-card.studio {
    background: linear-gradient(180deg, var(--card-bg) 0%, rgba(31, 111, 235, 0.05) 100%);
    border-top: 3px solid #1f6feb;
}

.arch-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.badge-sm {
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code-block {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    color: #e6edf3;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.feature-list i {
    color: var(--accent-color);
}

/* CTA Section */
.cta-section {
    text-align: center;
    background: linear-gradient(180deg, rgba(22, 27, 34, 0) 0%, rgba(35, 134, 54, 0.1) 100%);
}

.installation-steps {
    max-width: 800px;
    margin: 3rem auto 0;
    text-align: left;
}

.install-step {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.install-step span {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}

.install-step pre {
    margin: 0;
    background-color: var(--secondary-color);
    border: none;
    padding: 1rem;
    border-radius: 6px;
    color: var(--text-primary);
    font-family: inherit;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    font-size: 0.9rem;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .three-col,
    .four-col,
    .steps-container,
    .architecture-grid,
    .why-grid {
        grid-template-columns: 1fr;
    }

    .install-step {
        padding: 1rem;
    }

    .install-step pre {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .footer-cta h2 {
        font-size: 2rem;
    }
}

/* Footer & Contact */
.footer-cta {
    background: linear-gradient(180deg, var(--bg-color) 0%, rgba(35, 134, 54, 0.05) 100%);
    border-top: 1px solid var(--border-color);
    text-align: center;
    padding: 8rem 0;
    position: relative;
    overflow: hidden;
}

.footer-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    opacity: 0.5;
}

.footer-cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(120deg, #fff, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-cta p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn-outline {
    border: 1px solid var(--border-color);
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.03);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(35, 134, 54, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 157, 0.1);
}
}

.btn-outline:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.05);
}

footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

footer a {
    color: var(--text-secondary);
    text-decoration: underline;
}

footer a:hover {
    color: var(--accent-color);
}

/* Navigation Fix */
.nav-links {
    display: flex;
    gap: 1.5rem;
    /* Reduced gap to fit more items */
    align-items: center;
}

.nav-links a {
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Tabs for Deep Dive */
.tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    border-color: var(--accent-color);
    color: var(--text-primary);
    box-shadow: 0 0 10px rgba(0, 255, 157, 0.2);
}

.tab-btn.active {
    background-color: rgba(0, 255, 157, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
    box-shadow: 0 0 15px rgba(0, 255, 157, 0.3);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.demo-placeholder {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 4rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.demo-placeholder .icon-box {
    font-size: 3rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* FAQ Accordion */
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--accent-blue);
}

.faq-item.active {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(0, 255, 157, 0.1);
}

.faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-heading);
}

.faq-question i {
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
    color: var(--accent-color);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: rgba(255, 255, 255, 0.02);
}

.faq-answer p {
    padding: 1.5rem;
    padding-top: 0;
    margin: 0;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .three-col,
    .four-col,
    .steps-container,
    .architecture-grid,
    .faq-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
        /* In a real implementation we'd add a mobile menu toggler */
    }

    nav {
        justify-content: center;
    }

    .hero-buttons {
        flex-direction: column;
    }
}