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

:root {
    --bg: #0d1117;
    --bg-alt: #161b22;
    --bg-card: #1c2128;
    --text: #e6edf3;
    --text-muted: #8b949e;
    --accent: #10b981;
    --accent-hover: #059669;
    --accent-glow: rgba(16, 185, 129, 0.25);
    --border: #30363d;
    --radius: 12px;
    --radius-sm: 8px;
    --max-width: 1120px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

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

a:hover {
    text-decoration: underline;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background: var(--accent-hover);
    text-decoration: none;
    box-shadow: 0 0 20px var(--accent-glow);
}

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

.btn-secondary:hover {
    border-color: var(--text-muted);
    text-decoration: none;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.125rem;
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 0;
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.navbar.scrolled {
    background: rgba(13, 17, 23, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.nav-logo img {
    border-radius: 6px;
    filter: invert(1);
}

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

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

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

.nav-github {
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

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

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s;
}

/* ===== Hero ===== */
.hero {
    padding: 160px 0 100px;
    text-align: center;
    background: radial-gradient(ellipse at 50% 0%, rgba(16, 185, 129, 0.08) 0%, transparent 60%);
}

.hero-logo {
    width: 140px;
    height: auto;
    margin-bottom: 32px;
    filter: invert(1) drop-shadow(0 4px 24px var(--accent-glow));
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    max-width: 720px;
    margin: 0 auto 20px;
}

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

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

/* ===== Features ===== */
.features {
    padding: 100px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

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

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

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

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== Screenshots ===== */
.screenshots {
    padding: 100px 0;
    background: var(--bg-alt);
}

.screenshot-gallery {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.screenshot-viewport {
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: #000;
}

.screenshot-item {
    display: none;
}

.screenshot-item.active {
    display: block;
}

.screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
}

.screenshot-item figcaption {
    padding: 16px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
}

.screenshot-nav {
    display: flex;
    justify-content: space-between;
    position: absolute;
    top: 50%;
    left: -60px;
    right: -60px;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 2;
}

.screenshot-prev,
.screenshot-next {
    pointer-events: all;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}

.screenshot-prev:hover,
.screenshot-next:hover {
    background: var(--bg-alt);
    border-color: var(--accent);
}

.screenshot-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.dot.active {
    background: var(--accent);
    transform: scale(1.2);
}

.dot:hover {
    background: var(--text-muted);
}

/* ===== Download ===== */
.download {
    padding: 100px 0;
    text-align: center;
}

.download-content p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

.download-buttons {
    margin-bottom: 48px;
}

.download-info {
    display: inline-block;
    text-align: left;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 36px;
}

.download-info p {
    font-size: 0.95rem;
    margin-bottom: 12px;
    color: var(--text);
}

.download-info ul {
    list-style: none;
    padding: 0;
}

.download-info li {
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 4px 0;
}

.download-info li::before {
    content: "\2022";
    color: var(--accent);
    margin-right: 8px;
}

/* ===== Footer ===== */
.footer {
    padding: 32px 0;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.footer-left img {
    border-radius: 4px;
    filter: invert(1);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.footer-right p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero {
        padding: 120px 0 60px;
    }

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

    .hero-sub {
        font-size: 1rem;
    }

    .hero-logo {
        width: 100px;
    }

    h2 {
        font-size: 1.5rem;
        margin-bottom: 32px;
    }

    .features, .screenshots, .download {
        padding: 60px 0;
    }

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

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(13, 17, 23, 0.96);
        backdrop-filter: blur(12px);
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
    }

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

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .screenshot-nav {
        left: -8px;
        right: -8px;
    }

    .screenshot-prev,
    .screenshot-next {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .download-info {
        padding: 20px 24px;
    }
}
