/* Game Container */
.game-container {
    padding: 60px 0;
    min-height: calc(100vh - 340px);
}

.game-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 36px;
}

/* Difficulty Selector */
.difficulty-selector {
    text-align: center;
    margin-bottom: 30px;
}

.difficulty-selector h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.difficulty-options {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.difficulty-btn {
    background: #e0e0e0;
    color: #333;
    transition: all 0.3s ease;
}

.difficulty-btn:hover {
    background: #d0d0d0;
}

.difficulty-btn.active {
    background: #4CAF50;
    color: white;
}

.game-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.stats {
    display: flex;
    gap: 20px;
    font-size: 18px;
    font-weight: 500;
}

.stats span {
    color: #2c3e50;
}

.stats span span {
    color: #4CAF50;
    font-weight: bold;
}

.controls-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Sound control button */
.btn-icon {
    background: none;
    border: none;
    color: #2c3e50;
    font-size: 20px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.btn-icon:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Game Board */
.game-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.card {
    aspect-ratio: 1/1;
    background: #2c3e50;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 40px;
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
    transform-style: preserve-3d;
    position: relative;
}

.card.flipped {
    transform: rotateY(180deg);
    background: white;
    color: #2c3e50;
    border: 2px solid #2c3e50;
}

.card.matched {
    background: #4CAF50;
    color: white;
    transform: rotateY(180deg);
    cursor: default;
}

.card .front, .card .back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 6px;
}

.card .front {
    background: white;
    color: #2c3e50;
    transform: rotateY(180deg);
}

.card .back {
    background: #2c3e50;
}

/* Win Message */
.win-message {
    text-align: center;
    background: white;
    padding: 30px;
    border-radius: 10px;
    margin-top: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.win-message h3 {
    color: #4CAF50;
    margin-bottom: 15px;
    font-size: 28px;
}

.win-message p {
    font-size: 18px;
    margin-bottom: 20px;
}

.win-message p span {
    font-weight: bold;
    color: #2c3e50;
}

.hidden {
    display: none;
}

/* Responsive Game Board */
@media (max-width: 1200px) {
    .game-board {
        max-width: 700px;
    }
}

@media (max-width: 768px) {
    .game-board {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        max-width: 500px;
    }
    
    .card {
        font-size: 30px;
    }

    .difficulty-options {
        flex-direction: column;
        align-items: center;
    }

    .difficulty-btn {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .game-board {
        grid-template-columns: repeat(2, 1fr);
        max-width: 300px;
    }
    
    .game-controls {
        flex-direction: column;
        gap: 15px;
    }

    .stats {
        flex-wrap: wrap;
        justify-content: center;
    }
}