:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --background-color: #f5f7fa;
    --text-color: #2d3748;
    --light-gray: #bdc3c7;
    --white: #ffffff;
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
    --header-font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --body-font: 'Georgia', serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
}

footer p {
    text-align: center;
}

.container {
    max-width: 960px;
    margin: auto;
    overflow: hidden;
    padding: 0 20px;
}

#download .container {
    overflow: visible;
}

/* Navigation */
nav {
    background: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    top: 0; /* Adjusted to be at the top */
    width: 100%;
    z-index: 100;
}

.nav-container {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    position: relative; /* Added for absolute positioning of nav-links */
}

.nav-logo {
    height: 40px;
}

.nav-links {
    list-style: none;
    display: flex;
    padding: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    text-decoration: none;
    color: var(--secondary-color);
    font-family: var(--header-font);
    font-weight: bold;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Hamburger Menu - Hidden on desktop */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.nav-hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--secondary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hamburger animation when open */
.nav-hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.nav-hamburger.open span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Header */
#home {
    background: linear-gradient(to bottom, var(--secondary-color), #253545);
    color: var(--white);
    text-align: center;
    padding: 150px 0 100px;
    position: relative; /* Added for pseudo-element positioning */
    overflow: hidden; /* Hide glare overflow */
}

#home::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%; /* Start off-screen to the left */
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-30deg); /* Angle the glare */
    animation: glare 3s infinite linear; /* Apply animation */
}

@keyframes glare {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.main-logo {
    width: 400px;
    margin-bottom: 20px;
}

#home h1 {
    font-family: var(--header-font);
    font-size: 4rem;
    margin: 0;
}

.tagline {
    font-size: 1.5rem;
    font-style: italic;
}

/* Sections */
.section {
    padding: 80px 0;
}

.section:nth-child(odd) {
    background: var(--white);
}

.section h2 {
    font-family: var(--header-font);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 40px;
    color: var(--secondary-color);
}

/* Features */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-item {
    background: var(--white);
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    text-align: center;
}

.feature-item h3 {
    font-family: var(--header-font);
    color: var(--primary-color);
}

/* Guides */
.guides-container {
    display: flex;
    gap: 30px;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
}

.guides-sidebar {
    flex: 0 0 250px; /* Fixed width for the sidebar */
    display: flex;
    flex-direction: column;
    gap: 5px; /* Reduced space between search and menu for compactness */
}

.guide-search input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--light-gray);
    border-radius: 5px;
    font-family: var(--body-font);
    font-size: 1rem;
    box-sizing: border-box; /* Ensure padding and border are included in width */
}

.guide-search input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.guides-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid var(--light-gray);
    border-radius: 5px;
    overflow: hidden;
}

.guides-menu li {
    padding: 8px 15px; /* Reduced vertical padding for compactness */
    cursor: pointer;
    border-bottom: 1px solid var(--background-color);
    font-family: var(--header-font);
    font-weight: bold;
    transition: background-color 0.3s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.guides-menu li:last-child {
    border-bottom: none;
}

.guides-menu li:hover {
    background-color: var(--background-color);
}

.guides-menu li.active {
    background-color: var(--primary-color);
    color: var(--white);
}

.guide-no-results {
    text-align: center;
    padding: 15px;
    color: var(--secondary-color);
    font-weight: bold;
}

.guide-content-area {
    flex-grow: 1;
    background: var(--white);
    padding: 15px 40px 20px; /* Adjusted top padding to align with nav list items */
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    min-height: 300px;
    width: 0; /* Prevent content from overflowing container */
}

/* Guide Content Styling */
.guide-content-area h1, .guide-content-area h2, .guide-content-area h3 {
    font-family: var(--header-font);
    color: var(--secondary-color);
    text-align: left; /* Ensure left alignment for headers within guide content */
}
.guide-content-area h1 {
    font-size: 2rem;
    margin-top: 0; /* Ensure no gap above the h1 */
}
.guide-content-area h2 { font-size: 1.5rem; }
.guide-content-area h3 { font-size: 1.2rem; }
.guide-content-area p {
    line-height: 1.8;
}
.guide-content-area code {
    background: var(--background-color);
    padding: 2px 5px;
    border-radius: 3px;
    font-family: monospace;
}
.guide-content-area pre {
    background: var(--background-color);
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}
.guide-content-area blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 15px;
    margin-left: 0;
    font-style: italic;
}
.guide-content-area ul {
    padding-left: 20px;
}
.guide-content-area li {
    margin-bottom: 10px;
}


/* Contact Form */
#contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-family: var(--header-font);
    font-weight: bold;
    color: var(--secondary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--light-gray);
    border-radius: 5px;
    font-family: var(--body-font);
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.submit-button {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-family: var(--header-font);
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-button:hover {
    background-color: #2980b9; /* Darker blue */
}

#captcha-container {
    user-select: none;
}

#captcha-slider {
    position: relative;
    width: 100%;
    background-color: var(--background-color);
    border: 1px solid var(--light-gray);
    border-radius: 5px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#captcha-handle {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 50px;
    background-color: var(--primary-color);
    cursor: ew-resize;
    z-index: 2;
    border-radius: 5px 0 0 5px;
}

#captcha-handle:hover {
    background-color: #2980b9;
}

#captcha-text {
    z-index: 1;
    color: var(--secondary-color);
    font-weight: bold;
}

