/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-card: #1c2230;
    --bg-card-hover: #222d3d;
    --bg-code: #0d1117;
    --bg-input: #21262d;

    --accent: #00e676;
    --accent-dim: #00c853;
    --accent-glow: rgba(0, 230, 118, 0.15);
    --accent-secondary: #64ffda;

    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #484f58;
    --text-code: #79c0ff;

    --syn-keyword: #ff7b72;
    --syn-string: #a5d6ff;
    --syn-comment: #8b949e;
    --syn-function: #d2a8ff;

    --border: #30363d;
    --border-light: #21262d;

    --donate-coffee: #ffdd00;
    --donate-mono: #00e676;
    --donate-paypal: #0070ba;

    --container: 1120px;
    --radius: 8px;
    --radius-lg: 16px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

code, pre, .code-block {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

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

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

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.25rem;
    font-weight: 700;
}

.logo-bracket {
    color: var(--accent);
}

.logo-text {
    color: var(--text-primary);
    margin: 0 2px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 28px;
    align-items: center;
}

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

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

.btn-nav {
    background: var(--accent) !important;
    color: var(--bg-primary) !important;
    padding: 8px 20px;
    border-radius: var(--radius);
    font-weight: 600 !important;
    transition: background 0.2s, transform 0.2s !important;
}

.btn-nav:hover {
    background: var(--accent-dim) !important;
    transform: translateY(-1px);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ===== LANGUAGE TOGGLE ===== */
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s;
}

.lang-toggle:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.lang-flag {
    font-size: 1.1rem;
}

.lang-code {
    letter-spacing: 1px;
}

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.burger span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: 0.3s;
}

/* ===== HERO ===== */
.hero {
    position: relative;
    padding: 160px 0 100px;
    overflow: hidden;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-bg-code {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--border);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0.3;
    user-select: none;
}

.hero-content {
    position: relative;
    text-align: center;
}

.terminal-badge {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--accent);
    background: var(--accent-glow);
    border: 1px solid rgba(0, 230, 118, 0.3);
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.highlight {
    color: var(--accent);
    position: relative;
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
}

.btn-primary:hover {
    background: var(--accent-dim);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--accent-glow);
}

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

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.1rem;
}

.btn-icon {
    font-size: 1.1em;
}

/* Hero stats */
.hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-value {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-divider {
    width: 1px;
    height: 36px;
    background: var(--border);
}

/* ===== SECTIONS ===== */
.section {
    padding: 96px 0;
}

.section-alt {
    background: var(--bg-secondary);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 48px;
    text-align: center;
}

.comment {
    color: var(--syn-comment);
    font-family: 'JetBrains Mono', monospace;
}

/* ===== FEATURES ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

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

.feature-card h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
}

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

/* ===== PIPELINE ===== */
.pipeline {
    display: flex;
    align-items: stretch;
    gap: 12px;
    margin-bottom: 48px;
    flex-wrap: wrap;
    justify-content: center;
}

.pipeline-step {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    flex: 1;
    min-width: 200px;
    max-width: 260px;
    transition: border-color 0.3s;
}

.pipeline-step:hover {
    border-color: var(--accent);
}

.step-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 12px;
}

.step-content h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

.step-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.step-content code {
    color: var(--text-code);
    background: var(--bg-code);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
}

.pipeline-arrow {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
}

/* ===== CODE BLOCK ===== */
.code-block {
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    max-width: 700px;
    margin: 0 auto;
}

.code-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

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

