/* Creative3Decor - Figma-szintű Loading Animáció */
/* Modern, elegáns és wow élmény */

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

.creative3decor-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: 
        radial-gradient(circle at 20% 80%, rgba(139, 125, 107, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(160, 140, 120, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(180, 160, 140, 0.05) 0%, transparent 50%),
        linear-gradient(135deg, #f8f5f0 0%, #f0ebe4 25%, #e8ddd4 50%, #d4c4b0 75%, #c4a890 100%);
    display: none; /* ALAPBÓL REJTVE - csak show() hívásra jelenik meg */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    backdrop-filter: blur(0.5px);
    -webkit-backdrop-filter: blur(0.5px);
}

/* Animated Background */
.creative3decor-spinner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(139, 125, 107, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(160, 140, 120, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(180, 160, 140, 0.15) 0%, transparent 50%);
    animation: backgroundFloat 20s ease-in-out infinite;
}

@keyframes backgroundFloat {
    0%, 100% { transform: rotate(0deg) scale(1); }
    33% { transform: rotate(120deg) scale(1.1); }
    66% { transform: rotate(240deg) scale(0.9); }
}

/* Main Container - GLASSMORPHISM DESIGN */
.spinner-container {
    position: relative;
    z-index: 2;
    text-align: center;
    animation: fadeInUp 1s ease-out;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: 
        0 8px 32px rgba(139, 125, 107, 0.1),
        0 4px 16px rgba(139, 125, 107, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    max-width: 480px;
    width: 90%;
    margin: 0 auto;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 3D Logo Animation - ENHANCED */
.logo-3d {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 48px;
    perspective: 1200px;
    filter: drop-shadow(0 8px 24px rgba(139, 125, 107, 0.2));
}

.logo-cube {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: rotate3D 12s linear infinite;
}

@keyframes rotate3D {
    0% { transform: rotateX(0deg) rotateY(0deg); }
    25% { transform: rotateX(90deg) rotateY(0deg); }
    50% { transform: rotateX(90deg) rotateY(90deg); }
    75% { transform: rotateX(0deg) rotateY(90deg); }
    100% { transform: rotateX(0deg) rotateY(0deg); }
}

.logo-face {
    position: absolute;
    width: 140px;
    height: 140px;
    background: 
        linear-gradient(135deg, 
            rgba(139, 125, 107, 0.9) 0%, 
            rgba(160, 140, 120, 0.9) 25%, 
            rgba(180, 160, 140, 0.9) 50%, 
            rgba(196, 168, 144, 0.9) 75%, 
            rgba(212, 196, 176, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    box-shadow: 
        0 8px 24px rgba(139, 125, 107, 0.2),
        0 4px 12px rgba(139, 125, 107, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.logo-face:nth-child(1) { transform: rotateY(0deg) translateZ(60px); }
.logo-face:nth-child(2) { transform: rotateY(90deg) translateZ(60px); }
.logo-face:nth-child(3) { transform: rotateY(180deg) translateZ(60px); }
.logo-face:nth-child(4) { transform: rotateY(-90deg) translateZ(60px); }
.logo-face:nth-child(5) { transform: rotateX(90deg) translateZ(60px); }
.logo-face:nth-child(6) { transform: rotateX(-90deg) translateZ(60px); }

/* Brand Name - MODERN TYPOGRAPHY */
.brand-name {
    font-size: 3.8rem;
    font-weight: 900;
    background: 
        linear-gradient(135deg, 
            #4a3d2a 0%, 
            #5d4e37 15%, 
            #6b5b47 30%, 
            #7a6b57 45%, 
            #8b7d6b 60%, 
            #9c8e7a 75%, 
            #a8967f 90%, 
            #b4a088 100%);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
    animation: gradientShift 12s ease-in-out infinite, textGlow 8s ease-in-out infinite alternate;
    letter-spacing: -0.03em;
    line-height: 1.05;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
    font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
    text-rendering: optimizeLegibility;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes textGlow {
    from { filter: drop-shadow(0 0 20px rgba(139, 125, 107, 0.3)); }
    to { filter: drop-shadow(0 0 30px rgba(139, 125, 107, 0.6)); }
}

/* Tagline */
.tagline {
    font-size: 1.2rem;
    font-weight: 500;
    color: #5d4e37;
    margin-bottom: 50px;
    animation: fadeIn 2s ease-out 0.5s both;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Progress Bar */
.progress-container {
    width: 320px;
    height: 8px;
    background: rgba(139, 125, 107, 0.15);
    border-radius: 12px;
    overflow: hidden;
    margin: 0 auto 32px;
    position: relative;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.1),
        0 1px 2px rgba(255, 255, 255, 0.1);
}

.progress-bar {
    height: 100%;
    background: 
        linear-gradient(90deg, 
            #6b5b47 0%, 
            #8b7d6b 25%, 
            #a08c78 50%, 
            #b49c8c 75%, 
            #c4a890 100%);
    border-radius: 12px;
    width: 0%;
    animation: progressLoad 10s ease-in-out infinite;
    position: relative;
    box-shadow: 
        0 2px 8px rgba(139, 125, 107, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: progressShine 8s ease-in-out infinite;
}

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

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

/* Loading Text - MODERN TYPOGRAPHY */
.loading-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #4a3d2a;
    animation: pulse 2s ease-in-out infinite;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.3px;
    line-height: 1.4;
    font-feature-settings: 'kern' 1, 'liga' 1;
    text-rendering: optimizeLegibility;
}

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

/* Modern Micro-interactions */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes glow {
    0%, 100% { 
        filter: drop-shadow(0 0 5px rgba(139, 125, 107, 0.3));
    }
    50% { 
        filter: drop-shadow(0 0 20px rgba(139, 125, 107, 0.6));
    }
}

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

/* Skip Button - MODERN GLASSMORPHISM */
.skip-button {
    background: 
        linear-gradient(135deg, 
            rgba(139, 125, 107, 0.8) 0%, 
            rgba(160, 140, 120, 0.8) 50%, 
            rgba(180, 160, 140, 0.8) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    padding: 14px 28px;
    margin: 24px auto 0 auto;
    cursor: pointer;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 24px rgba(139, 125, 107, 0.2),
        0 4px 12px rgba(139, 125, 107, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    animation: fadeIn 2s ease-out 3s both;
    width: fit-content;
    letter-spacing: 0.5px;
}

.skip-button:hover {
    background: 
        linear-gradient(135deg, 
            rgba(107, 91, 71, 0.9) 0%, 
            rgba(139, 125, 107, 0.9) 50%, 
            rgba(160, 140, 120, 0.9) 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 12px 32px rgba(139, 125, 107, 0.3),
        0 6px 16px rgba(139, 125, 107, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.skip-button:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 
        0 4px 16px rgba(139, 125, 107, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.1s ease;
}

.skip-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.skip-button:hover .skip-icon {
    transform: translateX(3px);
}

.skip-text {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Floating Particles */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(139, 125, 107, 0.6);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 1s; }
.particle:nth-child(3) { left: 30%; animation-delay: 2s; }
.particle:nth-child(4) { left: 40%; animation-delay: 3s; }
.particle:nth-child(5) { left: 50%; animation-delay: 4s; }
.particle:nth-child(6) { left: 60%; animation-delay: 5s; }
.particle:nth-child(7) { left: 70%; animation-delay: 0.5s; }
.particle:nth-child(8) { left: 80%; animation-delay: 1.5s; }
.particle:nth-child(9) { left: 90%; animation-delay: 2.5s; }

@keyframes float {
    0%, 100% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10%, 90% {
        opacity: 1;
    }
    50% {
        transform: translateY(50vh) scale(1);
    }
}

/* Responsive Design - MODERN BREAKPOINTS */
@media (max-width: 768px) {
    .spinner-container {
        padding: 32px 24px;
        max-width: 90%;
        border-radius: 20px;
    }
    
    .brand-name {
        font-size: 2.8rem;
        margin-bottom: 20px;
    }
    
    .tagline {
        font-size: 1rem;
        margin-bottom: 32px;
    }
    
    .logo-3d {
        width: 120px;
        height: 120px;
        margin-bottom: 36px;
    }
    
    .logo-face {
        width: 120px;
        height: 120px;
        font-size: 24px;
    }
    
    .progress-container {
        width: 280px;
        height: 6px;
    }
    
    .skip-button {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .spinner-container {
        padding: 24px 20px;
        max-width: 95%;
        border-radius: 16px;
    }
    
    .brand-name {
        font-size: 2.2rem;
        margin-bottom: 16px;
    }
    
    .tagline {
        font-size: 0.9rem;
        margin-bottom: 24px;
    }
    
    .logo-3d {
        width: 100px;
        height: 100px;
        margin-bottom: 28px;
    }
    
    .logo-face {
        width: 100px;
        height: 100px;
        font-size: 20px;
    }
    
    .progress-container {
        width: 240px;
        height: 6px;
    }
    
    .skip-button {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}

/* Hide spinner when page is loaded */
.creative3decor-spinner.hidden {
    display: none !important; /* FONTOS: display none kell! */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}
