:root {
    --color-primary: #13ec37;
    --color-primary-rgb: 19, 236, 55;
    --color-bg-dark: #09090b;
    --glass-bg: rgba(9, 9, 11, 0.6);
    --glass-border: rgba(255, 255, 255, 0.05);

    /* ADAPTIVE UI */
    --ui-scale: 1.0;
    --master-volume: 1.0;
}

/* Custom Scrollbar */
.scroll-custom::-webkit-scrollbar { width: 6px; }
.scroll-custom::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 10px; }
.scroll-custom::-webkit-scrollbar-thumb { background: rgba(var(--color-primary-rgb), 0.2); border-radius: 10px; border: 2px solid transparent; background-clip: content-box; }
.scroll-custom::-webkit-scrollbar-thumb:hover { background: rgba(var(--color-primary-rgb), 0.5); }

.game-module-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 10rem 3rem 3rem 3rem !important;
    width: 100%;
    zoom: var(--ui-scale);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#game-wrapper {
    height: 100%;
    width: 100%;
    position: relative;
    background: radial-gradient(circle at top, rgba(var(--color-primary-rgb), 0.03) 0%, transparent 70%);
    font-size: calc(16px * var(--ui-scale));
}

#hud-vignette {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 12rem;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 40%, transparent 100%);
    pointer-events: none;
    z-index: 550;
}

.game-module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 10;
}

/* Admin Console CRT Effects */
#admin-console {
    background: rgba(0, 0, 0, 0.95) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8), 0 0 20px rgba(239, 68, 68, 0.1) !important;
    overflow: hidden;
}

#admin-console::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 2;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

#admin-terminal-output {
    text-shadow: 0 0 5px rgba(239, 68, 68, 0.5);
}

.game-module-title-group {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.game-module-icon {
    font-size: 3.75rem !important; /* text-6xl */
    line-height: 1;
}

.game-module-titles h2 {
    font-size: 2.25rem; /* text-4xl */
    font-weight: 900;
    font-style: italic;
    text-transform: uppercase;
    line-height: 1;
    margin: 0;
}

.game-module-subtitle {
    font-size: 10px;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    font-weight: 900;
}

.game-module-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Common Effects */
.shadow-glow-primary { box-shadow: 0 0 20px rgba(var(--color-primary-rgb), 0.4); }
.shadow-glow-blue { box-shadow: 0 0 20px rgba(59, 130, 246, 0.4); }
.shadow-glow-red { box-shadow: 0 0 30px rgba(220, 38, 38, 0.4); }
.shadow-glow-yellow { box-shadow: 0 0 20px rgba(234, 179, 8, 0.4); }
.shadow-glow-text { text-shadow: 0 0 10px rgba(var(--color-primary-rgb), 0.8); }
.shadow-glow-text-blue { text-shadow: 0 0 10px rgba(59, 130, 246, 0.8); }
.shadow-glow-text-yellow { text-shadow: 0 0 10px rgba(234, 179, 8, 0.8); }

/* Common Interaction Helpers */
.cursor-help { cursor: help; }
.animate-fade-in { animation: fadeIn 0.3s ease-out forwards; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Shared Buttons */
.btn-game-secondary {
    height: 2.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8; /* text-text-muted */
    transition: all 0.2s;
}
.btn-game-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-game-primary {
    width: 100%;
    padding: 1rem 0;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 10px;
    border-radius: 1rem;
    transition: all 0.2s;
}

/* Settings Adjusting State */
.settings-adjusting {
    opacity: 0.25 !important;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* HUD Dropdown System (v1.0.1 - Mega Bridge Fix) */
#hub-profile-hud {
    padding-top: 1rem;
    padding-bottom: 2rem; /* Reduced from 5rem for better positioning */
    margin-top: -1rem;
    margin-bottom: -2rem;
}

#profile-hud-trigger {
    padding-bottom: 1rem; /* Extra reach for the content itself */
}

#hud-profile-dropdown {
    position: absolute;
    top: 100%; 
    left: 0;
    min-width: 260px;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2rem;
    padding: 1.5rem;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8), 0 0 30px rgba(var(--color-primary-rgb), 0.1);
    opacity: 0;
    transform: translateY(-5px); 
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
}

/* Mega Bridge: Extends far beyond the visual container to bridge any gap */
#hud-profile-dropdown::before {
    content: '';
    position: absolute;
    top: -10rem; /* 160px reach upwards */
    left: 0;
    right: 0;
    height: 10rem;
    background: transparent;
}

#hub-profile-hud:hover #hud-profile-dropdown,
#hub-profile-hud.menu-open #hud-profile-dropdown {
    opacity: 1;
    transform: translateY(0.5rem); /* Minimal shift for maximum stability */
    pointer-events: all;
}

.hud-dropdown-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 1.25rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 900;
    text-transform: uppercase;
    font-style: italic;
    font-size: 10px;
    letter-spacing: 0.1em;
    transition: all 0.2s;
    cursor: pointer;
    border: 1px solid transparent;
}

.hud-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: white;
    border-color: rgba(255, 255, 255, 0.05);
}

.hud-dropdown-item.active {
    color: var(--color-primary);
    background: rgba(var(--color-primary-rgb), 0.05);
}

.hud-dropdown-item .material-symbols-outlined {
    font-size: 1.25rem;
}

.hud-dropdown-sep {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 0.75rem 0;
}

/* Toggleable HUD Elements */
.hud-element-hidden {
    display: none !important;
}
