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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.1rem;
    opacity: 0.95;
}

nav {
    background: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

nav li {
    margin: 0.5rem 1rem;
}

nav a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #764ba2;
}

/* --- NEW STYLES FOR HAMBURGER MENU --- */
.menu-toggle {
    display: none;
    /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 1rem;
    position: absolute;
    top: 50%;
    right: 1.5rem;
    transform: translateY(-50%);
    z-index: 101;
}

.hamburger-icon {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #667eea;
    position: relative;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 3px;
    background-color: #667eea;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

.hamburger-icon::before {
    top: -8px;
}

.hamburger-icon::after {
    bottom: -8px;
}

/* Animate to 'X' icon when active */
.menu-toggle.is-active .hamburger-icon {
    background-color: transparent;
}

.menu-toggle.is-active .hamburger-icon::before {
    transform: rotate(45deg) translate(5px, 6px);
}

.menu-toggle.is-active .hamburger-icon::after {
    transform: rotate(-45deg) translate(5px, -6px);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- END NEW STYLES --- */

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

section {
    background: white;
    margin: 2rem 0;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

h2 {
    color: #667eea;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #667eea;
}

h3 {
    color: #764ba2;
    font-size: 1.4rem;
    margin: 2rem 0 1rem 0;
}

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

p {
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

ul,
ol {
    margin: 1rem 0 1.5rem 2rem;
}

li {
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

td {
    padding: 0.75rem;
}

/* Versions Table Styles */
#versions table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 1.5rem;
}

#versions thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

#versions th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#versions tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s ease;
}

#versions tbody tr:last-child {
    border-bottom: none;
}

#versions tbody tr:hover {
    background-color: #f9fafb;
}

#versions td {
    padding: 16px 12px;
    font-size: 14px;
    color: #374151;
    vertical-align: top;
}

#versions td:first-child {
    font-weight: 600;
    color: #1f2937;
}

/* Cycle badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-beta {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-alpha {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-rc {
    background-color: #d1fae5;
    color: #065f46;
}

/* Platform badges */
.platform {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background-color: #f3f4f6;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

/* Known Issues styling in table */
.known-issues-none {
    color: #9ca3af;
    font-style: italic;
}

.screenshot-placeholder {
    width: 100%;
    max-width: 400px;
    height: auto;
    margin: 1.5rem auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tip {
    background: #e8f4f8;
    border-left: 4px solid #667eea;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
}

.tip strong {
    color: #667eea;
}

.known-issue {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    border-radius: 4px;
}

.known-issue strong {
    color: #856404;
}

.contact {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 3rem 2rem;
}

.contact h2 {
    color: white;
    border-bottom: 3px solid white;
}

.contact p {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.contact a {
    color: white;
    text-decoration: underline;
}

footer {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-size: 0.9rem;
}

/* --- NEW STYLES FOR SCREENSHOT GALLERY --- */
/* Desktop styles for the screenshot gallery under "Create Your Account" */
#install h3+p+table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 1rem 0;
    margin: 1.5rem 0;
    text-align: center;
    table-layout: fixed;
    border: none;
    background: none;
    box-shadow: none;
}

#install h3+p+table td {
    padding: 0;
    vertical-align: top;
    border: none;
}

#install h3+p+table thead td {
    font-weight: 600;
    color: #374151;
    padding-bottom: 0.5rem;
    font-size: 0.9rem;
}

#install h3+p+table .screenshot-placeholder {
    margin: 0 auto;
    width: 100%;
    max-width: 300px;
}

/* --- SCREENSHOT GALLERY CONTROLS --- */
/* Hide extra screenshots by default when they have the .hidden class */
.screenshot-gallery .extra-screenshot.hidden {
    display: none;
}

/* Hide ANY screenshot with the hidden class (including first column) - highest priority */
.screenshot-gallery td.hidden,
.screenshot-gallery thead td.hidden {
    display: none !important;
}

/* First column is visible by default UNLESS it has the hidden class */
.screenshot-gallery td:first-child:not(.hidden),
.screenshot-gallery thead td:first-child:not(.hidden) {
    display: table-cell;
}

.screenshot-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0 2rem 0;
    justify-content: center;
}

.screenshot-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.screenshot-btn:hover {
    background: #764ba2;
}

.screenshot-btn.hidden {
    display: none;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    /* --- RESPONSIVE NAV STYLES --- */
    .menu-toggle {
        display: block;
        /* Show the button on mobile */
    }

    nav ul#main-nav {
        display: none;
        /* Hide menu by default */
        position: absolute;
        top: 100%;
        /* Position below the nav bar */
        left: 0;
        width: 100%;
        background: white;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
    }

    nav ul#main-nav.is-active {
        display: flex;
        /* Show menu when active */
    }

    nav li {
        margin: 0.75rem 0;
        width: 100%;
        text-align: center;
    }

    nav a {
        display: block;
        padding: 0.5rem 1rem;
    }

    /* --- END RESPONSIVE NAV --- */

    section {
        padding: 1.5rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    /* Responsive table for versions section ONLY */
    #versions table,
    #versions thead,
    #versions tbody,
    #versions th,
    #versions td,
    #versions tr {
        display: block;
    }

    #versions thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    #versions tr {
        border: 1px solid #e5e7eb;
        margin-bottom: 16px;
        border-radius: 8px;
        overflow: hidden;
    }

    #versions td {
        border: none;
        position: relative;
        padding-left: 40%;
        text-align: right;
    }

    #versions td:before {
        content: attr(data-label);
        position: absolute;
        left: 12px;
        width: 35%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: 600;
        text-align: left;
        color: #6b7280;
    }

    /* --- NEW: Responsive styles for the screenshot gallery --- */
    #install h3+p+table {
        border-spacing: 0;
    }
    
    #install h3+p+table thead {
        display: none;
    }

    #install h3+p+table tbody tr {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    #install h3+p+table td {
        padding: 0;
    }

    #install h3+p+table .screenshot-placeholder {
        max-width: 320px;
        margin: 0 auto;
    }
    
    .screenshot-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .screenshot-btn {
        width: 100%;
    }
}