:root {
    /* Cozy light theme */
    --bg-color: #f5f0e8;
    --bg-secondary: #eae5dd;
    --text-color: #2a2520;
    --text-secondary: #5a5248;
    --accent-color: #8b5a2b;
    --code-bg: #f8f5f0;
    --border-color: #e0d8cc;
    --header-bg: #f5f0e8;
    --header-color: #2a2520;
    --shadow: rgba(0, 0, 0, 0.08);

    /* Syntax highlighting colors - warm tones */
    --keyword-color: #8b5a2b;
    --string-color: #6b8e23;
    --comment-color: #96897f;
    --function-color: #b8860b;
    --variable-color: #a0522d;

    /* Changelog colors - warm tones */
    --added-bg: #e8f0e0;
    --added-color: #5a7d2b;
    --changed-bg: #f0e8d8;
    --changed-color: #8b5a2b;
    --fixed-bg: #f5efd0;
    --fixed-color: #8b7d2b;
    --details-bg: #f8f5f0;
    --details-bg-open: #eae5dd;
    --details-border: #e0d8cc;

    /* Line numbers and gutter - warm tones */
    --line-number-color: #a39688;
    --gutter-bg: #eae5dd;
}

@media (prefers-color-scheme: dark) {
    :root {
        /* Code editor inspired dark theme (like VS Code dark) */
        --bg-color: #1e1e1e;
        --bg-secondary: #252526;
        --text-color: #d4d4d4;
        --text-secondary: #a0a0a0;
        --accent-color: #569cd6;
        --code-bg: #1e1e1e;
        --border-color: #3e3e42;
        --header-bg: #121212;
        --header-color: #ffffff;
        --shadow: rgba(0, 0, 0, 0.4);

        /* Syntax highlighting colors - dark mode */
        --keyword-color: #569cd6;
        --string-color: #ce9178;
        --comment-color: #6a9955;
        --function-color: #dcdcaa;
        --variable-color: #9cdcfe;

        /* Changelog colors - dark mode */
        --added-bg: #1b3a1c;
        --added-color: #7cc07c;
        --changed-bg: #1a365d;
        --changed-color: #79b8ff;
        --fixed-bg: #3e2e00;
        --fixed-color: #e5c07b;
        --details-bg: #252526;
        --details-bg-open: #2d2d2d;
        --details-border: #3e3e42;

        /* Line numbers and gutter - dark mode */
        --line-number-color: #858585;
        --gutter-bg: #252526;
    }
}

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

body {
    font-family: "IBM Plex Mono", monospace;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    font-size: 16px;
}

.container {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 20px 0 15px;
    position: sticky;
    top: 0;
    z-index: 100;
}

header.header-scrolled {
    padding: 5px 0;
}

.header-content {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

header.header-scrolled .header-content {
    justify-content: flex-start;
}

.logo {
    font-size: 2rem;
}

header.header-scrolled .logo {
    opacity: 0;
    visibility: hidden;
    height: 0;
    margin: 0;
}

.logo-image {
    max-width: 120px;
    height: auto;
    border-radius: 8px;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.nav-container {
    display: flex;
    padding: 0.4rem 0;
    overflow-x: auto;
    white-space: nowrap;
}

header.header-scrolled .nav-container {
    padding: 0.2rem 0;
    width: 100%;
}

.nav-container a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.3rem 0.8rem;
    margin: 0 0.3rem;
    font-size: 0.9rem;
    font-weight: 500;
}

header.header-scrolled .nav-container a {
    padding: 0.2rem 0.6rem;
    margin: 0 0.2rem;
}

.nav-container a:hover {
    color: var(--accent-color);
}

section {
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

section:first-of-type {
    padding-top: 2rem;
}

#features {
    padding: 2rem 0;
}

section:last-child {
    border-bottom: none;
}

h2 {
    font-family: "IBM Plex Mono", monospace;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

section {
    position: relative;
}

h3 {
    font-size: 1.3rem;
    margin: 2rem 0 1rem;
    font-weight: 600;
    color: var(--text-color);
}

p {
    margin-bottom: 1.2rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.feature p {
    margin-bottom: 0;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
    padding-left: 1.6rem;
}

pre {
    background-color: var(--code-bg);
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1rem 0;
    border: 1px solid var(--border-color);
}

code {
    font-family: "IBM Plex Mono", monospace;
    color: var(--text-color);
    font-size: 0.85rem;
}

pre code {
    line-height: 1.5;
}

.feature-grid {
    display: flex;
    flex-direction: column;
    margin: 1rem 0;
}

.feature {
    display: flex;
    align-items: flex-start;
    padding: 0.3rem 0;
    margin-bottom: 0.3rem;
    font-family: "IBM Plex Mono", monospace;
    border-bottom: 1px solid var(--border-color);
}

.feature:last-child {
    border-bottom: none;
}

.feature-icon {
    display: flex;
    align-items: center;
    margin-right: 1rem;
    min-width: 200px;
}

.feature-icon i {
    color: var(--accent-color);
    margin-right: 0.5rem;
    font-size: 1rem;
    min-width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.feature-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    display: inline;
}

.feature p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    flex: 1;
}

/* Button styles moved to new download-button class */
.button-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1.5rem auto;
    width: 100%;
    text-align: center;
}

.download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.4rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px var(--shadow);
    letter-spacing: 0.5px;
    width: auto;
    min-width: 180px;
    margin: 0 auto; /* Add this to center the button */
    text-align: center;
}

