.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.85)), url('/images/background.png');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden,
.page-loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    position: relative;
}

.loader-sword {
    width: 100%;
    height: 100%;
    animation: swordSpin 2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.loader-sword::before {
    content: "⚔️";
    font-size: 4rem;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 0 20px rgba(120, 150, 180, 0.8));
}

@keyframes swordSpin {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.1);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

.loader-text {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 1rem;
    animation: pulse 1.5s ease-in-out infinite;
}

.loader-dots {
    display: inline-block;
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '';
    }
    40% {
        content: '.';
    }
    60% {
        content: '..';
    }
    80%, 100% {
        content: '...';
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        text-shadow: 0 0 20px rgba(120, 150, 180, 0.6);
    }
    50% {
        opacity: 0.8;
        text-shadow: 0 0 30px rgba(120, 150, 180, 0.9);
    }
}

.loader-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.loader-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #7896b4, #8aa5c4, #7896b4);
    background-size: 200% 100%;
    animation: progressBar 1.5s ease-in-out infinite;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(120, 150, 180, 0.5);
}

@keyframes progressBar {
    0% {
        width: 0%;
        background-position: 0% 0%;
    }
    50% {
        width: 70%;
        background-position: 100% 0%;
    }
    100% {
        width: 100%;
        background-position: 0% 0%;
    }
}

.page-content {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
    animation-delay: 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
