/* ===================================
   SPINNER STYLES - 4 Second Duration
   =================================== */

/* Spinner Container */
.spinner-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.spinner-container.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Main Spinner */
.spinner {
    position: relative;
    width: 80px;
    height: 80px;
}

/* Spinner Ring */
.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top-color: #00d4ff;
    border-right-color: #00d4ff;
    border-radius: 50%;
    animation: spin 4s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

/* Secondary Ring for Double Effect */
.spinner-ring-2 {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-bottom-color: #ff00ff;
    border-left-color: #ff00ff;
    border-radius: 50%;
    animation: spin-reverse 4s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

/* Inner Ring */
.spinner-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 3px solid transparent;
    border-top-color: #ffaa00;
    border-radius: 50%;
    animation: spin 4s linear infinite reverse;
}

/* Center Dot */
.spinner-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #00d4ff, #ff00ff);
    border-radius: 50%;
    animation: pulse 4s ease-in-out infinite;
}

/* Loading Text */
.spinner-text {
    position: absolute;
    top: calc(50% + 60px);
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: fade 4s ease-in-out infinite;
}

/* Keyframe Animations */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes spin-reverse {
    0% {
        transform: rotate(360deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0.6;
    }
}

@keyframes fade {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* Alternative Simple Spinner (Single Ring) */
.spinner-simple {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top-color: #00d4ff;
    border-radius: 50%;
    animation: spin 4s linear infinite;
}

/* Gradient Spinner */
.spinner-gradient {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: conic-gradient(from 0deg,
            transparent 0deg,
            #00d4ff 90deg,
            #ff00ff 180deg,
            #ffaa00 270deg,
            transparent 360deg);
    animation: spin 4s linear infinite;
    -webkit-mask: radial-gradient(circle,
            transparent 50%,
            black 50%,
            black 60%,
            transparent 60%);
    mask: radial-gradient(circle,
            transparent 50%,
            black 50%,
            black 60%,
            transparent 60%);
}

/* Dots Spinner */
.spinner-dots {
    display: flex;
    gap: 10px;
}

.spinner-dot-item {
    width: 15px;
    height: 15px;
    background: #00d4ff;
    border-radius: 50%;
    animation: bounce 4s ease-in-out infinite;
}

.spinner-dot-item:nth-child(2) {
    animation-delay: 0.33s;
    background: #ff00ff;
}

.spinner-dot-item:nth-child(3) {
    animation-delay: 0.66s;
    background: #ffaa00;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }

    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .spinner {
        width: 60px;
        height: 60px;
    }

    .spinner-inner {
        width: 45px;
        height: 45px;
    }

    .spinner-text {
        font-size: 12px;
        top: calc(50% + 45px);
    }
}