/* STOQO - Twoje miejsce do zarządzania */
/* Nowoczesne style dla strony ładowania */

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

:root {
    /* Kolory główne */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    
    /* Kolory tła */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #334155;
    
    /* Kolory tekstu */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    /* Cienie */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    
    /* Animacje */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Kontener główny */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    position: relative;
}

/* Animowane tło */
.loading-container::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    z-index: -1;
    animation: backgroundPulse 8s ease-in-out infinite;
}

@keyframes backgroundPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Logo */
.logo-container {
    position: relative;
    margin-bottom: 3rem;
    animation: logoFloat 3s ease-in-out infinite;
    /* Stabilizacja pozycji logo */
    transform: translateZ(0);
    will-change: transform;
}

.logo {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    transition: transform var(--transition-normal);
    z-index: 2;
    position: relative;
    /* Stabilizacja pozycji logo */
    transform: translateZ(0);
    will-change: transform;
}

.logo:hover {
    transform: translateZ(0) scale(1.05);
}

.logo-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 140px;
    height: 140px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 2s ease-in-out infinite;
    z-index: 1;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0;
    }
}

/* Główna zawartość */
.main-content {
    text-align: center;
    max-width: 800px;
    margin-bottom: 4rem;
}

.main-title {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.title-primary {
    font-size: 4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: titleGlow 3s ease-in-out infinite;
}

.title-secondary {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

@keyframes titleGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.8;
}

/* Pasek ładowania */
.loading-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-card);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
    animation: loadingProgress 3s ease-in-out infinite;
    position: relative;
}

.loading-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes loadingProgress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Status ładowania */
.loading-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.status-text {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.loading-dots {
    display: flex;
    gap: 0.3rem;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: dotsBounce 1.4s ease-in-out infinite both;
}

.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 dotsBounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Podgląd funkcji */
.features-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
    max-width: 800px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(51, 65, 85, 0.3);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all var(--transition-normal);
    animation: featureFloat 4s ease-in-out infinite;
}

.feature-item:nth-child(2) { animation-delay: 0.5s; }
.feature-item:nth-child(3) { animation-delay: 1s; }
.feature-item:nth-child(4) { animation-delay: 1.5s; }

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 2rem;
    filter: grayscale(0.2);
    transition: filter var(--transition-normal);
}

.feature-item:hover .feature-icon {
    filter: grayscale(0);
}

.feature-item span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
}

@keyframes featureFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* Footer */
.footer {
    text-align: center;
    margin-top: auto;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 800px;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer p:last-child {
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.7;
}

/* Responsywność */
@media (max-width: 768px) {
    .loading-container {
        padding: 1rem;
    }
    
    .title-primary {
        font-size: 2.5rem;
    }
    
    .title-secondary {
        font-size: 1.2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .logo {
        width: 80px;
        height: 80px;
    }
    
    .logo-pulse {
        width: 100px;
        height: 100px;
    }
    
    .features-preview {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .feature-item {
        padding: 1rem;
    }
    
    .feature-icon {
        font-size: 1.5rem;
    }
    
    .feature-item span {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .features-preview {
        grid-template-columns: 1fr;
    }
    
    .title-primary {
        font-size: 2rem;
    }
    
    .loading-status {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Dodatkowe efekty */
.loading-container::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.02)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.02)"/><circle cx="50" cy="10" r="1" fill="rgba(255,255,255,0.02)"/><circle cx="10" cy="60" r="1" fill="rgba(255,255,255,0.02)"/><circle cx="90" cy="40" r="1" fill="rgba(255,255,255,0.02)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
    z-index: -1;
    opacity: 0.3;
}
