:root {
    --bg-color: #0f1214; /* Darker background like frame.io */
    --text-color: #f0f0f0; /* Light text */
    --primary-color: #2D7096; /* Main interactive blue for links & buttons */
    --accent-text-color: #a3dff3; /* New accent text color */
    --primary-link-hover-color: #3E8BB5; /* Lighter blue for link hover */
    --primary-button-hover-color: #215470; /* Darker blue for button hover background */
    --secondary-color: #1a1f24; /* Darker shade for sections */
    --border-color: #2c333a; /* Subtle borders */
    --highlight-color: #2D7096; /* Kept for consistency, same as primary-color now */
}

/* Reset and base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Basic page layout */
html, body {
    height: 100%;
    margin: 0;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    /* background-image: url('../images/Echelon_DMG_BG_dark.png'); */
    background-image: url('../images/CR2CREATIVE_BG V2.png'); /* New background */
    /* background-size: auto; */
    /* background-repeat: no-repeat; */
    background-size: cover; /* Revert to cover */
    /* background-attachment: fixed; */ /* Removed fixed attachment */
    /* background-position: top left; */
    background-position: center; /* Revert to center */
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-color);
    margin-bottom: 0.5em;
    font-weight: 700;
}

a {
    color: var(--accent-text-color); /* UPDATED */
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-text-color); /* UPDATED from --primary-link-hover-color */
    text-decoration: none;
}

button, .button {
    display: inline-block;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    background-color: var(--highlight-color);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 162, 255, 0.25);
}

button:hover, .button:hover {
    background-color: var(--primary-button-hover-color); /* Corrected to use dedicated button hover color */
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 162, 255, 0.35);
}

/* Header and navigation styles */
header {
    backdrop-filter: none; /* Will be set by .scrolled */
    background-color: transparent;
    transition: all 0.3s ease;
    border-bottom: none; /* Will be set by .scrolled */
    padding: 20px 0;
    position: sticky; /* Changed from relative */
    top: 0; /* Stick to the top */
    left: 0;
    right: 0;
    z-index: 5000;
    width: 100%; /* Ensure it spans full width if not already */
}

/* Styles for the header when scrolled */
header.scrolled {
    background-color: rgba(15, 18, 20, 0.85); /* Dark, slightly transparent background */
    backdrop-filter: blur(8px); /* Frosted glass effect */
    padding: 10px 0; /* Slightly reduce padding */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); /* Subtle shadow */
    border-bottom: 1px solid var(--border-color);
}

header.scrolled .logo {
    height: 50px; /* Slightly shrink logo */
}

.header-container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: auto;
}

header .logo {
    height: 60px;
    transition: all 0.3s ease;
}

header .logo:hover {
    transform: scale(1.05);
}

/* Specific override for the main navigation auth button */
#nav-auth-button {
    display: inline-block !important; 
    padding: 8px 28px !important;     
    margin-left: 30px !important;   
    line-height: normal !important;
    font-size: 0.9rem !important;   
    font-weight: 600 !important;   
    height: auto !important; 
    vertical-align: middle; 
    text-align: center !important;  
    white-space: nowrap !important; 

    background-color: var(--highlight-color) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important; 
    box-shadow: 0 4px 12px rgba(0, 162, 255, 0.25) !important;
    transition: all 0.3s ease !important; 
    cursor: pointer !important;
}

/* --- Default: Hide the mobile-specific auth list item --- */
#nav-auth-mobile-li {
    display: none !important; /* Hidden by default in all views */
}
/* --- End Default Hide --- */

#nav-auth-button:hover {
    background-color: var(--primary-button-hover-color) !important;
    color: #fff !important; 
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(0, 162, 255, 0.35) !important;
}

nav {
    display: flex;
    align-items: center;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    justify-content: flex-end;
    align-items: baseline;
}

nav ul li {
    margin-left: 35px;
    display: flex;
    align-items: center;
}

nav ul li a {
    color: var(--text-color);
    font-weight: 500;
    font-size: 16px;
    padding: 10px 0;
    position: relative;
    letter-spacing: 0.02em;
    display: inline-block;
}

nav ul li a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--accent-text-color); /* UPDATED */
    bottom: 0;
    left: 0;
    transition: width 0.3s ease;
}

nav ul li a:hover:after {
    width: 100%;
}

/* Ensure general button styles apply to anchor tags with the class within nav */
nav ul li a.button {
    display: inline-block; /* Ensure it behaves like a block */
    padding: 10px 20px;
    min-width: 100px;
    text-align: center;
    /* Inherit other button styles like background, color, border-radius, transition */
}

