:root {
    --bg-dark: #020402;
    /* Very dark green-black */
    --glass-bg: rgba(0, 20, 0, 0.3);
    /* Dark green tint */
    --glass-border: rgba(0, 255, 0, 0.2);
    /* More subtle */
    --text-main: #e0fbe0;
    /* Slight green tint white */
    --text-muted: #4ade80;
    /* Muted green */

    /* Unified Theme System */
    --accent-primary: #0f0;
    /* Matrix Green - MAIN BRAND COLOR */
    --accent-secondary: #008f11;
    /* Darker Green */
    --accent-glow: rgba(0, 255, 0, 0.4);

    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 8px;

    --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
    --font-code: 'Fira Code', 'Consolas', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-ui);
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    /* Subtle mesh gradient background */
    background-image:
        radial-gradient(circle at 15% 50%, rgba(0, 255, 0, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 100, 0, 0.15), transparent 35%);
}

/* Background Canvas */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    /* Changed from -1 to 0 to be visible */
    opacity: 0.15;
    pointer-events: none;
}

/* Ensure content sits above canvas */
.navbar,
.container,
.logo-marquee,
.site-footer {
    position: relative;
    z-index: 1;
}

.navbar {
    z-index: 100;
    /* Keep nav on top */
}

/* Shake Animation for Error */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.shake {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
    border-color: #ff5f56 !important;
    /* Red border hint */
    box-shadow: 0 0 10px rgba(255, 95, 86, 0.3);
}



/* Glass Card - Main Container */
.glass-container {
    flex: 1;
    width: 100%;
    max-width: 600px;
    background: rgba(2, 10, 2, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 3rem 2.5rem;
    box-shadow:
        0 25px 50px -12px rgba(0, 50, 0, 0.5),
        0 0 0 1px rgba(0, 255, 0, 0.1) inset;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    background-clip: padding-box;
}

/* Typography */
header {
    text-align: center;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    margin-bottom: 0.5rem;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 255, 0, 0.2);
}

.highlight {
    color: var(--accent-primary);
    -webkit-text-fill-color: var(--accent-primary);
    text-shadow: 0 0 20px var(--accent-glow);
}

/* Badge */
.badge {
    display: inline-block;
    background: rgba(0, 255, 0, 0.05);
    color: var(--highlight);
    border: 1px solid rgba(0, 255, 0, 0.2);
    padding: 0.5rem 1.2rem;
    border-radius: 99px;
    font-family: var(--font-code);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 2.5rem;
    /* More space below */
    /* backdrop-filter: blur(5px); Removed */
    transition: all 0.3s ease;
}

.badge:hover {
    background: rgba(0, 255, 0, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.2);
    transform: translateY(-2px);
}

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.9;
}

/* Styles Configuration Area */
.config-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.style-select-wrapper {
    flex: 3;
    position: relative;
}

/* Language Toggle */
.language-toggle {
    background: rgba(0, 10, 0, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 4px;
    display: flex;
    position: relative;
    overflow: hidden;
    min-width: 200px;
}

.language-toggle input {
    display: none;
}

.toggle-btn {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    z-index: 2;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: color 0.3s ease;
    white-space: nowrap;
}

.language-toggle input:checked+label {
    color: #000;
    /* Black text for contrast */
    text-shadow: none;
    font-weight: 700;
}

.toggle-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    width: calc(50% - 4px);
    background: var(--accent-primary);
    border-radius: calc(var(--radius-md) - 4px);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    /* box-shadow: 0 0 15px var(--accent-glow); Removed */
}

#lang-py:checked~.toggle-slider {
    transform: translateX(100%);
}

/* Unified Button & Interactive Theme */

/* Unified Button & Interactive Theme */

/* Shared Transitions */
button,
input,
select,
.toggle-btn,
.action-btn,
.cta-secondary {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base states for interactive elements */
.action-btn,
.cta-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-family: var(--font-ui);
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    gap: 0.5rem;
}

.cta-secondary {
    padding: 1rem 2rem;
    /* Larger padding for Hero button */
    background: var(--accent-primary);
    /* Green background */
    color: #000;
    /* Black text */
    border: none;
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    text-shadow: none;
    font-weight: 700;
}

.cta-secondary:hover {
    background: var(--accent-primary);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.6);
    color: #000;
    border-color: transparent;
}

.action-btn:hover {
    border-color: #fff;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.action-btn:active {
    transform: translateY(0);
}

.header-cta {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    text-decoration: none;
    line-height: 1.2;
}

/* Dropdowns & Inputs */
.input-wrapper {
    position: relative;
    width: 100%;
}

