body {
    background-image: url('../images/bg.png');
    background-size: cover;
    font-family: 'Inter', sans-serif;
    margin: 0;
}

@font-face {
    font-family: 'Poppins Local';
    src: url('../fonts/Poppins-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Poppins Local';
    src: url('../fonts/Poppins-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

#game-grid-container {
    padding: 8rem 2rem 2rem 2rem;
    position: relative;
    z-index: 1;
}

.card-container {
    perspective: 1000px;
    cursor: pointer;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);

    width: 100%;
    height: 0;
    padding-bottom: 120%;
    position: relative;
}

.card-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    border-radius: 0.75rem;
}

.card-container.flip .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    overflow: hidden;
}

.card-front {
    background-color: #fff;
    transform: rotateY(180deg);
    padding: 4px;
}

.card-back {
    background-color: #3f51b5;
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%) 0 0, linear-gradient(-45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%) 0 0, linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.15) 75%) 0 0, linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.15) 75%) 0 0;
    background-size: 15px 15px;
    border: 4px solid #1a237e;
    box-shadow: 0 0 0 8px #7986cb inset;
    color: white;
    font-size: 2rem;
    user-select: none;
}

#game-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

#header-bg {
    background-color: #fef6df;
    position: relative;
    overflow: visible;
    padding-bottom: 0 !important;
}
#header-bg::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -120px;
    height: 120px;
    background-image: url('../images/onda.svg');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: bottom;
    pointer-events: none;
    z-index: 10;
}

.instructions {
    font-family: 'Poppins Local';
    font-weight: 500;
    color: #3c4e10;
}
.instructions h2 {
    font-weight: 700;
}
.instructions p {
}

#game-over-modal {
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    /* border: 5px solid #3730a3; */
    border: 5px solid rgba(158, 182, 0, 1);
    background-color: #fef6df;
    color: rgba(81, 107, 18, 1);
}

#restart-button {
    background-color: rgba(81, 107, 18, 1);
}
#restart-button:hover {
    background-color: rgba(61, 82, 14, 1);
}

@media (min-width: 640px) {
    #game-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    #header-bg-son {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0;
    }
    #header-bg::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: -80px;
        height: 80px;
        background-image: url('../images/onda.svg');
        background-repeat: no-repeat;
        background-size: cover;
        background-position: bottom;
        pointer-events: none;
        z-index: 10;
    }
}

@media (min-width: 1820px) {
    #header-bg::after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: -120px;
        height: 120px;
        background-image: url('../images/onda.svg');
        background-repeat: no-repeat;
        background-size: cover;
        background-position: bottom;
        pointer-events: none;
        z-index: 10;
    }
    #game-grid-container {
        padding: 8rem 2rem 2rem 2rem;
        position: relative;
        z-index: 1;
    }
}
