:root {
    --primary-color: #ff0064;
    --secondary-color: #00ffff;
    --bg-color: #050505;
    --text-color: #ffffff;
    --success-color: #00ff00;
    --error-color: #ff3333;
    --font-stack: 'Courier New', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-stack);
    background: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    cursor: crosshair;
    position: relative;
    transition: opacity 0.5s ease-out;
}

body.redirecting {
    opacity: 0;
    pointer-events: none;
}

/* --- BACKGROUND --- */
.bg-effect {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(20, 20, 20, 0.8) 0%, #000000 100%);
    z-index: 1;
}

.cyber-grid {
    position: absolute;
    inset: 0;
    z-index: 2;
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    transform: perspective(500px) rotateX(60deg) translateY(-100px) scale(2);
    opacity: 0.3;
    pointer-events: none;
    animation: grid-move 20s linear infinite;
}

@keyframes grid-move {
    0% { background-position: 0 0; }
    100% { background-position: 0 40px; }
}

.scanlines {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.03) 50%, transparent 50%);
    background-size: 100% 4px;
    z-index: 3;
    pointer-events: none;
}

/* --- MAIN CONTAINER --- */
.container {
    text-align: center;
    z-index: 10;
    padding: 20px;
    position: relative;
    transform: translate3d(0,0,0);
    will-change: transform;
    width: 100%;
    max-width: 500px;
}

/* --- UI ELEMENTS --- */
.status-message {
    font-size: 14px;
    color: var(--secondary-color);
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-transform: uppercase;
    text-shadow: 0 0 10px currentColor;
    min-height: 1.2em;
    transition: color 0.3s;
    font-weight: bold;
}

.status-success { color: var(--success-color) !important; text-shadow: 0 0 15px var(--success-color); }
.status-error { color: var(--error-color) !important; text-shadow: 0 0 15px var(--error-color); }

.logo-container { margin-bottom: 30px; }

.logo {
    max-width: 180px;
    height: auto;
    filter: drop-shadow(0 0 15px var(--primary-color));
    animation: logo-breathe 3s ease-in-out infinite;
}

@keyframes logo-breathe {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.03); opacity: 1; }
}

/* --- LOADER --- */
.loader-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
}

.orbit {
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-radius: 50%;
    will-change: transform; 
}

.orbit::before {
    content: '';
    position: absolute;
    width: 6px; height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    top: -3px; left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 0 8px var(--primary-color);
}

.orbit:nth-child(1) { animation: spin 1.2s linear infinite; border-top: 2px solid rgba(255, 0, 100, 0.3); }
.orbit:nth-child(2) { width: 70%; height: 70%; top: 15%; left: 15%; animation: spin 0.8s linear infinite reverse; border-left: 2px solid rgba(0, 255, 255, 0.3); }
.orbit:nth-child(2)::before { background: var(--secondary-color); box-shadow: 0 0 8px var(--secondary-color); }
.orbit:nth-child(3) { width: 40%; height: 40%; top: 30%; left: 30%; animation: spin 0.5s linear infinite; border-bottom: 2px solid rgba(255, 255, 255, 0.1); }

@keyframes spin { 100% { transform: rotate(360deg); } }

.core {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 40px; height: 40px;
    background: radial-gradient(circle, #333 30%, var(--primary-color) 100%);
    border-radius: 50%;
    box-shadow: 0 0 30px var(--primary-color), inset 0 0 10px #000;
    animation: core-pulse 0.8s ease-in-out infinite;
}

@keyframes core-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(0.95); box-shadow: 0 0 20px var(--primary-color); }
    50% { transform: translate(-50%, -50%) scale(1.05); box-shadow: 0 0 40px var(--primary-color); }
}

/* --- PROGRESS & DEBUG LOG --- */
.loading-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.progress-container {
    width: 100%; height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin: 0 auto 15px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
}

/* --- DEBUG PANEL STYLING --- */
.debug-panel {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #333;
    border-left: 3px solid var(--secondary-color);
    padding: 10px;
    margin-bottom: 15px;
    text-align: left;
    font-family: 'Consolas', monospace;
    font-size: 11px;
    backdrop-filter: blur(2px);
}

.debug-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
    margin-bottom: 5px;
    color: var(--secondary-color);
    font-weight: bold;
}

.log-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.log-row:last-child { border-bottom: none; }

.log-name { color: #aaa; flex: 2; }
.log-status { flex: 1; text-align: right; font-weight: bold; }
.log-ms { flex: 1; text-align: right; }

.status-badge {
    padding: 1px 5px;
    border-radius: 2px;
    font-size: 10px;
}
.status-ok { color: #000; background: var(--success-color); }
.status-fail { color: #fff; background: var(--error-color); }
.status-pending { color: #fff; animation: blink 0.5s infinite; }

@keyframes blink { 50% { opacity: 0.5; } }

/* --- BUTTONS --- */
.skip-link {
    display: none;
    margin-top: 10px;
    font-size: 11px;
    color: var(--secondary-color);
    text-decoration: none;
    border: 1px solid var(--secondary-color);
    padding: 6px 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(0,0,0,0.5);
}
.skip-link:hover {
    background: var(--secondary-color);
    color: #000;
    box-shadow: 0 0 15px var(--secondary-color);
}

.powered-by { 
    margin-top: 15px; 
    font-size: 9px; 
    color: rgba(255, 255, 255, 0.3); 
    letter-spacing: 2px;
}

@media (max-width: 600px) {
    .logo { max-width: 150px; }
    .loader-wrapper { width: 100px; height: 100px; }
    .container { padding: 10px; }
}