nav ul li a.button:hover:after {
    display: none; /* Prevent underline effect on buttons */
}

/* Mobile Menu Button */
.mobile-menu-button {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    box-shadow: none;
}

.mobile-menu-button i {
    color: var(--text-color); /* Ensure icon uses text color */
    font-size: 1.5rem; /* Adjust size as needed */
}


.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
    flex: 1 0 auto; /* Allow container to grow and fill space */
    display: flex;
    flex-direction: column;
}

main {
    padding-top: 20px;
    flex: 1 0 auto; /* Allow main to grow and push footer down */
    position: relative;
    z-index: 1;
}

/* Section styles (General) */
section {
    padding: 100px 0;
    position: relative;
}

section h2 {
    font-size: 2.75rem;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
}

section h2:after {
    content: '';
    position: absolute;
    width: 100px;
    height: 3px;
    background: var(--accent-text-color); /* UPDATED */
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
}

/* Card styles (General - might be used on multiple pages) */
.glass-card {
    background-color: rgba(26, 31, 36, 0.75);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 60px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin: 50px 0;
}

/* CTA Button Styles (General) */
.cta-buttons {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.secondary-button {
    background: transparent;
    border: 2px solid var(--highlight-color); /* Kept original for border */
    color: var(--accent-text-color); /* UPDATED for text */
    box-shadow: none;
}

.secondary-button:hover {
    background-color: rgba(163, 223, 243, 0.1); /* Adjusted hover to match new text color */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(163, 223, 243, 0.15); /* Adjusted shadow to match new text color */
}

/* Footer styles */
footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 10;
    flex-shrink: 0; /* Prevent footer from shrinking */
}

footer p {
    margin: 5px 0;
    font-size: 0.9em;
}

/* Updated to use .footer-link class and a general gray color */
footer a.footer-link {
    color: rgba(240, 240, 240, 0.6); /* Light gray, less prominent */
    text-decoration: none; /* Explicitly no underline */
    margin: 0 5px; /* Add a little spacing around links */
}

footer a.footer-link:hover {
    color: rgba(240, 240, 240, 0.9); /* Slightly brighter on hover */
    text-decoration: underline; /* Underline on hover for affordance */
}

/* Sign Out Button Specific Styles (General) */
#nav-signout-btn, #signout-button {
    /* Keep existing styles */
    background-color: #1c76bc;
    color: white;
    padding: 10px 25px;
    border-radius: 4px;
    display: inline-block;
    text-align: center;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

#nav-signout-btn:hover, #signout-button:hover {
    background-color: #1868a7;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* --- General Form Styling --- */
.form-group {
    margin-bottom: 1.2rem;
    text-align: left; /* Align labels left */
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: rgba(240, 240, 240, 0.9);
}

/* Add subtle asterisk to required field labels */
.form-group label:has(+ :required)::after {
    content: " *";
    color: var(--accent-text-color); /* UPDATED */
    font-weight: normal;
    margin-left: 2px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    background-color: rgba(0,0,0,0.15);
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Checkbox specific styles */
.form-group input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid var(--border-color); /* Explicitly set all borders */
    border-radius: 3px;
    background-color: rgba(255, 255, 255, 0.1); /* Increased visibility for unchecked state */
    display: inline-block;
    position: relative;
    margin: 0;
    margin-right: 8px;
    vertical-align: middle;
    cursor: pointer;
    transition: background-color 0.1s ease, border-color 0.1s ease;
    box-shadow: none; /* Ensure no errant box-shadow */
}

.form-group input[type="checkbox"]:checked {
    background-color: var(--highlight-color);
    border-color: var(--highlight-color);
}

.form-group input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white; /* Checkmark color */
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.form-group input[type="checkbox"]:focus {
    outline: none;
    border-color: var(--highlight-color); 
    box-shadow: 0 0 0 2px rgba(45, 112, 150, 0.4); /* Centered focus shadow with increased alpha, using fallback if --highlight-color-rgb is not set */
}

.form-group input[type="checkbox"]:hover:not(:checked) {
    border-color: var(--highlight-color);
    background-color: rgba(255, 255, 255, 0.15); /* Slightly more visible hover */
}

/* Style for checkbox container */
.form-group[style*="text-align: left"] {
    display: flex;
    align-items: center;
    margin: 15px 0; /* Keep existing margin */
}

/* Style for checkbox label */
.form-group label[for="staySignedIn"] {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    margin-bottom: 0;
    font-weight: normal;
    color: var(--text-color);
    line-height: 1; /* Ensure consistent line height */
}

/* Ensure proper spacing in the login form */
#login-form .form-group[style*="text-align: left"] {
    padding: 10px 0;
}

