/* UNIVERSAL LOADING SCREEN */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Loading Content */
.loading-content {
    text-align: center;
    color: white;
}

/* Logo Animation */
.loading-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 2rem;
    animation: logoSpin 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(212, 212, 212, 0.3));
}

@keyframes logoSpin {
    0% {
        transform: rotate(0deg) scale(1);
        filter: drop-shadow(0 0 20px rgba(212, 212, 212, 0.3));
    }
    50% {
        transform: rotate(180deg) scale(1.1);
        filter: drop-shadow(0 0 30px rgba(212, 212, 212, 0.6));
    }
    100% {
        transform: rotate(360deg) scale(1);
        filter: drop-shadow(0 0 20px rgba(212, 212, 212, 0.3));
    }
}

/* Studio Name */
.loading-title {
    font-size: 2.5rem;
    font-weight: bold;
    letter-spacing: 3px;
    color: #d4d4d4;
    margin-bottom: 0.5rem;
    animation: titleFade 2s ease-in-out infinite;
}

.loading-subtitle {
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: #888;
    margin-bottom: 3rem;
    animation: titleFade 2s ease-in-out infinite 0.5s;
}

@keyframes titleFade {
    0%, 100% {
        opacity: 0.7;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

/* Loading Progress Bar */
.loading-progress {
    width: 300px;
    height: 4px;
    background: #333;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #666, #d4d4d4, #666);
    background-size: 200% 100%;
    animation: progressFlow 1.5s ease-in-out;
    border-radius: 2px;
}

@keyframes progressFlow {
    0% {
        width: 0%;
        background-position: 200% 0;
    }
    50% {
        background-position: 0% 0;
    }
    100% {
        width: 100%;
        background-position: -200% 0;
    }
}

/* Loading Text */
.loading-text {
    font-size: 1rem;
    color: #888;
    letter-spacing: 1px;
    animation: textPulse 1.5s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* Tattoo Needle Animation */
.needle-animation {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
}

.needle {
    width: 3px;
    height: 40px;
    background: linear-gradient(to bottom, #888, #d4d4d4);
    margin: 0 auto;
    animation: needleMove 1s ease-in-out infinite;
    border-radius: 2px;
}

.needle::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -2px;
    width: 7px;
    height: 8px;
    background: #d4d4d4;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

.needle::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: -1px;
    width: 5px;
    height: 3px;
    background: #666;
    border-radius: 50%;
}

@keyframes needleMove {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-5px) rotate(2deg);
    }
    75% {
        transform: translateY(3px) rotate(-2deg);
    }
}

/* Ink Drops */
.ink-drops {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.ink-drop {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #d4d4d4;
    border-radius: 50%;
    animation: inkFall 3s linear infinite;
}

.ink-drop:nth-child(1) { left: 10%; animation-delay: 0s; }
.ink-drop:nth-child(2) { left: 20%; animation-delay: 0.5s; }
.ink-drop:nth-child(3) { left: 30%; animation-delay: 1s; }
.ink-drop:nth-child(4) { left: 40%; animation-delay: 1.5s; }
.ink-drop:nth-child(5) { left: 60%; animation-delay: 2s; }
.ink-drop:nth-child(6) { left: 70%; animation-delay: 2.5s; }
.ink-drop:nth-child(7) { left: 80%; animation-delay: 3s; }
.ink-drop:nth-child(8) { left: 90%; animation-delay: 3.5s; }

@keyframes inkFall {
    0% {
        top: -10px;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        top: 100vh;
        opacity: 0;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .loading-logo {
        width: 80px;
        height: 80px;
        margin-bottom: 1.5rem;
    }

    .loading-title {
        font-size: 2rem;
    }

    .loading-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .loading-progress {
        width: 250px;
    }

    .needle-animation {
        width: 40px;
        height: 40px;
    }

    .needle {
        width: 2px;
        height: 30px;
    }
}
