/* Letter scramble game specific styles */

.game-container {
    width: 100%;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.letter-slots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1px;
    max-width: 600px;
}

.letter-slot {
    width: 46px;
    height: 46px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    color: #1b1d21;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.letter-slot.filled {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    color: #1b1d21;
}

.letter-slot.correct {
    background: #27ae60;
    border-color: #27ae60;
    color: #fff;
}

.letter-slot.wrong {
    background: #e74c3c;
    border-color: #e74c3c;
    color: #fff;
    animation: slot-shake 0.4s ease;
}

@keyframes slot-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.letter-tiles {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1px;
    max-width: 600px;
}

.letter-tile {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    color: #1b1d21;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.letter-tile:hover:not(.used) {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.letter-tile:active:not(.used) {
    transform: translateY(-1px);
}

.letter-tile.used {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

.game-controls {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.undo-button {
    padding: 10px 24px;
    border-radius: 999px;
    border: none;
    background-color: #0e3f70;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(15, 76, 129, 0.2);
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.undo-button:hover:not(:disabled) {
    background-color: #155287;
}

.undo-button:disabled {
    background-color: #b7c6d6;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.game-controls .next-button {
    /* Override global next-button margin so it aligns with the undo button */
    margin: 0 0 0 12px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .letter-slot {
        width: 25px;
        height: 25px;
        font-size: 24px;
    }

    .letter-tile {
        width: 50px;
        height: 50px;
        font-size: 28px;
    }

    .game-container {
        gap: 30px;
    }
}
