@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

body {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #0a0a0a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow: hidden;
    position: relative;
}

/* Decorative half circles */
.half-circle-top-left {
    position: fixed;
    top: -150px;
    left: -150px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.06) 40%, transparent 70%);
    animation: float-tl 20s ease-in-out infinite;
    pointer-events: none;
    z-index: 9998;
}

.half-circle-bottom-right {
    position: fixed;
    bottom: -180px;
    right: -180px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0.05) 40%, transparent 70%);
    animation: float-br 25s ease-in-out infinite reverse;
    pointer-events: none;
    z-index: 9998;
}

@keyframes float-tl {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -20px) scale(1.1); }
    66% { transform: translate(-15px, 15px) scale(0.95); }
}

@keyframes float-br {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-25px, 25px) scale(1.05); }
    66% { transform: translate(20px, -20px) scale(0.9); }
}

/* Grid pattern overlay */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 30s linear infinite;
    pointer-events: none;
    opacity: 0.5;
    z-index: 9998;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

#fade {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #0a0a0a 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 60px 30px;
    transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
    visibility: visible;
    opacity: 1;
}

#fade.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Logo container */
.logo-container {
    position: relative;
    margin-bottom: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-glow {
    position: absolute;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
    filter: blur(50px);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.15); opacity: 0.7; }
}

.center {
    position: relative;
    z-index: 2;
    margin: 0;
    filter: drop-shadow(0 10px 40px rgba(255, 255, 255, 0.2));
    animation: float-logo 3s ease-in-out infinite;
}

/* Logo image specific styles */
.logo-image {
    max-width: 112px;
    width: 100%;
    height: auto;
    filter: brightness(0) invert(1);
}

@keyframes float-logo {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

#splash {
    display: none;
}

/* Loading section */
.loading {
    width: 100%;
    max-width: 420px;
    text-align: center;
}

/* Status text */
.percent {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.6;
    letter-spacing: 0.3px;
    min-height: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.message-text {
    display: block;
    transition: opacity 0.3s ease-in-out;
}

/* Progress bar container */
.progress-bar {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    overflow: visible;
    position: relative;
    backdrop-filter: blur(10px);
}

.progress {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.8) 0%, 
        rgba(255, 255, 255, 1) 50%, 
        rgba(255, 255, 255, 0.9) 100%);
    border-radius: 100px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 
        0 0 20px rgba(255, 255, 255, 0.5),
        0 0 40px rgba(255, 255, 255, 0.3);
}

/* Shimmer effect */
.progress::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.6) 50%, 
        transparent 100%);
    animation: shimmer 2s infinite;
}

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

/* Loading dots */
.loading-dots {
    display: inline-flex;
    gap: 5px;
    margin-top: 8px;
}

.loading-dots span {
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: dotBounce 1.4s infinite ease-in-out;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes dotBounce {
    0%, 80%, 100% { 
        transform: scale(0.6); 
        opacity: 0.4; 
    }
    40% { 
        transform: scale(1); 
        opacity: 1; 
    }
}

/* Percentage indicator */
.progress-percentage {
    display: none; /* Hidden to avoid user confusion when stuck at 100% */
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    font-variant-numeric: tabular-nums;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    #fade { 
        padding: 40px 20px;
    }
    .logo-image {
        max-width: 84px;
    }
    .logo-glow {
        width: 170px;
        height: 170px;
    }
    .percent { font-size: 14px; }
    .loading { max-width: 100%; }
    
    .half-circle-top-left {
        width: 200px;
        height: 200px;
        top: -100px;
        left: -100px;
    }
    
    .half-circle-bottom-right {
        width: 240px;
        height: 240px;
        bottom: -120px;
        right: -120px;
    }
}
