body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    position: relative;
    overflow-x: hidden;
}

body::before {
    background: url("img/bg.webp") center center/cover no-repeat;
    content: "";
    height: 100%;
    width: 100%;
    position: fixed;
    filter: blur(10px);
    transform: scale(1.05);
    z-index: -1;
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: -1;
}

header {
    text-align: center;
    font-size: 2rem;
}

h2 {
    text-align: center;
    font-size: 2rem;
}

.game {
    border: 2px solid black;
    border-radius: 10px;
    padding: 1rem;
    margin: 1.5rem 3rem;
    text-align: center;
}

h3 {
    font-size: 1.5rem;
}

.characters {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.character {
    border: 2px solid black;
    border-radius: 10px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    max-width: 200px;
}

.character img {
    width: 80%;
    height: auto;
    aspect-ratio: 1 / 2;
    object-fit: cover;
}

.character:hover {
    background-color: #d5d5d5;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.overlay.hidden {
    display: none;
}

.detail-card {
    background: white;
    width: 50%;
    max-width: 600px;
    aspect-ratio: 1 / 1;
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    border-radius: 12px;
}

.detail-card img {
    height: 100%;
    max-width: 45%;
    object-fit: contain;
}

.detail-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

footer {
    text-align: center;
    align-items: center;
    font-size: 2rem;
    padding-bottom: 1.5rem;
}

footer a {
    color: black;
    border-radius: 10px;
    border: 2px solid black;
    padding: 1rem;
}
footer a:hover {
    color: #707070;
}

#menu-toggle {
    display: none;
}

.menu-button {
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: 3rem;
    height: 3rem;
    background: #e6e6e6;
    border: 2px solid black;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    z-index: 2000;
}

.menu-button span {
    width: 1.4rem;
    height: 2px;
    background: black;
    transition: 0.3s;
    transform-origin: center;
}

.side-menu {
    position: fixed;
    top: 4rem;
    right: 1rem;
    background: #ececec;
    border: 2px solid black;
    border-radius: 10px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;

    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: 0.25s ease;
}

.side-menu a {
    text-decoration: none;
    color: black;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
}

.side-menu a:hover {
    background: #cdcdcd;
}

#menu-toggle:checked ~ .side-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#menu-toggle:checked + .menu-button span:nth-child(1) {
    transform: translateY(0.45rem) rotate(45deg);
}

#menu-toggle:checked + .menu-button span:nth-child(2) {
    opacity: 0;
}

#menu-toggle:checked + .menu-button span:nth-child(3) {
    transform: translateY(-0.45rem) rotate(-45deg);
}

@media (max-width: 768px) {

    .game {
        margin: 1rem;
    }

    .characters {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-card {
        width: min(92vw, 420px);
        max-height: 85vh;
        display: grid;
        grid-template-columns: 120px 1fr;
        gap: 1rem;
        padding: 1rem;
        overflow-y: auto;
        align-items: center;
    }

    .detail-card img {
        width: 100%;
        height: auto;
        object-fit: contain;
        max-width: 90%;
    }

    .detail-info {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .detail-info h3 {
        font-size: 1.2rem;
        margin-top: 0;
    }

    header {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}