body {
    background-color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.game-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.word-tile {
    background-color: #f0f0e8;
    border: none;
    border-radius: 8px;
    padding: 15px 10px;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.word-tile.selected {
    background-color: #666666;
    color: white;
}

.matched-groups {
    margin-bottom: 20px;
}

.matched-group {
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    color: white;
    font-weight: 600;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.matched-group.show {
    opacity: 1;
    transform: translateY(0);
}

.word-tile.fade-out {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.matched-group .group-name {
    font-size: 0.8em;
    opacity: 0.8;
}

.mistakes-counter {
    text-align: center;
    margin-bottom: 20px;
}

.mistake-dots {
    display: inline-flex;
    gap: 5px;
    margin-left: 5px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ccc;
}

.dot.active {
    background-color: #666;
}

.controls {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn {
    padding: 8px 16px;
    border-radius: 20px;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s;
}
