/* Word Scramble Game */

.difficulty-selector {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.diff-btn {
    padding: 0.5rem 1.25rem;
    border: 2px solid var(--card-border);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.diff-btn:hover {
    border-color: var(--accent);
}

.diff-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.scramble-stats {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-pill {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
}

.stat-pill strong {
    color: var(--accent);
}

.category-hint {
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.scramble-tiles {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2rem;
    min-height: 70px;
}

.letter-tile {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    user-select: none;
}

.letter-tile:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.letter-tile.used {
    opacity: 0.25;
    pointer-events: none;
    transform: scale(0.9);
}

.answer-area {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.answer-tiles {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 56px;
    margin-bottom: 1rem;
}

.answer-slot {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    border: 2px dashed var(--card-border);
    border-radius: 10px;
    text-transform: uppercase;
    transition: all 0.2s;
    cursor: pointer;
}

.answer-slot.filled {
    border-style: solid;
    border-color: var(--accent);
    background: var(--bg-secondary);
}

.answer-slot.correct {
    border-color: #4caf50;
    background: rgba(76, 175, 80, 0.15);
}

.answer-slot.wrong {
    border-color: #f44336;
    background: rgba(244, 67, 54, 0.1);
    animation: shake 0.4s;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-6px);
    }

    75% {
        transform: translateX(6px);
    }
}

.scramble-actions {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.feedback {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    min-height: 2rem;
    margin-top: 1rem;
}

.feedback.correct {
    color: #4caf50;
}

.feedback.wrong {
    color: #f44336;
}

@media (max-width: 480px) {

    .letter-tile,
    .answer-slot {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    .scramble-stats {
        flex-wrap: wrap;
    }
}