/* Global Styles and Variables */
:root {
    --primary-yellow: #fdd835; /* A bright yellow, inspired by the logo */
    --dark-background: #1a1a1a; /* A very dark gray, almost black */
    --text-color: #f5f5f5;
    --card-background: #2c2c2c;
    --font-family: 'Lato', sans-serif;
    --sidebar-width-open: 250px;
    --sidebar-width-closed: 0px; /* On mobile, it's completely hidden */
}

/* Base Reset and Body Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--dark-background);
    color: var(--text-color);
    line-height: 1.6;
}

/* Page Container for sidebar shift */
#page-container {
    position: relative;
    left: 0;
    transition: left 0.4s ease-in-out;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* General Section Styling */
section {
    padding: 5rem 0;
}

section:nth-of-type(odd) {
    background-color: var(--card-background);
}

section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-yellow);
}

/* Header */
header {
    background-color: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--card-background);
}

header nav.container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
}

.logo img {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    margin-right: 1rem;
    object-fit: cover;
}

.logo h1 {
    font-size: 1.5rem;
}

/* Sidebar Navigation */
#sidebar {
    position: fixed;
    top: 0;
    right: 0; /* Aligns to the right */
    height: 100vh;
    width: 0; /* Hidden by default */
    background-color: #1f1f1f;
    z-index: 200;
    overflow: hidden;
    transition: width 0.4s ease-in-out;
    border-left: 1px solid var(--card-background);
    display: flex;
    align-items: center;
    justify-content: center;
}

#sidebar ul {
    list-style: none;
    padding: 0;
    width: 100%;
    text-align: center;
}

#sidebar ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 700;
    padding: 1rem 2rem;
    display: block;
    transition: color 0.3s ease, background-color 0.3s ease;
    white-space: nowrap; /* Prevents text from wrapping */
}

#sidebar ul li a:hover {
    color: var(--dark-background);
    background-color: var(--primary-yellow);
}

/* Menu Toggle Button */
.menu-button {
    background: none;
    border: 2px solid var(--primary-yellow);
    color: var(--primary-yellow);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-button:hover {
    background-color: var(--primary-yellow);
    color: var(--dark-background);
}

/* Sidebar Open State (handled by JS) */
#page-container.sidebar-open #sidebar {
    width: var(--sidebar-width-open);
}

/* Hero Section */
#hero {
    text-align: center;
    padding: 6rem 2rem;
    background: none; /* Override alternating section background */
}

#hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

#hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-yellow);
    color: var(--dark-background);
    padding: 0.8rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(253, 216, 53, 0.4);
}

.cta-button.disabled {
    background-color: #444;
    color: #888;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Grid Layouts (Features, Screenshots, Downloads) */
.feature-grid, .screenshot-grid, .download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-item {
    background-color: var(--dark-background);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
}

.screenshot-item figcaption {
    text-align: center;
    margin-top: 1rem;
    font-weight: 700;
    color: #aaa;
}

.screenshot-item img {
    width: 100%;
    border-radius: 8px;
    border: 3px solid var(--card-background);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
}

.screenshot-item img:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    border-color: var(--primary-yellow);
}

.download-intro, .roadmap-intro {
    text-align: center;
    max-width: 600px;
    margin: -1rem auto 3rem;
    color: #aaa;
}

.download-item {
    background-color: var(--dark-background);
    padding: 2rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.download-item h3 {
    color: var(--primary-yellow);
    margin-bottom: 0.5rem;
}

.download-item p {
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

/* About Section */
.about-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.about-image {
    height: 180px;
    width: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-yellow);
}

.about-text p {
    margin-bottom: 1rem;
}

/* Roadmap Section */
.roadmap-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.roadmap-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 3px;
    background-color: var(--dark-background);
    border-radius: 3px;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 60px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 5px;
    height: 18px;
    width: 18px;
    background-color: var(--primary-yellow);
    border-radius: 50%;
    border: 3px solid var(--card-background);
    z-index: 1;
}

.timeline-item.major::before {
    transform: scale(1.2);
}

.timeline-item.edition::before {
    transform: scale(1.5);
    background-color: #ffb300;
}

.timeline-content h3 {
    margin-bottom: 0.5rem;
}

.timeline-year {
    color: #aaa;
    font-weight: 400;
    font-size: 0.9em;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--card-background);
}

/* --- Responsive Design --- */

/* Tablet and larger */
@media (min-width: 769px) {
    .about-content {
        flex-direction: row;
        text-align: left;
        gap: 3rem;
    }

    .about-image {
        flex-shrink: 0;
    }

    /* Sidebar pushes content */
    #page-container.sidebar-open {
        left: calc(-1 * var(--sidebar-width-open));
    }
}

/* Mobile View */
@media (max-width: 768px) {
    #hero h2 {
        font-size: 2.2rem;
    }

    section {
        padding: 3rem 0;
    }

    .roadmap-timeline::before {
        left: 10px;
    }
    .timeline-item {
        padding-left: 40px;
    }
    .timeline-item::before {
        left: 2px;
    }
}