/* ==========================================
   1. CORE ARCHITECTURE & TYPOGRAPHY
   ========================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #000000;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: clamp(1rem, 1.2vw + 0.8rem, 2rem);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    transition: background-color 0.8s ease;
}

/* ==========================================
   2. SPACE ENVIRONMENT (BACKGROUND)
   ========================================== */
.space-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    background: radial-gradient(circle at 50% 50%, #15002b 0%, #000000 80%);
}

.starfield {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background-image: 
        radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 40px),
        radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 30px),
        radial-gradient(#b388ff, rgba(179,136,255,.1) 3px, transparent 40px);
    background-size: 550px 550px, 350px 350px, 450px 450px;
    animation: starRise 25s linear infinite;
    opacity: 0.8;
}

.comet {
    position: absolute;
    width: 3px;
    height: 3px;
    background: linear-gradient(90deg, rgba(255,255,255,1) 0%, rgba(179,136,255,0) 100%);
    box-shadow: 0 0 10px #b388ff;
    opacity: 0;
    z-index: 2;
}

/* ==========================================
   3. GLASSMORPHISM INTERFACE
   ========================================== */
.glass-window {
    position: relative;
    z-index: 3;
    width: 90%;
    max-width: 550px;
    padding: 2.5rem 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: opacity 0.8s ease, transform 0.8s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 480px;
}

/* ==========================================
   4. BRAND ELEMENTS & TABS
   ========================================== */
.logo {
    width: 40%;
    max-width: 140px;
    height: auto;
    margin: 0 auto 1rem auto;
    display: block;
}

.tagline {
    font-size: 0.85em;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    color: #ffeb3b;
    font-weight: 600;
}

.tab-navigation {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    width: 100%;
}

.tab-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 0.4rem 0.8rem;
    transition: color 0.3s ease;
}

.tab-link:hover {
    color: #ffeb3b;
}

/* ==========================================
   5. LOADING ENGINE & INTERACTIVE GLOW
   ========================================== */
.progress-container {
    width: 100%;
    max-width: 300px;
    height: 6px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 235, 59, 0.2);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.1);
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #ffe082 0%, #ffb300 50%, #ffeb3b 100%);
    box-shadow: 0 0 15px #ffd700, 0 0 30px #ffb300;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: flashShimmer 1.5s infinite;
}

/* ==========================================
   6. GLOBAL APP FOOTER
   ========================================== */
.site-footer {
    width: 100%;
    font-size: 0.65em;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffffff;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1rem;
}

/* ==========================================
   7. TRANSITION ANIMATIONS
   ========================================== */
@keyframes starRise {
    from { transform: translateY(0); }
    to { transform: translateY(-50%); }
}

@keyframes streak {
    0% {
        transform: translate(0, 0) rotate(-15deg) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
        transform: translate(10vw, 3vh) rotate(-15deg) scale(1);
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translate(80vw, 24vh) rotate(-15deg) scale(0.5);
        opacity: 0;
    }
}

@keyframes flashShimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

body.fade-out {
    background-color: #000000;
}

body.fade-out .glass-window {
    opacity: 0;
    transform: scale(0.95);
}

body.fade-out .space-bg {
    opacity: 0;
    transition: opacity 0.8s ease;
}
