:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --dark-bg: #2c3e50;
    --light-bg: #ecf0f1;
    --text-dark: #34495e;
    --text-light: #ffffff;
    --border-color: #bdc3c7;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.7;
    margin: 0;
    background-color: var(--light-bg);
    color: var(--text-dark);
}

/* --- LAYOUT --- */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- HEADER --- */
.site-header {
    background: var(--dark-bg);
    color: var(--text-light);
    padding: 1.5rem 0;
    text-align: center;
    border-bottom: 4px solid var(--primary-color);
}

.site-header .header-logo {
    max-height: 60px;
    margin-bottom: 0.5rem;
}

.site-header .site-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 300;
}

/* --- MAIN CONTENT & SECTIONS --- */
.site-main {
    padding: 2rem 0;
}

.downloads-section,
.developer-notes-section,
.terms-section {
    background: #ffffff;
    margin-bottom: 25px;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 8px var(--shadow-color);
}

h1, h2, h3 {
    color: var(--text-dark);
    font-weight: 600;
    margin-top: 0;
}
h1 { font-size: 1.8rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

p.intro {
    font-size: 1.1rem;
    color: #555;
}

p.last-updated {
    font-size: 0.9rem;
    color: #777;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* --- VERSION LIST --- */
.version-list {
    list-style: none;
    padding: 0;
}

.version-list li {
    border: 1px solid var(--border-color);
    margin-bottom: 15px;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: box-shadow 0.3s ease;
}

.version-list li:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.version-info .version-name {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.version-info .version-date,
.version-info .version-filename {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

/* --- DOWNLOAD BUTTON --- */
.download-button {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.2s;
    font-weight: bold;
    text-align: center;
    border: none;
    cursor: pointer;
}

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

/* --- DEVELOPER NOTES --- */
.comment-block {
    background-color: #2d3748; /* Dark, grayish-blue */
    color: #e2e8f0;           /* Light gray text */
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #4a5568; /* Slightly lighter border */
}

.developer-notes-section pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-top: 0;
    margin-bottom: 1em;
    padding: 0;
    background-color: transparent;
    color: inherit;
    border: none;
}

h3.changelog-title {
    color: #9fceff; /* Light blue for titles */
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid #4a5568;
}

h3.changelog-title:first-of-type {
    margin-top: 0;
}


/* --- TERMS SECTION --- */
.terms-content {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 5px;
    background-color: #f8f9fa;
}

/* --- FOOTER --- */
.site-footer {
    text-align: center;
    padding: 2rem 0;
    background: var(--dark-bg);
    color: var(--text-light);
    margin-top: 30px;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
    body {
        -webkit-text-size-adjust: 100%; /* Prevent iOS font scaling */
    }
    
    .container {
        padding: 0 10px; /* Less padding on smaller screens */
    }

    .site-main {
        padding: 1rem 0;
    }
    
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.3rem; }

    .downloads-section,
    .developer-notes-section,
    .terms-section {
        padding: 20px;
    }

    .version-list li {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .version-info {
        margin-bottom: 15px;
    }

    .download-button {
        width: 100%;
        padding: 15px;
        font-size: 1.1rem;
    }
}
@media (max-width: 480px) {
    .container {
        padding: 0 5px; /* Even less padding */
    }
    .downloads-section,
    .developer-notes-section,
    .terms-section {
        padding: 15px;
        margin-left: 5px;
        margin-right: 5px;
    }
}
