body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f8ff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.game-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
    max-width: 800px;
    width: 100%;
    text-align: center;
}

h1 {
    color: #4682b4;
    margin-top: 0;
}

.game-info {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 20px 0;
    font-size: 18px;
    background-color: #e6f2ff;
    padding: 10px;
    border-radius: 5px;
}

.memory-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 0 auto;
    max-width: 600px;
}

.card {
    height: 100px;
    background-color: #4682b4;
    border-radius: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    perspective: 1000px;
    transform-style: preserve-3d;
}

.card.flipped {
    background-color: white;
    color: #4682b4;
    transform: rotateY(180deg);
}

.card.matched {
    background-color: #90ee90;
    cursor: default;
}

.win-message {
    background-color: rgba(255, 255, 255, 0.9);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
}

.win-message h2 {
    color: #4682b4;
    font-size: 2em;
}

.win-message p {
    font-size: 1.2em;
    margin: 10px 0;
}

button, .back-btn {
    background-color: #4682b4;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

button:hover, .back-btn:hover {
    background-color: #5f9ea0;
}

.hidden {
    display: none;
}

@media (max-width: 600px) {
    .memory-board {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .card {
        height: 80px;
        font-size: 20px;
    }
}

@media (max-width: 400px) {
    .memory-board {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .card {
        height: 60px;
        font-size: 16px;
    }
}