select,
input[type="text"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid var(--glass-border);
    color: #fff;
    border-radius: var(--radius-md);
    padding: 1.4rem 1.5rem;
    font-family: var(--font-ui);
    font-size: 1.1rem;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

select {
    padding: 12px 16px;
    font-size: 0.95rem;
    cursor: pointer;
    background-image: none;
    /* Ensure no native arrow */
}

select:hover,
input[type="text"]:hover {
    border-color: rgba(0, 255, 0, 0.4);
    background: rgba(0, 20, 0, 0.5) !important;
}

select:focus,
input[type="text"]:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 255, 0, 0.15);
    background: rgba(0, 30, 0, 0.6) !important;
}

.char-counter {
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: var(--font-code);
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 6px;
    pointer-events: none;
}

/* Main Action Button */
/* Main Action Button */
#btn-generate {
    width: 100%;
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    background: var(--accent-primary);
    /* Solid Green */
    border: none;
    color: #000;
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: relative;
    overflow: hidden;
}

#btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    color: #000;
}

#btn-generate:active {
    transform: translateY(0);
}

/* Code Output Window */
.code-window {
    background: #1e1e1e;
    /* Pure dark for code contrast */
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    min-height: 350px;
    /* Increased height */
    /* Ensure height */
    transition: border-color 0.3s ease;
}

.code-window:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.window-header {
    background: #2d2d2d;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #333;
}

.dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    position: relative;
}

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.filename {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: #888;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 500;
}

pre {
    padding: 2.5rem;
    /* Increased padding */
    overflow: auto;
    margin: 0;
    flex: 1;
    display: flex;
    align-items: center;
    /* Fancy scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #444 transparent;
}

code,
code * {
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: #0f0 !important;
    line-height: 1.7;
    display: block;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Secondary Actions Container */
.actions {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    /* Increased separation */
}

.action-btn {
    flex: 1;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Very subtle border */
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.action-btn svg {
    opacity: 0.8;
}

/* Unified Hover State */
.action-btn:hover {
    background: rgba(0, 255, 0, 0.1);
    border-color: rgba(0, 255, 0, 0.3);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.action-btn:hover svg {
    opacity: 1;
    color: var(--accent-primary);
}

.action-btn:active {
    transform: translateY(0);
}

/* Loader Overlay */
.loader-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--radius-lg);
    /* Match container */
}

canvas#matrix-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.6;
}

.loader-text {
    position: relative;
    z-index: 10;
    color: #0f0;
    /* Classic Matrix Green for text */
    font-family: var(--font-code);
    font-size: 1.1rem;
    background: rgba(0, 20, 0, 0.9);
    padding: 1rem 2rem;
    border: 1px solid #0f0;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
    }

    50% {
        opacity: 0.7;
        box-shadow: 0 0 10px rgba(0, 255, 0, 0.1);
    }
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 1rem;
    }

    h1 {
        font-size: 2.2rem;
    }

    .glass-container {
        padding: 1.5rem;
        border-radius: 20px;
    }

    .config-row {
        flex-direction: column;
    }

    .actions {
        flex-wrap: wrap;
    }
}

/* --- SaaS Layout --- */

/* --- SaaS Layout --- */

/* Navbar removed - using main definition below */

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.filename {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    color: #888;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 500;
}

pre {
    padding: 2.5rem;
    /* Increased padding */
    overflow: auto;
    margin: 0;
    flex: 1;
    display: flex;
    align-items: center;
    /* Fancy scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #444 transparent;
}

code,
code * {
    font-family: var(--font-code);
    font-size: 0.85rem;
    color: #0f0 !important;
    line-height: 1.7;
    display: block;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Secondary Actions Container */
.actions {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    /* Increased separation */
}

.action-btn {
    flex: 1;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Very subtle border */
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
}

.action-btn svg {
    opacity: 0.8;
}

/* Unified Hover State */
.action-btn:hover {
    background: rgba(0, 255, 0, 0.1);
    border-color: rgba(0, 255, 0, 0.3);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.action-btn:hover svg {
    opacity: 1;
    color: var(--accent-primary);
}

.action-btn:active {
    transform: translateY(0);
}

/* Loader Overlay */
.loader-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--radius-lg);
    /* Match container */
}

canvas#matrix-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.6;
}