#captcha-slider.verified {
    background-color: #2ecc71;
}

#captcha-slider.verified #captcha-handle {
    background-color: #27ae60;
    cursor: default;
}

#captcha-slider.verified #captcha-text {
    color: var(--white);
}

#form-status {
    margin-top: 20px;
    text-align: center;
    font-size: 1.1rem;
}

#form-status.success {
    color: #2ecc71;
}

#form-status.error {
    color: #e74c3c;
}


/* About */
#about p {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* Download */
#download h2 {
    margin-bottom: 20px;
}

/* Development Banner within Download Section */
#download #development-banner {
    background-color: #e74c3c; /* Red background for prominence */
    color: var(--white);
    text-align: center;
    padding: 10px 0;
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 20px; /* Space below the banner */
    border-radius: 5px;
}

#download #development-banner p {
    margin: 0;
    padding: 0;
}

.download-options {
    display: flex; /* Use flexbox to center the single download container */
    justify-content: center;
    align-items: center;
    padding: 30px 0; /* Adjust padding for the section */
}

.os-download-container {
    position: relative;
    display: flex;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

#main-download-button {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-right: 1px solid rgba(0,0,0,0.1); /* Separator */
}

#os-dropdown-toggle {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 15px;
    cursor: pointer;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

#os-dropdown-toggle:hover {
    background-color: #2980b9; /* Darker blue */
}

#os-dropdown-toggle svg {
    height: 20px;
    width: 20px;
    fill: currentColor; /* Use button's text color for SVG */
}

.dropdown-menu {
    position: absolute;
    top: 100%; /* Position below the button */
    left: 0;
    width: 100%;
    background-color: var(--white);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    border-radius: 5px;
    list-style: none;
    padding: 0;
    margin: 5px 0 0 0; /* Space below button */
    z-index: 100;
    display: none; /* Hidden by default */
    overflow: hidden; /* Ensures rounded corners */
}

.dropdown-menu.show {
    display: block;
}

.download-option-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: bold;
    transition: background-color 0.2s ease;
}

.download-option-item:hover {
    background-color: var(--background-color);
}

.download-option-item img {
    height: 20px;
    width: 20px;
    margin-right: 8px;
    transform: translateY(7px); /* Keep consistent with main button icon nudge */
}

/* Existing .download-button styles need to be adjusted for the main button */
.download-button {
    display: flex; /* Change to flex to align icon and text */
    align-items: center; /* Vertically align items */
    justify-content: center; /* Center content horizontally */
    white-space: nowrap; /* Prevent text from wrapping */
    padding: 12px 25px;
    margin: 0;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, color 0.3s ease;
    background-color: var(--primary-color); /* Default background for main button */
    color: var(--white);
}

.download-button:hover {
    background-color: var(--secondary-color); /* Darker purple on hover */
}

.download-button.disabled {
    background-color: #9ca3af;
    color: #6b7280;
    cursor: not-allowed;
    opacity: 0.6;
}

.download-button.disabled:hover {
    background-color: #9ca3af; /* No hover effect when disabled */
    color: #6b7280;
}

.download-button.available {
    background-color: #2ecc71; /* Green color */
    color: var(--white);
    cursor: pointer;
}

.download-button.available:hover {
    background-color: #27ae60; /* Darker green on hover */
}

.download-button img {
    height: 20px; /* Adjust as needed */
    width: 20px; /* Adjust as needed */
    margin-right: 8px; /* Space between icon and text */
    vertical-align: middle; /* Ensure vertical alignment */
    transform: translateY(0px); /* Offset svg icon's vertical alignment for better alignment */
}

@media (max-width: 768px) {
    body {
        margin-top: 0; /* No fixed banner at top */
    }

    .nav-container {
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
    }

    .nav-logo {
        margin-bottom: 0;
    }

    /* Show hamburger on mobile */
    .nav-hamburger {
        display: flex;
    }

    /* Mobile nav links - dropdown menu */
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--white);
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        transform: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-links.open {
        max-height: 300px;
    }

    .nav-links li {
        margin: 0;
        text-align: center;
        border-bottom: 1px solid var(--background-color);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        display: block;
        padding: 15px 20px;
    }

    .nav-links a:hover {
        background-color: var(--background-color);
    }

    nav {
        top: 0; /* No fixed banner at top */
    }

    #home h1 {
        font-size: 3rem;
    }

    .tagline {
        font-size: 1.2rem;
    }

    .section {
        padding: 40px 0;
    }

    .section h2 {
        font-size: 2rem;
    }

    .feature-grid, .download-options {
        grid-template-columns: 1fr;
    }

    .guides-container {
        flex-direction: column;
        gap: 20px;
    }

    .guides-sidebar {
        flex: 0 0 auto; /* Allow sidebar to take natural height */
        width: 100%;
    }

    .guide-search input {
        font-size: 0.9rem; /* Smaller font size for mobile search */
    }

    .guides-menu ul {
        list-style: none;
        padding: 0;
        margin: 0;
        border: 1px solid var(--light-gray);
        border-radius: 5px;
        overflow: hidden;
    }

    .guide-content-area {
        padding: 15px 20px 20px; /* Adjust padding for smaller screens */
        width: auto; /* Allow content area to take natural width */
    }

    #contact-form {
        padding: 20px;
    }
}
