:root {
    --red: #dc1414;
    --red-dark: #b01010;
    --blue: #1e64a0;
    --blue-dark: #154a78;
    --yellow: #fac832;
    --yellow-light: #ffdf6b;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-400: #94a3b8;
    --gray-600: #475569;
    --gray-800: #1e293b;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --radius-sm: 8px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--white);
    color: var(--dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.nav-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-name {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--dark);
}

.brand-version {
    font-size: 0.7rem;
    color: var(--red);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

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

.github-link {
    background: var(--dark);
    color: var(--white) !important;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
}

.github-link:hover {
    background: var(--red);
}

.download-link {
    background: var(--red);
    color: var(--white) !important;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
}

.download-link:hover {
    background: var(--red-dark);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero */
.hero {
    position: relative;
    min-height: 90vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 1.5rem 4rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(250, 200, 50, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

.hero-content {
    max-width: 560px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(220, 20, 20, 0.08);
    color: var(--red);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--red) 0%, var(--blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

.hero-desc code {
    background: var(--gray-100);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.95em;
    font-family: 'Fira Code', monospace;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.hero-download-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: rgba(30, 100, 160, 0.08);
    border: 1px solid rgba(30, 100, 160, 0.15);
    border-radius: var(--radius-sm);
}

.hero-download-bar span {
    color: var(--gray-600);
    font-size: 0.95rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat strong {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
}

.stat span {
    font-size: 0.85rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Code window */
.hero-visual {
    display: flex;
    justify-content: center;
}

.code-window {
    width: 100%;
    max-width: 520px;
    background: var(--dark);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    transition: transform 0.3s;
}

.code-window:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
}

.window-header {
    background: var(--dark-light);
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid #334155;
}

.window-header .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ef4444; }
.dot.yellow { background: #f59e0b; }
.dot.green { background: #10b981; }

.filename {
    margin-left: auto;
    color: var(--gray-400);
    font-size: 0.85rem;
    font-family: 'Fira Code', monospace;
}

.window-body {
    padding: 1.5rem;
    margin: 0;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--gray-100);
    overflow-x: auto;
}

.token-keyword { color: var(--yellow); font-weight: 600; }
.token-func { color: #60a5fa; }
.token-name { color: #f472b6; }
.token-type { color: #34d399; }
.token-string { color: #a3e635; }

/* Trust bar */
.trust-bar {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    padding: 2rem 1.5rem;
    text-align: center;
}

.trust-bar p {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.trust-logos {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.trust-item {
    color: var(--gray-400);
    font-weight: 700;
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.05rem;
}

.btn-primary {
    background: var(--red);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(220, 20, 20, 0.35);
}

.btn-primary:hover {
    background: var(--red-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 20, 20, 0.45);
}

.btn-secondary {
    background: var(--white);
    color: var(--dark);
    border: 1px solid var(--gray-200);
}

.btn-secondary:hover {
    border-color: var(--red);
    color: var(--red);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.3);
}

.btn-ghost:hover {
    background: rgba(255,255,255,0.1);
    border-color: var(--white);
}

.btn span:first-child {
    font-weight: 700;
}

.btn small {
    font-size: 0.75rem;
    opacity: 0.85;
    font-weight: 400;
}

/* Sections general */
main section {
    padding: 5rem 1.5rem;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.section-header.light h2,
.section-header.light p {
    color: var(--white);
}

.section-tag {
    display: inline-block;
    background: rgba(220, 20, 20, 0.08);
    color: var(--red);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--dark);
}

.section-header p {
    color: var(--gray-600);
    font-size: 1.1rem;
}

/* Features */
.features {
    background: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.feature-card {
    padding: 2rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    transition: all 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--red);
}

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

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.feature-card p {
    color: var(--gray-600);
    font-size: 0.95rem;
}

.feature-card code {
    background: var(--white);
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    color: var(--red);
}

/* How it works */
.how-it-works {
    background: var(--gray-50);
}

.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.step {
    flex: 1;
    min-width: 220px;
    max-width: 280px;
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--red);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.3rem;
    margin: 0 auto 1rem;
}

.step h3 {
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.step p {
    color: var(--gray-600);
    font-size: 0.95rem;
}

.step-arrow {
    font-size: 2rem;
    color: var(--red);
    font-weight: 700;
}

/* Targets */
.targets {
    background: var(--white);
}

.targets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    max-width: 1100px;
    margin: 0 auto;
}

.target-card {
    padding: 1.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    background: var(--white);
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.target-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--red);
}

.target-card.python::before { background: #3776ab; }
.target-card.js::before { background: #f7df1e; }
.target-card.cpp::before { background: #00599c; }
.target-card.csharp::before { background: #512bd4; }
.target-card.c::before { background: #a8b9cc; }

.target-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.target-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.target-icon {
    font-size: 1.5rem;
}

.target-card h3 {
    color: var(--dark);
}

.target-card p {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.target-card code {
    display: block;
    background: var(--gray-100);
    padding: 0.6rem;
    border-radius: var(--radius-sm);
    font-family: 'Fira Code', monospace;
    font-size: 0.8rem;
    color: var(--gray-800);
}

/* Playground */
.playground {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    position: relative;
}

.playground::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.playground-container {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.playground-editor,
.playground-output {
    background: var(--dark-light);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid #334155;
}

.editor-toolbar,
.output-header {
    background: #0f172a;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #334155;
    color: var(--gray-400);
    font-size: 0.85rem;
    font-family: 'Fira Code', monospace;
}

.target-select {
    background: #1e293b;
    color: var(--white);
    border: 1px solid #334155;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
}

#code {
    width: 100%;
    min-height: 320px;
    background: var(--dark-light);
    color: var(--gray-100);
    border: none;
    padding: 1rem;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    resize: vertical;
    outline: none;
}

.btn-run {
    margin: 0 1rem 1rem;
    width: calc(100% - 2rem);
}

#output {
    min-height: 320px;
    max-height: 400px;
    overflow-y: auto;
    background: var(--dark-light);
    color: #a5f3fc;
    padding: 1rem;
    margin: 0;
    font-family: 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
}

.output-code {
    color: #64748b;
}

.btn-copy {
    background: transparent;
    color: var(--gray-400);
    border: 1px solid #334155;
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.8rem;
}

.btn-copy:hover {
    color: var(--white);
    border-color: var(--white);
}

/* Testimonials */
.testimonials {
    background: var(--gray-50);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.testimonial {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.testimonial p {
    color: var(--gray-800);
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--red), var(--blue));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.author strong {
    display: block;
    color: var(--dark);
}

.author span {
    color: var(--gray-600);
    font-size: 0.85rem;
}

/* CTA */
.cta {
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    text-align: center;
    color: var(--white);
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--gray-400);
    padding: 4rem 1.5rem 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto 3rem;
}

.footer-brand p {
    margin-top: 1rem;
    max-width: 280px;
}

.footer-links h4 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.footer-links a {
    display: block;
    color: var(--gray-400);
    text-decoration: none;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--yellow);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #334155;
    font-size: 0.85rem;
}

.footer-bottom p {
    margin-bottom: 0.25rem;
}

/* Responsive */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .code-window {
        transform: none;
        max-width: 100%;
    }

    .playground-container {
        grid-template-columns: 1fr;
    }

    .steps {
        flex-direction: column;
    }

    .step-arrow {
        transform: rotate(90deg);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--gray-200);
        gap: 1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}