.loader-text {
    position: relative;
    z-index: 10;
    color: #0f0;
    /* Classic Matrix Green for text */
    font-family: var(--font-code);
    font-size: 1.1rem;
    background: rgba(0, 20, 0, 0.9);
    padding: 1rem 2rem;
    border: 1px solid #0f0;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
    }

    50% {
        opacity: 0.7;
        box-shadow: 0 0 10px rgba(0, 255, 0, 0.1);
    }
}

/* Footer X Icon */
.footer-x-link.icon-only {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 1rem 0;
    transition: transform 0.2s ease, opacity 0.2s;
    opacity: 0.7;
}

.footer-x-link.icon-only:hover {
    transform: scale(1.1);
    opacity: 1;
}

.x-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
    color: #fff;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 1rem;
    }

    h1 {
        font-size: 2.2rem;
    }

    .glass-container {
        padding: 1.5rem;
        border-radius: 20px;
    }

    .config-row {
        flex-direction: column;
    }

    .actions {
        flex-wrap: wrap;
    }
}

/* --- SaaS Layout --- */

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: rgba(2, 4, 2, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.navbar .logo {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: -0.03em;
}

/* Main Containers */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.landing-page {
    /* Legacy compatibility if needed, but we will move to container */
    width: 100%;
}

/* Hero Section */
.hero-section {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center horizontally */
    text-align: center;
    /* Center text */
    flex-direction: column;
    padding: 14rem 0 4rem 0;
}

.hero-content {
    max-width: 800px;
    /* Allow more width */
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 5rem;
    /* Larger Title */
    line-height: 1.1;
    margin-bottom: 2rem;
}

.hero-content .subtitle {
    font-size: 1.3rem;
    /* Larger Subtitle */
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-ctas {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    /* Center buttons */
    margin-bottom: 3rem;
}

/* Product Section */
.product-section {
    padding: 6rem 1rem;
    display: flex;
    justify-content: center;
}

/* Infinite Marquee */
.logo-marquee {
    width: 100%;
    margin: 0;
    overflow: hidden;
    position: relative;
    padding: 2rem 0;
    /* Glassmorphism for depth */
    background: rgba(0, 10, 0, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.05);
}

/* Marquee Animation Handled by JS */
.marquee-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
    max-width: 800px;
    margin: 4rem auto 2rem auto;

    font-size: 0.9rem;
    /* Slightly larger */
    font-weight: 700;
    /* Bolder */
    text-transform: uppercase;
    letter-spacing: 4px;
    /* More spacing for grandeur */
    color: #fff;
    /* White text */
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    /* Glowing achievement effect */
    opacity: 1;
    /* Fully visible */
}

.marquee-heading::before,
.marquee-heading::after {
    content: '';
    height: 1px;
    flex: 1;
    /* Gradient lines for premium feel */
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    opacity: 0.6;
}

.marquee-content {
    display: flex;
    gap: 4rem;
    width: max-content;
    will-change: transform;
}

.marquee-content span {
    font-size: var(--marquee-text-size);
    font-weight: 700;
    color: #ffffff;
    /* Companies in White */
    opacity: 0.9;
    /* High visibility */
    white-space: nowrap;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    /* Better readability */
}

.marquee-content span i {
    margin-right: 16px;
    font-size: var(--marquee-icon-size);
    transition: transform 0.3s ease, color 0.3s ease;
    color: #ffffff;
    /* Icons white too by default */
    opacity: 0.8;
}

.marquee-content span:hover {
    color: #fff;
    opacity: 1;
    text-shadow: 0 0 10px rgba(0, 255, 0, 0.4);
    cursor: default;
}

.marquee-content span:hover i {
    transform: scale(1.2);
    color: #00ff00;
    /* Bright Electric Green */
    filter: drop-shadow(0 0 5px rgba(0, 255, 0, 0.6));
}

/* Footer Styles (Simplified) */
.site-footer {
    border-top: 1px solid var(--glass-border);
    background: rgba(0, 10, 0, 0.6);
    padding: 3rem 0;
    margin-top: 2rem;
    text-align: center;
    backdrop-filter: blur(10px);
}

.footer-content-simple {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-tagline {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 500;
    opacity: 0.8;
}

.footer-x-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 255, 0, 0.1);
    color: #0f0;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    border: 1px solid rgba(0, 255, 0, 0.3);
    transition: all 0.2s;
}

.footer-x-link:hover {
    background: #0f0;
    color: #000;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.4);
}

.copyright {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 1rem;
}

@media (max-width: 900px) {
    .hero-section {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding-top: 10rem;
        /* Ensure mobile also has space */
    }

    .hero-content {
        max-width: 100%;
        margin-bottom: 3rem;
    }

    .hero-content h1 {
        font-size: 3rem;
    }
}