.game-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 20px 0;
}

.game-description {
    margin-bottom: 20px;
    color: var(--text-light);
}

.score-board {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.game-area {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 30px;
    aspect-ratio: 1;
    background: #bbada0;
    border-radius: 8px;
    padding: 10px;
    box-shadow: var(--shadow-md);
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
    height: 100%;
}

.tile {
    background: #eee4da;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    font-weight: 700;
    color: #776e65;
    cursor: pointer;
    user-select: none;
    transition: transform 0.1s ease-in-out, background-color 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.tile:hover {
    background: #ede0c8;
    transform: scale(0.98);
}

.tile.empty {
    background: transparent;
    cursor: default;
    box-shadow: none;
}

.tile.correct {
    background: #f2b179;
    color: #f9f6f2;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(238, 228, 218, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    z-index: 10;
    transition: opacity 0.3s;
}

.overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.overlay h2 {
    font-size: 2.5rem;
    color: #776e65;
    margin-bottom: 10px;
}

.overlay p {
    font-size: 1.2rem;
    color: #776e65;
    margin-bottom: 30px;
}

.primary-btn {
    background: #8f7a66;
    color: #f9f6f2;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.primary-btn:hover {
    background: #7f6a56;
}

.secondary-btn {
    background: #bbada0;
    color: #f9f6f2;
    border: none;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.secondary-btn:hover {
    background: #a69588;
}

.instructions {
    margin-top: 40px;
    text-align: left;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.instructions h3 {
    margin-bottom: 10px;
    color: var(--secondary-color);
}

@media (max-width: 480px) {
    .tile {
        font-size: 1.5rem;
    }

    .game-area {
        padding: 5px;
    }

    .grid-container {
        gap: 5px;
    }
}