/* Style for checkbox labels */
label:has(input[type="checkbox"]) {
    cursor: pointer;
    user-select: none;
    display: inline-flex;
    align-items: center;
}

/* Target select specifically to ensure arrow only appears on selects */
.form-group select {
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23f0f0f0' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E"); /* Simple down arrow SVG (URL encoded) */
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px 16px; /* Adjust size as needed */
    padding-right: 40px; /* Add padding to prevent text overlapping arrow */
}

/* Style dropdown options to match dark theme */
select option {
    background-color: var(--secondary-color) !important;
    color: var(--text-color) !important;
    padding: 12px !important;
    border: none !important;
}

/* Ensure select elements in the management console use the dark theme */
select, 
input[type="text"], 
input[type="email"], 
input[type="password"], 
input[type="number"],
textarea {
    background-color: var(--bg-color) !important;
    color: var(--text-color) !important;
    border: 1px solid var(--border-color) !important;
}

/* Firefox specific styling */
@-moz-document url-prefix() {
    select {
        color-scheme: dark !important;
        background-color: var(--bg-color) !important;
    }
    
    select option {
        background-color: var(--secondary-color) !important;
    }
}

/* Webkit browsers specific styling for dropdown background */
select::-webkit-listbox {
    background-color: var(--secondary-color) !important;
    color: var(--text-color) !important;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="number"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-text-color); /* UPDATED */
    box-shadow: 0 0 0 3px rgba(163, 223, 243, 0.2); /* Adjusted shadow to match new color */
}

.form-group textarea {
    resize: vertical; /* Allow vertical resize */
    min-height: 80px;
}

.form-group input[readonly] {
    background-color: rgba(0,0,0,0.3); /* Darker for readonly */
    cursor: not-allowed;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:focus {
    -webkit-box-shadow: 0 0 0px 1000px #2a2a2a inset !important;
    box-shadow: 0 0 0px 1000px #2a2a2a inset !important;
    -webkit-text-fill-color: white !important;
    background-color: #2a2a2a !important;
}


/* --- Custom Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 18, 20, 0.85); /* Darker overlay using bg-color */
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050; /* Ensure modal is on top */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    /* background-color: var(--secondary-color); */ /* Original solid color */
    /* background-color: rgba(26, 31, 36, 0.92); */ 
    /* background-color: rgba(26, 31, 36, 0.85); */ /* Previous attempt */
    background-color: rgba(26, 31, 36, 0.75); /* MODIFIED: Even lower alpha for testing */
    padding: 35px 40px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 800px; 
    position: relative;
    text-align: center;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    max-height: 85vh; 
    overflow-y: auto;
}
.modal-overlay.active .modal-content {
     transform: scale(1);
}
.modal-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.6rem;
    color: var(--text-color);
}
.modal-content p {
    margin-bottom: 25px;
    color: rgba(240, 240, 240, 0.8);
    line-height: 1.6;
}
/* MODIFIED: Target by specific ID */
#modal-close-button-release-notes {
    position: absolute;
    top: 12px;  
    right: 15px; 
    font-size: 1.6rem; 
    font-weight: normal; 
    color: rgba(240, 240, 240, 0.6); 
    background: none !important; 
    border: none !important; 
    padding: 0 !important; 
    width: auto !important; 
    height: auto !important; 
    box-shadow: none !important; 
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
}
/* MODIFIED: Target by specific ID */
#modal-close-button-release-notes:hover {
    color: var(--text-color); 
    background: none !important; 
}
.modal-actions {
    display: flex;
    justify-content: center; /* Center buttons */
    gap: 15px;
    margin-top: 25px;
}
.modal-actions .button {
    padding: 10px 25px;
    min-width: 120px;
}

/* Specific button styles if needed, e.g., secondary */
.button-secondary {
    background-color: #6c757d;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.2);
}
.button-secondary:hover {
    background-color: #5a6268;
    box-shadow: 0 6px 16px rgba(108, 117, 125, 0.3);
}


/* Utility classes for messages inside modals or forms */
.success-message {
    background-color: rgba(40, 167, 69, 0.15);
    color: #34c759; /* Brighter green */
    padding: 12px;
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-radius: 5px;
    margin-top: 15px;
    font-size: 0.95rem;
}

.error-message {
    background-color: rgba(220, 53, 69, 0.15);
    color: #ff4d4d; /* Brighter red */
    padding: 12px;
     border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 5px;
    margin-top: 15px;
     font-size: 0.95rem;
}

