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

body {
    background-color: var(--bg-deep);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: 1.6;
    height: 100vh;
    overflow: hidden;
}

h1 {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    line-height: 1.2;
}

h2 {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    line-height: 1.3;
}

h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    line-height: 1.4;
}

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

.text-secondary {
    color: var(--text-secondary);
}

/* Page Transitions */
.page-enter {
    animation: page-enter 300ms ease-out forwards;
}

@keyframes page-enter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes page-exit {
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* Accessibility Focus Indicators */
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Screen Reader Only Utility */
.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;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -50px;
    left: 20px;
    background: var(--accent);
    color: white;
    padding: 10px 15px;
    z-index: 9999;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 20px;
}

/* ===== INITIAL LOADER OVERLAY ===== */
#initial-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #050505;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: sans-serif;
}

.initial-loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.initial-loader-spinner {
    animation: spin 1s linear infinite;
}

.initial-loader-text {
    font-size: 0.9rem;
    opacity: 0.7;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}