/* ============================================
   SPLASH SCREEN STYLES
   Gaming Style with Dark Purple Theme
   ============================================ */

/* Overlay - Full screen cover */
.splash-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    overflow: hidden;
}

/* Particle background effect */
.splash-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(102, 126, 234, 0.1) 0%, transparent 30%);
    animation: particleFloat 20s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

/* Main content container */
.splash-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    max-width: 700px;
    width: 90%;
    padding: 30px;
}

/* Logo Section */
.splash-logo-container {
    text-align: center;
    opacity: 0;
    transform: scale(0.5);
}

.splash-logo {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 10px 40px rgba(102, 126, 234, 0.4),
        0 0 60px rgba(118, 75, 162, 0.3);
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4), 0 0 60px rgba(118, 75, 162, 0.3); }
    50% { box-shadow: 0 15px 50px rgba(102, 126, 234, 0.6), 0 0 80px rgba(118, 75, 162, 0.5); }
}

.splash-icon {
    font-size: 3rem;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.splash-title {
    font-family: 'Fredoka', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    text-shadow: 0 4px 20px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #fff 0%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.splash-subtitle {
    font-family: 'Fredoka', sans-serif;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 5px 0 0 0;
    font-weight: 400;
}

/* Progress Bar */
.splash-progress-container {
    width: 100%;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0;
}

.splash-progress-bar {
    flex: 1;
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.splash-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.6);
    transition: width 0.3s ease;
}

.splash-progress-text {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
    min-width: 50px;
    text-align: right;
}

/* Console Window */
.splash-console {
    width: 100%;
    max-width: 600px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    opacity: 0;
}

.splash-console-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.splash-console-header i {
    color: #667eea;
}

.splash-console-body {
    max-height: 200px;
    overflow-y: auto;
    padding: 10px 15px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* Custom scrollbar for console */
.splash-console-body::-webkit-scrollbar {
    width: 6px;
}

.splash-console-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.splash-console-body::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 3px;
}

/* Individual log lines */
.splash-log {
    opacity: 0;
    transform: translateX(-10px);
    padding: 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.splash-log:hover {
    background: rgba(255, 255, 255, 0.05);
    margin: 0 -15px;
    padding: 2px 15px;
}

/* Log color variations */
.splash-log.supabase { color: #00b894; }
.splash-log.indexeddb { color: #0984e3; }
.splash-log.perf { color: #fdcb6e; }
.splash-log.error { color: #d63031; }
.splash-log.success { color: #00b894; }
.splash-log.info { color: #74b9ff; }
.splash-log.default { color: rgba(255, 255, 255, 0.8); }

/* Ready Message */
.splash-ready {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.2) 0%, rgba(0, 184, 148, 0.1) 100%);
    border: 2px solid rgba(0, 184, 148, 0.3);
    border-radius: 30px;
    color: #00b894;
    font-weight: 600;
    font-size: 1rem;
    opacity: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.splash-ready:hover {
    background: linear-gradient(135deg, rgba(0, 184, 148, 0.3) 0%, rgba(0, 184, 148, 0.2) 100%);
    border-color: rgba(0, 184, 148, 0.5);
    transform: scale(1.05);
}

.splash-ready-icon {
    font-size: 1.3rem;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Hide scrollbar for splash screen */
.splash-overlay ::-webkit-scrollbar {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .splash-content {
        padding: 20px;
        gap: 20px;
    }
    
    .splash-logo {
        width: 80px;
        height: 80px;
    }
    
    .splash-icon {
        font-size: 2.5rem;
    }
    
    .splash-title {
        font-size: 1.8rem;
    }
    
    .splash-console-body {
        font-size: 0.65rem;
        max-height: 150px;
    }
}
