/* =========================================
   单词拼写测试 (简化版)
   ========================================= */

.crossword-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: transparent;
    position: relative;
    z-index: 5;
}

.crossword-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 10px 20px;
}

/* ---- 进度 ---- */
.crossword-progress {
    font-size: 14px;
    color: #999;
    margin-bottom: 16px;
}

/* 设置菜单：错词数量角标 */
.crossword-wrong-badge {
    font-size: 12px;
    color: #fff;
    background: #ee0a24;
    border-radius: 10px;
    padding: 1px 7px;
    min-width: 18px;
    text-align: center;
}

/* ---- 单词卡片 ---- */
.crossword-card {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}

.crossword-chinese {
    font-size: 28px;
    font-weight: 700;
    color: #323233;
    margin-bottom: 20px;
}

/* ---- 发音按钮 ---- */
.crossword-speaker {
    font-size: 22px;
    line-height: 1;
    margin: 0 auto 20px;
    cursor: pointer;
    user-select: none;
    transition: transform 0.15s ease;
}

.crossword-speaker:active {
    transform: scale(0.85);
}

/* ---- 字母槽位 ---- */
.crossword-letters {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.crossword-letter-slot {
    width: 36px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 3px solid #dcdcdc;
    font-size: 22px;
    font-weight: 700;
    color: #323233;
    text-transform: lowercase;
    transition: all 0.15s ease;
}

.crossword-letter-given {
    border-bottom-color: #1989fa;
    background: rgba(25, 137, 250, 0.08);
    border-radius: 6px 6px 0 0;
}

.crossword-letter-filled {
    border-bottom-color: #1989fa;
}

/* 展示答案高亮 */
.crossword-letter-answer {
    border-bottom-color: #1989fa;
    color: #1989fa;
    background: rgba(25, 137, 250, 0.1);
}

.crossword-letter-correct {
    border-bottom-color: #07c160;
    color: #07c160;
}

.crossword-letter-wrong {
    border-bottom-color: #ee0a24;
    color: #ee0a24;
    animation: crossword-shake 0.3s;
}

/* ---- 反馈文字（固定高度，防抖动） ---- */
.crossword-feedback {
    height: 40px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
}

.crossword-feedback-correct {
    color: #07c160;
}

.crossword-feedback-wrong {
    color: #ee0a24;
}

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

/* ---- 键盘 ---- */
.crossword-keyboard {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.crossword-keyboard-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3px;
}

.crossword-key {
    width: 32px;
    height: 38px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-weight: 600;
    color: #323233;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    transition: all 0.1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crossword-key:active {
    background: #e8f4ff;
    transform: scale(0.92);
    box-shadow: 0 0 0 2px rgba(25, 137, 250, 0.3);
}

.crossword-key:disabled {
    opacity: 0.4;
    cursor: default;
}

.crossword-key-delete {
    width: 48px;
    font-size: 16px;
    background: rgba(255, 240, 240, 0.85);
    color: #ee0a24;
}

.crossword-key-delete:active {
    background: #ffe0e0;
}

/* ---- 我不会按钮（低调小字链接样式） ---- */
.crossword-answer-btn {
    margin: 14px auto 0;
    padding: 4px 16px;
    border-radius: 4px;
    font-size: 15px;
    text-decoration: underline;
    color: #999;
    background: none;
    border: none;
    cursor: pointer;
    user-select: none;
    transition: color 0.15s ease;
}

.crossword-answer-btn:active {
    color: #666;
}

/* 手机端适配 */
@media (max-width: 480px) {
    .crossword-letter-slot {
        width: 32px;
        height: 40px;
        font-size: 20px;
    }
    .crossword-key {
        width: 28px;
        height: 34px;
        font-size: 11px;
    }
    .crossword-key-delete {
        width: 42px;
    }
}
