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

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --bg: #0f172a;
    --bg-light: #1e293b;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

/* Header */
header {
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 2rem;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text);
}

.logo img {
    width: 28px;
    height: 28px;
}

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

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--text);
}

.nav-link img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.nav-link svg {
    width: 18px;
    height: 18px;
}

/* Main */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
}

/* Hero */
.hero {
    text-align: center;
    padding: 1.5rem 0 2rem;
}

.hero h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.2s, transform 0.2s;
}

.download-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.download-btn svg {
    width: 20px;
    height: 20px;
}

.version {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Preview Carousel */
.preview {
    padding: 1rem 0 2rem;
}

.carousel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.carousel-btn {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: border-color 0.2s, color 0.2s;
    flex-shrink: 0;
}

.carousel-btn:hover {
    border-color: var(--primary);
    color: var(--text);
}

.carousel-btn svg {
    width: 20px;
    height: 20px;
}

.carousel-track {
    position: relative;
    width: 280px;
    height: 420px;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.slide-label {
    margin-top: 0.75rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

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

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

.dot.active {
    background: var(--primary);
}

/* Features */
.features {
    padding: 1.5rem 0;
}

.features h2 {
    text-align: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.feature {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    transition: border-color 0.2s;
}

.feature:hover {
    border-color: var(--primary);
}

.feature-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.feature h3 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.feature p {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.4;
}

/* Hotkeys */
.hotkeys {
    padding: 1.5rem 0 1rem;
    text-align: center;
}

.hotkeys h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.hotkey-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

.hotkey {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
}

kbd {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-family: monospace;
    font-size: 0.75rem;
    font-weight: 600;
}

.hotkey span {
    color: var(--text-muted);
}

/* Support Page */
.support-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 700px;
    margin: 0 auto;
}

.support-card {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.2s, transform 0.2s;
    text-align: center;
}

.support-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.support-card svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    color: var(--primary);
}

.support-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.support-card p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.bug-report {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.bug-report .support-card {
    max-width: 300px;
}

/* Discussions */
.discussions {
    max-width: 800px;
    margin: 0 auto;
}

.discussions h2 {
    text-align: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.giscus-container {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
}

/* Tabs */
.tabs-container {
    max-width: 900px;
    margin: 0 auto;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.tab {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.tab:hover {
    color: var(--text);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

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

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.faq-item summary {
    padding: 1rem 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    margin-left: auto;
    font-size: 1.25rem;
    color: var(--text-muted);
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-icon {
    font-size: 1.25rem;
}

.faq-answer {
    padding: 0 1.25rem 1.25rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.faq-answer p {
    margin-bottom: 1rem;
}

.faq-answer h4 {
    color: var(--text);
    margin: 1.5rem 0 0.75rem;
    font-size: 1rem;
}

.faq-answer ol,
.faq-answer ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.faq-answer li {
    margin-bottom: 0.5rem;
}

.faq-answer a {
    color: var(--primary);
}

.faq-answer a:hover {
    text-decoration: underline;
}

.faq-answer kbd {
    margin: 0 0.25rem;
}

.error-box {
    background: var(--bg);
    border: 1px solid #ef4444;
    border-left: 4px solid #ef4444;
    border-radius: 4px;
    padding: 1rem;
    font-family: monospace;
    font-size: 0.85rem;
    margin: 1rem 0;
    color: var(--text);
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
}

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

footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    header {
        padding: 0.75rem 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-link span {
        display: none;
    }

    main {
        padding: 1rem;
    }

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

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

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

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

    .tabs {
        flex-wrap: wrap;
    }

    .tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .carousel-track {
        width: 220px;
        height: 330px;
    }

    .carousel-btn {
        width: 32px;
        height: 32px;
    }

    .carousel-btn svg {
        width: 16px;
        height: 16px;
    }
}
