body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f8ff; /* AliceBlue */
    color: #333;
    margin: 0;
    text-align: center;
}

#game-container {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 600px;
}

h1 {
    color: #4682b4; /* SteelBlue */
    margin-bottom: 20px;
}

#start-screen, #game-over-screen {
    margin-top: 30px;
}

button {
    background-color: #5f9ea0; /* CadetBlue */
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 20px;
}

button:hover {
    background-color: #77aeb1;
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

#score-board {
    font-size: 1.2em;
    margin-bottom: 20px;
    color: #20b2aa; /* LightSeaGreen */
}

#memory-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.card {
    background-color: #add8e6; /* LightBlue */
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    cursor: pointer;
    aspect-ratio: 1 / 1; /* Make cards square */
    transition: background-color 0.3s ease, transform 0.2s ease;
    user-select: none; /* Prevent text selection */
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

.card.flipped {
    background-color: #ffffff;
    color: #4682b4; /* SteelBlue */
    cursor: default;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.card.matched {
    background-color: #90ee90; /* LightGreen */
    color: #228b22; /* ForestGreen */
    cursor: default;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 480px) {
    #game-container {
        padding: 20px;
        width: 95%;
    }
    h1 {
        font-size: 1.8em;
    }
    button {
        padding: 10px 20px;
        font-size: 1em;
    }
    #memory-board {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .card {
        font-size: 1.2em;
    }
    #score-board {
        font-size: 1em;
    }
}