.info-message {
     background-color: rgba(0, 123, 255, 0.1);
     color: #007bff;
     padding: 12px;
     border: 1px solid rgba(0, 123, 255, 0.2);
     border-radius: 5px;
     margin-top: 15px;
     font-size: 0.95rem;
}

/* ==================
   Status Indicators
   ================== */
.status-active {
    color: #28a745; /* Green */
    font-weight: bold;
}

.status-inactive,
.status-expired {
    color: #dc3545; /* Red */
}

.status-cancelled {
    color: #ffc107; /* Amber/Yellow */
    font-style: italic; /* Optional: Differentiate cancelled */
}

.status-pending {
    color: #17a2b8; /* Teal/Info */
}

.status-unknown {
    color: #6c757d; /* Gray */
}

/* --- Background Animation --- */
#background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Changed from 1 */
    overflow: hidden;
    pointer-events: none;
}

.spark {
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: rgba(255, 165, 0, 0.9);
    border-radius: 50%;
    box-shadow: 0 0 8px 2px rgba(255, 165, 0, 0.7);
    opacity: 0;
    animation: travel 15s linear infinite;
}

@keyframes travel {
    0% {
        opacity: 0;
        transform: translate(-100px, -100px);
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        opacity: 0;
        transform: translate(calc(100vw + 50px), calc(100vh + 50px));
    }
}

/* Stagger the animations */
.spark:nth-child(1) { top: 5%; left: 10%; animation-delay: 0s; animation-duration: 14s; } 
.spark:nth-child(2) { top: 15%; left: 50%; animation-delay: 1s; animation-duration: 16s; transform: scale(0.8); } 
.spark:nth-child(3) { top: 60%; left: 5%; animation-delay: 3s; animation-duration: 13s; transform: scale(1.1); } 
.spark:nth-child(4) { top: 80%; left: 30%; animation-delay: 5s; animation-duration: 18s; } 
.spark:nth-child(5) { top: 25%; left: 80%; animation-delay: 6s; animation-duration: 12s; transform: scale(0.9); } 
.spark:nth-child(6) { top: 50%; left: 90%; animation-delay: 7s; animation-duration: 15s; } 
.spark:nth-child(7) { top: 90%; left: 70%; animation-delay: 9s; animation-duration: 17s; transform: scale(1.2); } 
.spark:nth-child(8) { top: 30%; left: 20%; animation-delay: 11s; animation-duration: 14s; } 
.spark:nth-child(9) { top: 70%; left: 60%; animation-delay: 12s; animation-duration: 19s; transform: scale(0.7); }
.spark:nth-child(10) { top: 10%; left: 35%; animation-delay: 13s; animation-duration: 15s; }
/* --- End Background Animation --- */

/* Responsive styles (General Adjustments) */
@media (max-width: 1024px) {
    .glass-card {
        padding: 40px;
    }
    
    section h2 {
        font-size: 2.25rem;
    }
    
    .header-container {
        padding: 0 20px;
    }
    
    .container {
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-button {
        display: block;
        color: var(--text-color);
        font-size: 2rem;
        margin-right: 0;
    }

    nav ul {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: rgba(15, 18, 20, 0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 60px 20px 20px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
        z-index: 1000;
        transition: right 0.3s ease;
        overflow-y: auto;
    }

    nav ul.active {
        right: 0;
    }

    nav ul li {
        margin: 10px 0;
        width: 100%;
        transition: all 0.3s ease;
    }

    /* Hide the Desktop Auth Button (the <a> tag directly under nav) on Mobile */
    nav > a.button.nav-button#nav-auth-button {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        position: absolute !important;
        clip: rect(0, 0, 0, 0) !important;
        margin: -1px !important;
        padding: 0 !important;
        border: 0 !important;
    }

    /* Show and style the mobile-specific auth list item WHEN the mobile menu is active */
    nav ul.active > #nav-auth-mobile-li {
        display: list-item !important; /* Show it when menu is open */
        margin-top: auto !important; 
        padding-top: 20px;
        border-top: 1px solid var(--border-color);
        width: 100%;
    }

    /* Style for the actual button link inside the mobile menu li */
    #nav-auth-button-mobile {
        display: block !important;
        width: 100%;
        text-align: center;
        padding: 12px 20px !important;
        margin: 10px 0; /* Keep its internal button styling */
    }

    header .logo {
        height: 40px;
    }
    
    header { 
        padding: 15px 0;
    }
    
    main {
        padding-top: 20px;
    }

    section {
        padding: 60px 0;
        position: relative; 
        z-index: 1;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    button:not(#nav-signout-btn):not(.mobile-menu-button), 
    .button:not(#nav-signout-btn):not(#nav-auth-button-mobile) {
        width: 100%;
    }
    
    main,
    section,
    .glass-card {
        position: relative; 
        z-index: 1; 
        backdrop-filter: none; 
    }

    .mobile-menu-button {
        transition: all 0.3s ease;
    }
    
    .mobile-menu-button.open span {
        background-color: transparent;
    }
    
    .mobile-menu-button.open span:before {
        transform: rotate(45deg);
        top: 0;
    }
    
    .mobile-menu-button.open span:after {
        transform: rotate(-45deg);
        top: 0;
    }
}


@media (max-width: 480px) {
    .container {
        padding: 0 15px; /* Consistent padding */
    }
    .header-container {
        padding: 0 15px; /* Match container padding */
    }
    section h2 {
        font-size: 1.75rem;
    }
    .glass-card {
        padding: 30px 20px;
    }

    body {
        overflow-x: hidden; /* Prevent horizontal scroll */
    }

    .mobile-menu-button {
        display: block !important; /* Ensure menu button is always visible on mobile */
    }
}

@media (max-width: 768px) {
    /* Ensure "Sign Out" button is styled correctly in mobile menu */
    nav ul li #nav-signout-btn, 
    nav ul li #signout-button {
        width: auto !important;
        max-width: 200px;
        margin: 0 auto;
        display: inline-block;
    }
    
    /* Also ensure it's centered */
    nav ul li.nav-signout {
        text-align: center;
        margin-top: 20px;
    }
}

