/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Flathub branding colors - light scheme */
    --primary-color: #f9f06b;
    --primary-dark: #094185;
    --secondary-color: #6c757d;
    --background: #ffffff;
    --surface: #f8f9fa;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.15);
    --hero-gradient-start: #62a0ea;
    --hero-gradient-end: #094185;
}

@media (prefers-color-scheme: dark) {
    :root {
        /* Flathub branding colors - dark scheme */
        --primary-color: #1c71d8;
        --primary-dark: #094185;
        --secondary-color: #9a9996;
        --background: #1e1e1e;
        --surface: #2d2d2d;
        --text-primary: #f6f5f4;
        --text-secondary: #deddda;
        --border-color: #3d3d3d;
        --shadow: rgba(0, 0, 0, 0.3);
        --shadow-lg: rgba(0, 0, 0, 0.5);
        --hero-gradient-start: #1c71d8;
        --hero-gradient-end: #094185;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header & Navigation */
header {
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: var(--background);
}

@media (prefers-color-scheme: light) {
    header {
        background-color: rgba(255, 255, 255, 0.95);
    }
}

@media (prefers-color-scheme: dark) {
    header {
        background-color: rgba(30, 30, 30, 0.95);
    }
}

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

nav.container {
    padding: 1.5rem 2rem !important;
}

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

.logo-img {
    width: 40px;
    height: 40px;
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 2rem 4rem;
    background: linear-gradient(135deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    color: white;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.tagline {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.version-badge {
    display: inline-block;
    margin-top: 2rem;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--primary-color);
}

.btn-download {
    background-color: var(--primary-color);
    color: white;
    width: 100%;
    text-align: center;
}

.btn-download:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-lg);
}

/* Sections */
section {
    padding: 5rem 0;
}

section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Features Section */
.features {
    background-color: var(--surface);
}

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

.feature-card {
    background-color: var(--background);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--shadow-lg);
}

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

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Screenshots Section */
.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.screenshot-item {
    text-align: center;
}

.screenshot-item img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 16px var(--shadow-lg);
    transition: transform 0.3s ease;
}

.screenshot-item img:hover {
    transform: scale(1.02);
}

.screenshot-item p {
    margin-top: 1rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Download Section */
.download {
    background-color: var(--surface);
}

.download-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto 3rem;
}

.download-card {
    background-color: var(--background);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
    text-align: center;
}

.download-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.download-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.download-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.source-download {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.source-download p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.code-block {
    background-color: #212529;
    color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: left;
    overflow-x: auto;
}

@media (prefers-color-scheme: dark) {
    .code-block {
        background-color: #1e1e1e;
    }
}

.code-block code {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.8;
    white-space: pre;
}

/* Tech Stack Section */
.tech-stack {
    background-color: var(--background);
}

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

.tech-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: var(--surface);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.tech-name {
    font-weight: 600;
    color: var(--text-primary);
}

.tech-version {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Footer */
footer {
    background-color: #212529;
    color: white;
    padding: 3rem 0 1rem;
}

@media (prefers-color-scheme: dark) {
    footer {
        background-color: #2d2d2d;
    }
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Documentation Section */
.documentation {
    background-color: var(--background);
}

.documentation .container {
    max-width: 1400px;
}

.doc-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 3rem;
    align-items: start;
}

.doc-nav {
    position: sticky;
    top: 2rem;
}

.doc-nav h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.doc-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.doc-nav-list li {
    margin-bottom: 0.5rem;
}

.doc-nav-list a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.doc-nav-list a:hover {
    background-color: var(--surface);
    color: var(--primary-color);
}

.doc-nav-list a.active {
    background-color: var(--primary-color);
    color: white;
}

.doc-main {
    min-width: 0;
}

.doc-section {
    width: 100%;
}

.doc-section h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.doc-content {
    background-color: var(--surface);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow);
}

.doc-content h4 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.doc-content h4:first-child {
    margin-top: 0;
}

.doc-content h5 {
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.doc-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.doc-list {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.doc-list li {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.doc-list ul,
.doc-list ol {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.doc-list code {
    background-color: var(--background);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.doc-subsection {
    margin-top: 1.5rem;
    padding-left: 1.5rem;
    border-left: 3px solid var(--primary-color);
}

.doc-content pre {
    background-color: #212529;
    color: #f8f9fa;
    padding: 1.25rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0 1.5rem 0;
}

@media (prefers-color-scheme: dark) {
    .doc-content pre {
        background-color: #1e1e1e;
    }
}

.doc-content pre code {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    background: none;
    border: none;
    padding: 0;
    color: #f8f9fa;
}

.doc-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.doc-content a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.doc-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .tagline {
        font-size: 1.2rem;
    }

    .nav-links {
        gap: 1rem;
    }

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

    section {
        padding: 3rem 0;
    }

    section h2 {
        font-size: 2rem;
    }

    .doc-content {
        padding: 1.5rem;
    }

    .doc-section h3 {
        font-size: 1.5rem;
    }

    .doc-content h4 {
        font-size: 1.25rem;
    }

    .doc-subsection {
        padding-left: 1rem;
    }

    .doc-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .doc-nav {
        position: static;
        border-bottom: 2px solid var(--border-color);
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }

    .doc-nav h3 {
        font-size: 1.1rem;
    }

    .doc-nav-list {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .doc-nav-list li {
        margin-bottom: 0;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}