.download-button {
    background-color: var(--bg-secondary);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.download-button:hover {
    color: var(--accent-color);
}

/* Icon in button */
.download-button i {
    margin-right: 0.6rem; /* Reduced margin */
    font-size: 1rem; /* Smaller icon */
}

.command {
    display: inline-block;
    background-color: var(--code-bg);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-family: "IBM Plex Mono", monospace;
    font-size: 0.9rem;
}

.example {
    margin-bottom: 2rem;
}

.example h3 {
    position: relative;
    display: inline-block;
}


.example-description {
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
}

footer {
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: 2rem 0;
    text-align: center;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
}

footer a {
    color: var(--text-color);
    margin: 0 0.5rem;
    text-decoration: none;
}

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

.footer-links {
    margin-top: 1rem;
}

.version-badge {
    display: inline-block;
    color: var(--accent-color);
    font-size: 0.8rem;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* Code editor and terminal styling */
.terminal {
    position: relative;
    background-color: var(--code-bg);
    border-radius: 4px;
    margin: 1.5rem 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
    font-family: "IBM Plex Mono", monospace;
}

pre {
    position: relative;
    border-radius: 4px;
    padding: 1rem;
    overflow-x: auto;
}

pre code {
    display: block;
    font-family: "IBM Plex Mono", monospace;
}

.terminal-header {
    background-color: var(--bg-secondary);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
}

.terminal-dots {
    display: none;
}

.terminal-title {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
}

.terminal-body {
    padding: 0.5rem;
    color: var(--text-color);
    font-size: 0.85rem;
    line-height: 1.6;
}

.terminal-body pre {
    padding: 0.5rem;
    border: none;
}

.terminal-prompt {
    color: var(--accent-color);
    font-weight: bold;
}

.cmd-success {
    color: #27c93f;
}

.cmd-bullet {
    color: var(--accent-color);
}

.version-old {
    color: var(--comment-color);
    text-decoration: line-through;
    opacity: 0.8;
}

.version-new {
    color: var(--string-color);
    font-weight: bold;
}

/* Changelog Styles - Table-like layout */
.changelog {
    margin-bottom: 2rem;
}

.changelog details {
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.changelog summary {
    cursor: pointer;
    font-weight: 600;
    outline: none;
    display: flex;
    align-items: center;
}

.changelog details[open] {
    background-color: var(--bg-secondary);
}

.changelog-content {
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

/* Table styling */
.changelog-table {
    width: 100%;
    border-collapse: collapse;
    font-family: "IBM Plex Mono", monospace;
    margin-bottom: 0.5rem;
}

.changelog-table th,
.changelog-table td {
    padding: 0.5rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border-color);
}

.changelog-table tr:last-child th,
.changelog-table tr:last-child td {
    border-bottom: none;
}

.changelog-table th {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
    font-weight: 600;
    font-size: 0.9rem;
}

.type-column {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
}

/* List styling inside table cells */
.changelog-table ul {
    margin: 0;
    padding-left: 1.2rem;
    list-style-type: disc;
}

.changelog-table li {
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.changelog-table li:last-child {
    margin-bottom: 0;
}

/* Badge colors */
.badge-added {
    color: var(--added-color);
}

.badge-changed {
    color: var(--changed-color);
}

.badge-fixed {
    color: var(--fixed-color);
}

.version-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
        justify-content: flex-end;
        padding: 0.5rem 0;
    }

    h1 {
        font-size: 2rem;
    }

    .nav-container a {
        margin: 0.25rem;
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }

    header.header-scrolled .nav-container {
        justify-content: flex-start;
        padding: 0.2rem 0;
        width: 100%;
    }

    header.header-scrolled .nav-container a {
        padding: 0.2rem 0.5rem;
        margin: 0.15rem;
    }
}

@media (max-width: 480px) {
    .nav-container {
        flex-wrap: wrap;
    }

    header {
        padding: 15px 0;
    }

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

    .logo {
        margin-bottom: 0.5rem;
    }

    .feature {
        flex-direction: column;
        padding: 0.5rem 0;
    }

    .feature-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
        min-width: auto;
    }

    .nav-container a {
        flex: 0 0 calc(33.333% - 0.5rem);
        text-align: center;
        margin: 0.25rem;
        padding: 0.4rem 0.5rem;
        font-size: 0.8rem;
    }

    header.header-scrolled {
        padding: 3px 0;
    }

    header.header-scrolled .header-content {
        flex-direction: row;
    }

    header.header-scrolled .nav-container {
        justify-content: flex-start;
        padding: 0.1rem 0;
        width: 100%;
    }

    header.header-scrolled .nav-container a {
        flex: initial;
        padding: 0.15rem 0.4rem;
        margin: 0.1rem;
        font-size: 0.75rem;
    }

    /* Add padding for iOS Safari status bar when in standalone mode */
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }

    header {
        padding-top: calc(30px + env(safe-area-inset-top));
    }

    header.header-scrolled {
        padding-top: calc(3px + env(safe-area-inset-top));
    }
}