.code-dot.red { background: #ff5f56; }
.code-dot.yellow { background: #ffbd2e; }
.code-dot.green { background: #27c93f; }

.code-title {
    margin-left: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.code-block pre {
    padding: 24px;
    font-size: 0.9rem;
    line-height: 1.7;
    overflow-x: auto;
}

.code-keyword { color: var(--syn-keyword); }
.code-string { color: var(--syn-string); }
.code-comment { color: var(--syn-comment); font-style: italic; }
.code-function { color: var(--syn-function); }

/* ===== USAGE ===== */
.usage-tabs {
    display: flex;
    gap: 0;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 400px;
    margin: 0 auto 36px;
}

.usage-tab {
    flex: 1;
    padding: 12px 24px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    transition: all 0.2s;
}

.usage-tab.active {
    background: var(--accent);
    color: var(--bg-primary);
}

.usage-tab:hover:not(.active) {
    background: var(--bg-card);
    color: var(--text-primary);
}

.usage-content {
    display: none;
    max-width: 640px;
    margin: 0 auto;
}

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

.usage-steps {
    list-style: none;
    counter-reset: step;
}

.usage-steps li {
    padding: 16px 20px 16px 48px;
    position: relative;
    border-left: 2px solid var(--border);
    margin-left: 12px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.usage-steps li:last-child {
    border-left-color: transparent;
}

.step-mark {
    position: absolute;
    left: -10px;
    top: 16px;
    width: 20px;
    height: 20px;
    background: var(--bg-primary);
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    color: var(--accent);
}

.usage-steps li strong {
    color: var(--text-primary);
}

/* ===== REQUIREMENTS ===== */
.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.req-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
}

.req-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.req-card h3 {
    margin-bottom: 8px;
}

.req-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.req-card code {
    color: var(--text-code);
    background: var(--bg-code);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* ===== DOWNLOAD ===== */
.section-download {
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.download-box {
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: var(--radius-lg);
    padding: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
    box-shadow: 0 0 40px var(--accent-glow);
    margin-bottom: 48px;
}

.download-info h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.download-info p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.download-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.download-meta code {
    background: var(--bg-code);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--text-code);
}

/* Video section */
.video-section {
    text-align: center;
    margin-top: 48px;
}

.video-title {
    font-size: 1.5rem;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ===== DONATE ===== */
.donate-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: -24px auto 48px;
    line-height: 1.7;
}

.donate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 36px;
}

.donate-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.donate-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.donate-card-featured {
    border-color: var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
}

.donate-featured-label {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--bg-primary);
    padding: 4px 16px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.donate-icon {
    font-size: 2.5rem;
    margin-bottom: 4px;
}

.donate-card h3 {
    font-size: 1.15rem;
}

.donate-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.donate-badge {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent);
    background: var(--accent-glow);
    border: 1px solid rgba(0, 230, 118, 0.3);
    padding: 4px 12px;
    border-radius: 12px;
}

.btn-donate {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    margin-top: auto;
    width: 100%;
    justify-content: center;
}

.btn-coffee {
    background: var(--donate-coffee);
    color: #1a1a1a;
}

.btn-coffee:hover {
    background: #e6c700;
    color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 221, 0, 0.3);
}

.btn-mono {
    background: var(--donate-mono);
    color: var(--bg-primary);
}

.btn-mono:hover {
    background: var(--accent-dim);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-paypal {
    background: var(--donate-paypal);
    color: #fff;
}

.btn-paypal:hover {
    background: #005ea6;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 112, 186, 0.3);
}

.btn-kofi {
    background: #ff5e5b;
    color: #fff;
}

.btn-kofi:hover {
    background: #e04e4b;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 94, 91, 0.3);
}

.donate-thanks {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 48px 0;
    text-align: center;
}

.footer-logo {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.footer-license {
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    margin-bottom: 8px;
    opacity: 0.8;
}

.footer-copy {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ===== CONTACTS ===== */
.contacts-box {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    max-width: 700px;
    margin: 0 auto;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 36px;
    transition: border-color 0.3s, transform 0.3s;
}

.contact-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.contact-icon {
    font-size: 2rem;
}

.contact-item h3 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.contact-item a {
    color: var(--accent);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===== SELECTION ===== */
::selection {
    background: var(--accent);
    color: var(--bg-primary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
    }

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

    .burger {
        display: flex;
    }

    .hero {
        padding: 120px 0 60px;
        min-height: auto;
    }

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

    .pipeline {
        flex-direction: column;
        align-items: center;
    }

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

    .pipeline-step {
        max-width: 100%;
    }

    .download-box {
        flex-direction: column;
        text-align: center;
        padding: 32px;
    }

    .hero-bg-code {
        font-size: 1.5rem;
    }

    .hero-stats {
        gap: 16px;
    }

    .stat-divider {
        display: none;
    }

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

@media (max-width: 480px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 64px 0;
    }

    .section-title {
        font-size: 1.5rem;
    }
}
