/* ============================
   PAGE LOADER - Matches Homepage Red Gradient Theme
   ============================ */

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    color: white;
}

/* Animated Logo/Icon */
.loader-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    position: relative;
}

.loader-icon {
    width: 100%;
    height: 100%;
    animation: pulse 2s ease-in-out infinite;
}

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

/* Play button icon */
.loader-play {
    fill: white;
    transform-origin: center;
    animation: playPulse 1.5s ease-in-out infinite;
}

@keyframes playPulse {
    0%,
    100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Rotating ring */
.loader-circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 3;
}

.loader-circle {
    fill: none;
    stroke: white;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 339;
    stroke-dashoffset: 0;
    transform-origin: center;
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    0% {
        stroke-dashoffset: 339;
        transform: rotate(0deg);
    }
    50% {
        stroke-dashoffset: 85;
    }
    100% {
        stroke-dashoffset: 339;
        transform: rotate(360deg);
    }
}

/* Text */
.loader-text {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 32px;
    letter-spacing: 0.5px;
    animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Progress Bar */
.loader-progress {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
}

.loader-progress-bar {
    height: 100%;
    background: white;
    border-radius: 2px;
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0% {
        width: 0%;
        transform: translateX(0);
    }
    50% {
        width: 70%;
    }
    100% {
        width: 100%;
        transform: translateX(0);
    }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .loader-icon,
    .loader-play,
    .loader-circle,
    .loader-text,
    .loader-progress-bar {
        animation: none !important;
    }
}