/* --- Lightbox Styles --- */
/* @keyframes fadeScaleIn { // REMOVING KEYFRAMES
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes fadeScaleOut { // REMOVING KEYFRAMES
    from { opacity: 1; transform: scale(1); }
    to   { opacity: 0; transform: scale(0.95); }
} */

#lightbox {
    display: none; /* Hidden by default, JS will change to flex for animations */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    cursor: pointer;
    opacity: 0; /* Initial state for transition */
    transform: scale(0.95); /* Initial state for transition */
    transition: opacity 0.3s ease-out, transform 0.3s ease-out; /* Define transition */
}

#lightbox.lightbox-is-shown { /* Defines the stable open state */
    opacity: 1;
    transform: scale(1);
}

/* #lightbox.lightbox-animating-open { // REMOVING ANIMATION CLASS
    animation: fadeScaleIn 0.3s ease-out; 
} */

/* #lightbox.lightbox-animating-close { // REMOVING ANIMATION CLASS
    animation: fadeScaleOut 0.3s ease-in forwards; 
} */

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain; /* Keep aspect ratio */
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    cursor: default; /* Default cursor for the image itself */
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 3rem; /* Larger close button */
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
    z-index: 10001; /* Ensure it's above content if any overlap scenario arises */
}

.lightbox-close:hover {
    color: #bbb;
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #f0f0f0;
    font-size: 1rem;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 8px 15px;
    border-radius: 4px;
    max-width: 80%;
    z-index: 10001; /* Ensure it's above content */
}

.clickable-screenshot {
    cursor: pointer;
}

/* --- Lightbox Styles --- */
/* @keyframes fadeScaleIn { // REMOVING KEYFRAMES
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes fadeScaleOut { // REMOVING KEYFRAMES
    from { opacity: 1; transform: scale(1); }
    to   { opacity: 0; transform: scale(0.95); }
} */

#lightbox {
    display: none; /* Hidden by default, JS will change to flex for animations */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    cursor: pointer;
    opacity: 0; /* Initial state for transition */
    transform: scale(0.95); /* Initial state for transition */
    transition: opacity 0.3s ease-out, transform 0.3s ease-out; /* Define transition */
}

#lightbox.lightbox-is-shown { /* Defines the stable open state */
    opacity: 1;
    transform: scale(1);
}

/* #lightbox.lightbox-animating-open { // REMOVING ANIMATION CLASS
    animation: fadeScaleIn 0.3s ease-out; 
} */

/* #lightbox.lightbox-animating-close { // REMOVING ANIMATION CLASS
    animation: fadeScaleOut 0.3s ease-in forwards; 
} */

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain; /* Keep aspect ratio */
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    cursor: default; /* Default cursor for the image itself */
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 3rem; /* Larger close button */
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
    z-index: 10001; /* Ensure it's above content if any overlap scenario arises */
}

.lightbox-close:hover {
    color: #bbb;
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #f0f0f0;
    font-size: 1rem;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 8px 15px;
    border-radius: 4px;
    max-width: 80%;
    z-index: 10001; /* Ensure it's above content */
}

.clickable-screenshot {
    cursor: pointer;
} 