body {
    font-family: Verdana, sans-serif;
    background-color: #f4f4f9;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

header {
    width: 100%;
    background: linear-gradient(0deg, rgba(244,242,237,1) 0%, rgba(210,201,171,1) 15%, rgba(209,200,169,1) 36%, rgba(172,158,110,1) 100%);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

header a img {
    height: 100px;
    cursor: pointer;
}

header nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}

header nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 18px;
}

header nav ul li a:hover {
    text-decoration: underline;
}


#theme-selection {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

button {
    background-color: #AC9E6E;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 8px;
    transition: 0.3s ease-in-out;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

button:hover {
    background-color: #8c7b52;
    transform: scale(1.05);
}

#restart-btn, #back-btn {
    display: none;
    margin-top: 20px;
}

#game-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    max-width: 800px;
    margin: 40px auto;
    background: #ffffff;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

#memory-board, #matched-items {
    display: none;
}

#memory-board {
    flex: 3;
    display: grid;
    grid-template-columns: repeat(4, 100px);
    gap: 10px;
    justify-content: center;
    align-items: center;
}

#matched-items {
    flex: 1;
    margin-left: 40px;
    padding-left: 20px;
    border-left: 3px solid black;
}

.card {
    width: 100px;
    height: 100px;
    background-color: #AC9E6E;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

.card:hover {
    background-color: #8c7b52;
    transform: scale(1.05);
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.hidden {
    display: none;
}

.matched {
    opacity: 0.6;
    pointer-events: none;
    filter: grayscale(70%);
    background-color: #d4c69d;
}

#matched-list {
    list-style: none;
    padding: 0;
}

#matched-list li {
    font-size: 16px;
    margin: 5px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#matched-list button {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #AC9E6E;
    transition: color 0.3s ease-in-out;
}

#matched-list button:hover {
    color: #8c7b52;
}

.play-sound-btn {
    background-color: #AC9E6E;
    color: white;
    border: none;
    padding: 8px 12px;  
    font-size: 16px;     
    cursor: pointer;
    border-radius: 8px;
    transition: 0.3s ease-in-out;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-sound-btn:hover {
    background-color: #8c7b52;
    transform: scale(1.05);
}

.play-sound-btn i {
    margin-right: 5px;   
    font-size: 18px;     
}


@media only screen and (max-width: 768px) {
    #game-container {
        width: 90%;
        padding: 30px;
        flex-direction: column;
        align-items: center;
    }
    
    #memory-board {
        grid-template-columns: repeat(3, 90px);
        gap: 8px;
    }
    
    .card {
        width: 90px;
        height: 90px;
    }

    #matched-items {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        margin-top: 20px;
        text-align: center;
    }
}
