.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 9999;
    pointer-events: none;
    transition: opacity 0.6s ease-in-out;
}

.page-transition-overlay.fade-out {
    opacity: 0;
}

.page-transition-overlay.fade-in {
    opacity: 1;
    pointer-events: all;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Cinzel', serif;
    background: url('../pic/races/racesBG.jpg') no-repeat center center fixed;
    background-size: cover;
    color: #e5e5e5;
    overflow-x: hidden;
}

.background-fog {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    animation: fogFade 2s ease forwards;
}

@keyframes fogFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.content {
    margin-left: 300px;
    padding: 40px;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(40px);
    transition: 1.2s ease;
}

.content.visible {
    opacity: 1;
    transform: translateY(0);
}

h1 {
    text-align: center;
    font-size: 48px;
    text-shadow: 0 0 15px black;
    margin-bottom: 20px;
}

.guild-list {
    display: flex;
    flex-direction: column;
    gap: 90px;
    align-items: center;
    margin-top: 60px;
}

.guild-item {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 1100px;
    width: 100%;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.guild-item.show {
    opacity: 1;
    transform: translateY(0);
}

.image-wrapper {
    flex-shrink: 0;
    position: relative;
    width: 300px;
    height: 300px;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 0 25px black;
    cursor: pointer;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.image-wrapper:hover img {
    filter: blur(4px) brightness(0.6);
    transform: scale(1.05);
}

.overlay-title {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    font-weight: 600;
    opacity: 0;
    transition: 0.4s;
    text-shadow: 0 0 15px black;
}

.image-wrapper:hover .overlay-title {
    opacity: 1;
}

.side-description {
    flex-grow: 1;
    font-size: 18px;
    line-height: 1.6;
    opacity: 0;
    transform: translateX(-20px);
    transition: 0.5s ease;
}

.guild-item:hover .side-description {
    opacity: 1;
    transform: translateX(0);
}

.back-btn {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: #2d2d2d;
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    text-decoration: none;
    transition: 0.3s;
    z-index: 100;
}

.back-btn:hover {
    background: #444;
    transform: scale(1.05);
}

.music-control {
    position: fixed;
    top: 25px;
    left: 25px;
    z-index: 10001;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.music-control:hover {
    border-color: rgba(180, 220, 255, 0.6);
    transform: scale(1.1);
    text-shadow: 0 0 10px #fff;
}

.music-control.playing {
    border-color: rgba(0, 200, 255, 0.8);
    color: #00d2ff;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.4), inset 0 0 10px rgba(0, 210, 255, 0.2);
    animation: musicPulse 2s infinite ease-in-out;
}

@keyframes musicPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 25px rgba(0, 210, 255, 0.6);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 15px rgba(0, 210, 255, 0.3);
    }
}

.music-control.playing::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 1px solid rgba(0, 210, 255, 0.3);
    animation: rotateRing 4s linear infinite;
}

@keyframes rotateRing {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1200px) {

    .content {

        margin-left: 0;

        padding: 20px;

    }

    .guild-item {

        max-width: 800px;

    }

}

@media (max-width: 480px) {
    .image-wrapper {
        width: 220px;
        height: 220px;
    }

    .side-description {
        font-size: 15px;
        line-height: 1.5;
    }
}
@media (max-width: 1200px) {
    .content {
        margin-left: 0;
    }
}

@media (max-width: 850px) {
    body {
        background-attachment: scroll;
    }

    h1 {
        font-size: 28px;
    }

    .guild-item {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .image-wrapper {
        width: 220px;
        height: 220px;
    }

    .side-description {
        opacity: 1 !important;
        transform: none !important;
        font-size: 15px;
        background: rgba(0, 0, 0, 0.3);
        padding: 15px;
        border-radius: 10px;
    }

    .overlay-title {
        opacity: 1;
        background: rgba(0, 0, 0, 0.5);
        font-size: 20px;
        height: 40px;
        top: auto;
    }

    .music-control {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .background-fog {
        backdrop-filter: none;
    }
}

.back-btn {
    position: fixed;
    right: 15px;
    bottom: 15px;
    z-index: 1000;
}