:root {
    /* Theme-independent colors */
    --accent-color: rgba(255, 0, 0, 1);
    --success-color: rgba(100, 200, 100, 1);
    --warning-color: rgba(255, 200, 0, 1);
    --info-color: rgba(0, 120, 255, 1);
    --high-demand-color: rgb(255, 65, 0);

    /* Faded variants */
    --success-color-faded: rgba(100, 200, 100, 0.65);
    --error-color-faded: rgba(255, 25, 0, 0.65);
    --warning-color-faded: rgba(255, 200, 0, 0.65);
    --info-color-faded: rgba(0, 120, 255, 0.65);
    --high-demand-color-faded: rgba(255, 65, 0, 0.65);

    /* Layout & Transitions */
    --theme-transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    --navbar-height: 12vh;
    --footer-height: 8vh; /* Adjusted from 10vh to match previous req if needed, keeping user request */
    --nav-top: 4vh;
    --footer-bottom: 4vh;
    --side-margin: 4vw;
    --main-width: 92vw;
    --hero-height: 100vh;

    /* Legacy mappings for existing components */
    --text-gold: #ffd700;
    --text-silver: #c0c0c0;
    --primary-glow: #00ff00;
}

[data-theme="light"] {
    --page-bg: #ffffff;
    --content-bg: #dddddd;
    --card-bg: #cccccc;
    --text-color: #000000;
    --text-secondary: #222222;
    --text-muted: #666666;
    --border-color: rgba(0, 0, 0, 0.25);
    --divider-color: #eeeeee;
    --header-text: var(--accent-color);
    --hover-bg: rgba(0,0,0,0.1);
}

[data-theme="dark"] {
    --page-bg: #000000;
    --content-bg: #111111; /* Darker than previous #222 to fit "black" vibe */
    --card-bg: #1a1a1a;
    --text-color: #ffffff;
    --text-secondary: #dddddd;
    --text-muted: #aaaaaa;
    --border-color: rgba(255, 255, 255, 0.25);
    --divider-color: #333333;
    --header-text: var(--text-gold);
    --hover-bg: rgba(255,255,255,0.1);
}

/* --- GLOBAL RESETS & FONTS --- */
body {
    margin: 0;
    padding: 0;
    background-color: var(--page-bg);
    color: var(--text-color);
    font-family: 'Audiowide Regular', sans-serif;
    overflow-x: hidden;
    transition: var(--theme-transition);
}

h1, h2, h3, h4, h5, h6, .nav-item, button, .btn {
    font-family: 'Starcraft Regular', sans-serif;
    text-transform: uppercase;
    color: var(--text-color);
}

/* --- LAYOUT STRUCTURES --- */
.main-layout {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    width: 100%;
    z-index: -1;
}

.main-layout-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
}

/* --- MAIN CONTAINER --- */
.page-container {
    position: relative;
    top: 0;
    margin-top: 104vh;
    margin-bottom: 16vh;
    left: 0;
    margin-left: var(--side-margin);
    right: 0;
    margin-right: var(--side-margin);
    height: auto;
    width: var(--max-width);
    background: var(--content-bg);
    border: 1px solid var(--border-color);
    box-sizing: border-box;
    z-index: 50;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    transition: var(--theme-transition);
}

/* --- PANELS & SECTIONS --- */
section, panel {
    display: block;
    position: relative;
    box-sizing: border-box;
}

.inactive { display: none !important; visibility: hidden;}
.active { display: block !important; visibility: visible; animation: fadeIn 0.5s ease; }

/* --- UTILITY --- */
.btn-glow {
    padding: 10px 25px;
    background: transparent;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    cursor: pointer;
    transition: 0.3s;
}
.btn-glow:hover {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 0 10px var(--accent-color);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }