/* static/base.css
   Base styles, variables, reset, and utilities
   Extracted from style.css for better maintainability
*/

/* ===== CSS CUSTOM PROPERTIES (VARIABLES) ===== */
:root {
    /* Colors */
    --bg-color: #1a1a1a;
    --panel-bg: #2a2a2a;
    --dark-panel-bg: #1e1e1e;
    --darker-bg: #111;
    --light-panel-bg: #3a3a3a;
    --border-color: #444;
    --light-border: #333;
    --text-color: #e0e0e0;
    --muted-text: #bbb;
    --dim-text: #888;
    --accent-color: #7eadf7;
    --icon-color: #bbb;
    --icon-hover: #fff;
    --success-color: #4CAF50;
    --success-hover: #45a049;
    --primary-color: #2196F3;
    --primary-hover: #1976D2;
    --error-color: #f44336;
    --warning-color: #ff6b6b;
    --warning-alt: #feca57;
    --disabled-color: #666;
    --roller-color: #ffb16b;
    
    /* Layout */
    --header-height: 50px;
    --toolbar-width: 60px;
    --gap: 3px;
    --border-radius-sm: 4px;
    --border-radius-md: 6px;
    --border-radius-lg: 8px;
    --border-radius-xl: 15px;
    --border-radius-full: 50px;
    --avail-search-width:200px;
    
    /* Spacing */
    --space-xs: 4px;
    --space-sm: 6px;
    --space-md: 8px;
    --space-lg: 10px;
    --space-xl: 12px;
    --space-xxl: 15px;
    --space-xxxl: 20px;
    
    /* Typography */
    --font-size-xs: 0.8em;
    --font-size-sm: 0.9em;
    --font-size-base: 1em;
    --font-size-lg: 1.1em;
    --font-size-xl: 1.2em;
    --font-size-xxl: 1.5em;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
    
    /* Z-index scale - CORRECTED */
    --z-behind: -1;
    --z-background: -1;
    --z-base: 0;
    --z-above: 10;
    --z-content: 20;
    --z-modal-backdrop: 100;
    --z-modal: 1000;
    --z-perimeter: 1100;
    --z-dropdown: 1200;
    --z-tooltip: 1500;
    --z-max: 10000;
    
    /* Perimeter specific */
    --right-arm-bg: transparent;
    --right-arm-border: var(--success-color);
    --left-arm-border: var(--error-color);
}

/* ===== UNIVERSAL RESET & BASE STYLES ===== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body, html {
    width: 100%;
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden;
    font-size: var(--font-size-base);
}

/* ===== SPLASH SCREEN ===== */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #000000 0%, #1a0000 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1s ease-out;
}

.splash-content {
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 900;
    font-size: clamp(6rem, 20vw, 18rem);
    color: #ff0000;
    text-shadow: none;
    user-select: none;
    animation: textGlowOnce 2.8s ease-out forwards;
}

@keyframes textGlowOnce {
    0% {
        text-shadow: none;
    }
    50% {
        text-shadow: 
            0 0 10px #ff0000,
            0 0 20px #ff0000,
            0 0 30px #ff0000;
    }
    100% {
        text-shadow: none;
    }
}

.splash-zero {
    color: #ffffff;
    transition: color 0.8s ease-in-out;
    position: relative;
    display: inline-block;
    text-shadow: none; /* Remove glow from the '0' */
}

.splash-globe {
    display: inline-block;
    font-family: 'Material Symbols Outlined';
    font-size: inherit;
    color: var(--icon-color) !important;
    text-shadow: 
        0 0 8px var(--icon-color),
        0 0 16px var(--icon-color);
    animation: globePulse 1.5s ease-in-out infinite;
    font-variation-settings: 'FILL' 1, 'wght' 700, 'GRAD' 0, 'opsz' 48;
    font-display: block;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    text-align: center;
}

.splash-globe.font-loaded {
    opacity: 1;
}

@keyframes globePulse {
    0% {
        text-shadow: 
            0 0 10px var(--icon-color),
            0 0 20px var(--icon-color),
            0 0 30px var(--icon-color);
        transform: scale(1);
    }
    50% {
        text-shadow: 
            0 0 20px var(--icon-color),
            0 0 40px var(--icon-color),
            0 0 60px var(--icon-color),
            0 0 80px rgba(187, 187, 187, 0.8);
        transform: scale(1.05);
    }
    100% {
        text-shadow: 
            0 0 10px var(--icon-color),
            0 0 20px var(--icon-color),
            0 0 30px var(--icon-color);
        transform: scale(1);
    }
}

#splash-screen.fade-out {
    opacity: 0;
    pointer-events: none !important;
}

.splash-hidden { 
    display: none !important; 
}

/* ===== UTILITY CLASSES ===== */
.hidden { display: none !important; }
.visible { display: block !important; }
.inline-visible { display: inline !important; }
.flex-visible { display: flex !important; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.margin-0 { margin: 0 !important; }
.margin-sm { margin: var(--space-sm); }
.margin-md { margin: var(--space-md); }
.margin-lg { margin: var(--space-lg); }

.padding-0 { padding: 0 !important; }
.padding-sm { padding: var(--space-sm); }
.padding-md { padding: var(--space-md); }
.padding-lg { padding: var(--space-lg); }

.full-width { width: 100%; }
.full-height { height: 100%; }

.no-select { user-select: none; }
.no-pointer-events { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

.z-index-high { z-index: var(--z-modal); }
.z-index-low { z-index: var(--z-background); }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes slideOutLeft {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes slideOutRight {
    from { transform: translateX(0); }
    to { transform: translateX(100%); }
}

.fade-in { animation: fadeIn var(--transition-normal) ease-out; }
.fade-out { animation: fadeOut var(--transition-normal) ease-out; }
.slide-in-left { animation: slideInLeft var(--transition-normal) ease-out; }
.slide-out-left { animation: slideOutLeft var(--transition-normal) ease-out; }
.slide-in-right { animation: slideInRight var(--transition-normal) ease-out; }
.slide-out-right { animation: slideOutRight var(--transition-normal) ease-out; }

/* ===== UTILITIES & HELPER CLASSES ===== */
.error-message {
    color: var(--error-color);
    font-size: var(--font-size-sm);
    margin-top: var(--space-sm);
    display: block;
}

.success-message {
    color: var(--success-color);
    font-size: var(--font-size-sm);
    margin-top: var(--space-sm);
    display: block;
}

.muted-text {
    color: var(--muted-text);
    font-size: var(--font-size-sm);
}

.dim-text {
    color: var(--dim-text);
    font-size: var(--font-size-xs);
}

/* ===== ACCENT LINK STYLES ===== */
.accent-links a,
.accent-link {
    color: var(--accent-color) !important;
    text-decoration: none;
}

.accent-links a:hover,
.accent-link:hover {
    color: var(--accent-color) !important;
    text-decoration: underline;
}

.accent-links a:visited,
.accent-link:visited {
    color: var(--accent-color) !important;
}

.accent-links a:active,
.accent-link:active {
    color: var(--accent-color) !important;
}
