/* ============================================================
   style.css - 翼单词完整样式（整理版）
   说明：PC端样式为主，手机端专属样式集中在末尾
   ============================================================ */

/* ============================================================
   1. 基础重置 & 全局
   ============================================================ */
* {
    box-sizing: border-box;
}
body {
    background: #f8fafc;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 2rem;
}

/* ============================================================
   2. 通用组件
   ============================================================ */

/* ---- 2.1 单词彩色音节 ---- */
.syl-0 {
    color: #F53F3F !important;
}
.syl-1 {
    color: #165DFF !important;
}
.syl-2 {
    color: #722ED1 !important;
}
.syl-3 {
    color: #00B42A !important;
}
.syl-4 {
    color: #FF7D00 !important;
}
.syl-5 {
    color: #F5319D !important;
}

/* ---- 2.2 状态徽章 ---- */
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 6px;
    font-weight: 400;
    border: 1.5px solid currentColor;
    flex-shrink: 0;
}
.status-unlearned {
    color: #9ca3af;
}
.status-learning {
    color: #3b82f6;
}
.status-learned {
    color: #6366f1;
}
.status-basic {
    color: #22c55e;
}
.status-fully {
    color: #f59e0b;
}

/* ---- 2.3 标签栏（PC端） ---- */
.tab-btn {
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}
.tab-btn:hover {
    color: #1f2937;
    background: #f3f4f6;
}
.tab-btn.active {
    background: #165DFF !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(22, 93, 255, 0.3);
}

/* ---- 2.4 全屏列表（PC端"列表"触发） ---- */
.fullscreen-trigger {
    display: inline-block;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
    user-select: none;
}
.fullscreen-trigger:hover {
    background: rgba(59, 130, 246, 0.08);
}
.fullscreen-trigger:active {
    background: rgba(59, 130, 246, 0.15);
}

.fullscreen-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 9999 !important;
    background: #ffffff !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding: 12px 16px 20px !important;
    box-sizing: border-box !important;
}
.fullscreen-container .max-h-96 {
    max-height: none !important;
    height: 100% !important;
    flex: 1 !important;
    overflow-y: auto !important;
}
.fullscreen-container .flex.justify-between.items-center.mb-2,
.fullscreen-container .flex.justify-between.items-center.mb-3 {
    flex-shrink: 0 !important;
}
.fullscreen-container .word-row,
.fullscreen-container .review-list-item,
.fullscreen-container .spell-list-item {
    padding: 10px 4px !important;
    border-bottom: 1px solid #f1f5f9 !important;
}
.fullscreen-container .word-header {
    flex-shrink: 0 !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid #f1f5f9 !important;
}
.fullscreen-container .word-list {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin-top: 8px !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: 100% !important;
}

.fullscreen-back-btn {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.fullscreen-back-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}
.fullscreen-back-btn:active {
    transform: scale(0.92);
}

@media (max-width: 640px) {
    .fullscreen-container .word-row .font-bold,
    .fullscreen-container .review-list-item .font-bold,
    .fullscreen-container .spell-list-item .font-bold {
        font-size: 1.05rem !important;
    }
    .fullscreen-container .text-gray-600.text-sm {
        font-size: 0.95rem !important;
    }
    .fullscreen-back-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        top: 12px;
        left: 12px;
    }
}

/* ---- 2.5 Toast 消息 ---- */
.review-toast,
.learn-toast,
.spell-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 40px;
    padding: 12px 28px;
    font-weight: 700;
    font-size: 1.2rem;
    z-index: 1000000;
    border: 1px solid #e5e7eb;
    max-width: 90%;
    text-align: center;
}
.review-toast.text-green-600 {
    color: #16a34a;
    border-color: #86efac;
}
.review-toast.text-red-500 {
    color: #dc2626;
    border-color: #fca5a5;
}
.review-toast.text-gray-600 {
    color: #4b5563;
    border-color: #d1d5db;
}

/* ---- 2.6 发音按钮 ---- */
.play-btn {
    background-image: linear-gradient(to bottom right, #f59e0b, #ea580c) !important;
    background-color: transparent !important;
    color: white !important;
    border: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.play-btn:hover {
    transform: scale(1.05);
}
.play-btn:active {
    transform: scale(0.95);
}

/* ---- 2.7 音节块 ---- */
.syllable-block {
    display: inline-block;
    padding: 2px 6px;
    margin: 0 2px;
    background: transparent;
    border-bottom: 2px solid #d1d5db;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.syllable-block:hover {
    border-bottom-color: #3b82f6;
}
.syllable-block.active {
    border-bottom-color: #3b82f6;
    color: #1e40af;
}

.syllable-block-learn {
    cursor: pointer;
    display: inline-block;
    padding: 2px 8px;
    margin: 0 2px;
    background: transparent;
    border-bottom: 2px solid #d1d5db;
    font-size: 0.9rem;
    transition: all 0.2s;
}
.syllable-block-learn:hover {
    border-bottom-color: #3b82f6;
}
.syllable-block-learn.active {
    border-bottom-color: #3b82f6;
    color: #1e40af;
}

.syllable-block-wordlist,
.syllable-block-verblist {
    cursor: pointer;
    display: inline-block;
    padding: 2px 8px;
    margin: 0 2px;
    background: #e5e7eb;
    border-radius: 12px;
    font-size: 0.8rem;
    transition: background 0.2s;
}
.syllable-block-wordlist:hover,
.syllable-block-verblist:hover {
    background: #d1d5db;
}
.word-segment.highlight {
    background-color: #fce4ec;
    border-radius: 4px;
    padding: 0 2px;
}

/* ============================================================
   3. PC端学习/复习/闯关卡片（全屏模态框）
   ============================================================ */
#learn-fullscreen-modal,
#review-fullscreen-modal,
#spell-fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#learn-card-content {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border-radius: 48px;
    padding: 32px 24px;
    width: 100%;
    max-width: 900px;
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.15);
    position: relative;
}

/* ============================================================
   4. PC端磨耳朵
   ============================================================ */
#ear-fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #f5f3ff 0%, #fdf2f8 100%);
}
.ear-card-content {
    text-align: center;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}
.word-scroll-wrapper {
    max-width: 100%;
    overflow-x: auto;
    white-space: normal;
    word-break: break-word;
    text-align: center;
}
.word-scroll-inner {
    display: inline-block;
    font-size: clamp(2rem, 10vw, 4rem);
    line-height: 1.2;
}
.phonetic-display {
    max-width: 100%;
    word-break: break-word;
    white-space: normal;
}
.meaning-display {
    max-width: 100%;
    word-break: break-word;
    white-space: normal;
}

/* ============================================================
   5. 单词蒙版
   ============================================================ */
.word-mask {
    position: fixed;
    background-color: #1f1f1f;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: opacity 0.2s ease;
}
.word-mask.hide-mask {
    opacity: 0;
    visibility: hidden;
}
.word-mask-btn {
    background: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s;
}
.word-mask-btn:active {
    transform: scale(0.95);
}
@media (max-width: 640px) {
    .word-mask-btn {
        width: 48px;
        height: 48px;
        font-size: 1.6rem;
    }
}

/* ============================================================
   6. 磨耳朵控制条
   ============================================================ */
#ear-control-bar {
    position: fixed;
    bottom: 20px;
    left: 16px;
    right: 16px;
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border-radius: 24px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 50;
}
#ear-control-bar .ear-now-word {
    font-size: 0.9rem;
    font-weight: 500;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#ear-control-bar .ear-progress {
    font-size: 0.75rem;
    color: #9ca3af;
}
#ear-control-bar button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
#ear-control-bar button:hover {
    background: #f3f4f6;
}
#ear-control-bar .ear-btn-stop {
    background: #fee2e2;
    color: #dc2626;
}
#ear-control-bar .ear-btn-stop:hover {
    background: #fecaca;
}

/* ============================================================
   7. 错题明细（字母对齐）
   ============================================================ */
.mistake-letter {
    display: inline-block;
    width: 2rem;
    text-align: center;
    font-family: 'Courier New', 'SF Mono', monospace;
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0 1px;
}
.mistake-letter.correct {
    background-color: transparent;
    color: #1e293b;
}
.mistake-letter.wrong {
    background-color: #ef4444;
    color: white;
    border-radius: 0.25rem;
}
.mistake-letter.missing {
    background-color: #ef4444;
    color: white;
    border-radius: 0.25rem;
}
.mistake-word-container {
    white-space: nowrap;
    overflow-x: auto;
    display: inline-block;
    max-width: 100%;
    vertical-align: middle;
}
@media (max-width: 640px) {
    .mistake-letter {
        width: 1.6rem;
        font-size: 0.9rem;
    }
}

/* ============================================================
   8. 管理员后台（PC端）
   ============================================================ */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 80px);
    background: #f1f5f9;
}
.admin-sidebar {
    width: 220px;
    background: #1e293b;
    color: #e2e8f0;
    flex-shrink: 0;
    padding: 20px 0;
    overflow-y: auto;
    border-radius: 12px 0 0 12px;
}
.admin-sidebar .menu-title {
    padding: 0 20px 16px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    border-bottom: 1px solid #334155;
}
.admin-sidebar .menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    color: #cbd5e1;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
}
.admin-sidebar .menu-item:hover {
    background: #334155;
    color: #ffffff;
}
.admin-sidebar .menu-item.active {
    background: #334155;
    color: #ffffff;
    border-left-color: #3b82f6;
}
.admin-sidebar .menu-item i {
    width: 20px;
    text-align: center;
}

.admin-content {
    flex: 1;
    padding: 24px 28px;
    background: #ffffff;
    border-radius: 0 12px 12px 0;
    overflow-y: auto;
    min-height: 500px;
}
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}
.admin-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}
.admin-header .admin-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    color: #64748b;
}
.admin-header .admin-user .logout-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 4px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.8rem;
}
.admin-header .admin-user .logout-btn:hover {
    background: #dc2626;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px 18px;
    border: 1px solid #e2e8f0;
}
.stat-card .label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.stat-card .value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
    margin-top: 2px;
}

.admin-table-wrap {
    overflow-x: auto;
    margin-top: 16px;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.admin-table th {
    background: #f1f5f9;
    text-align: left;
    padding: 10px 12px;
    font-weight: 600;
    color: #334155;
    border-bottom: 2px solid #e2e8f0;
}
.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-admin {
    background: #dbeafe;
    color: #1d4ed8;
}
.badge-parent {
    background: #d1fae5;
    color: #065f46;
}
.badge-student {
    background: #fef3c7;
    color: #92400e;
}
.badge-active {
    background: #dcfce7;
    color: #166534;
}
.badge-inactive {
    background: #fee2e2;
    color: #991b1b;
}
.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

/* ---- 8.1 词库管理（管理员后台） ---- */
.level-node {
    margin-top: 12px;
}
.level-header {
    cursor: pointer;
    font-weight: 700;
    background: #f1f5f9;
    padding: 8px 12px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.level-header:hover {
    background: #e5e9f0;
}
.stage-node {
    margin-top: 8px;
}
.stage-header {
    cursor: pointer;
    font-weight: 600;
    color: #1e293b;
    padding: 4px 8px;
    border-radius: 6px;
    background: #f8fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: 20px;
}
.stage-header:hover {
    background: #f1f5f9;
}
.topic-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #e9edf2;
    margin-left: 40px;
}
.topic-item:hover {
    background: #fafafa;
}

/* ============================================================
   9. 魔王城游戏（PC端）
   ============================================================ */
.battle-game-container {
    font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
}
.battle-video-wrap {
    position: relative;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.5);
}
.battle-start-overlay,
.battle-overlay {
    background: rgba(10, 10, 25, 0.88);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 40px 20px;
}
.level-badge {
    background: linear-gradient(135deg, #f5af19, #f12711);
    padding: 10px 28px;
    border-radius: 60px;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 2px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    color: white;
}
.battle-start-btn {
    background: linear-gradient(135deg, #3b82f6, #1e3a8a);
    border: none;
    font-size: 1.4rem;
    font-weight: 700;
    padding: 14px 42px;
    border-radius: 60px;
    color: white;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
.battle-start-btn:hover {
    transform: scale(1.02);
    background: linear-gradient(135deg, #2563eb, #1e40af);
}
.battle-start-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.battle-card {
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    border-radius: 32px;
    padding: 12px 20px;
    min-width: 140px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: 0.2s;
    color: white;
    font-weight: 600;
}
.battle-card:hover {
    transform: translateY(-4px);
    background: rgba(0, 0, 0, 0.6);
}

.hp-bar-outer {
    background: rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    height: 12px;
    margin: 6px 0;
    overflow: hidden;
}
.hp-bar-inner {
    background: linear-gradient(90deg, #ff6a6a, #ff3a3a);
    width: 100%;
    height: 100%;
    border-radius: 20px;
    transition: width 0.2s ease;
}
.hp-bar-inner.danger {
    background: linear-gradient(90deg, #ffb347, #ff6b6b);
}

.timer-card {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    border-radius: 60px;
    padding: 8px 24px;
    font-weight: 700;
    font-size: 1.4rem;
    color: #ffd966;
    letter-spacing: 2px;
}
.timer-card.warning {
    color: #ff5555;
    animation: pulse 1s infinite;
}
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 1;
    }
}

.battle-word-zh {
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 800;
    background: linear-gradient(135deg, #fff8e7, #ffd966);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    padding: 16px 24px;
    display: inline-block;
    backdrop-filter: blur(4px);
    border-radius: 60px;
}
.battle-btn {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 60px;
    padding: 10px 22px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: 0.2s;
}
.battle-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.02);
}
.btn-attack {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    border: none;
    padding: 12px 28px;
    font-size: 1.1rem;
}
.btn-attack:hover {
    background: linear-gradient(135deg, #dc2626, #991b1b);
    transform: scale(1.05);
}
.btn-exit {
    background: rgba(0, 0, 0, 0.5);
}
.battle-input {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 60px;
    padding: 10px 20px;
    font-size: 1rem;
    width: 240px;
    color: white;
    outline: none;
    text-align: center;
}
.battle-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}
.battle-input:focus {
    border-color: #fbbf24;
    background: rgba(255, 255, 255, 0.25);
}

/* ============================================================
   10. PC端学习模块 - 分组/列表边框
   ============================================================ */
.learn-group-panel {
    border-color: #fb8f3d8b !important;
    box-shadow: 0 0 8px rgba(251, 146, 60, 0.25) !important;
}
.learn-list-panel {
    border-color: #fb8f3d8b !important;
    box-shadow: 0 0 8px rgba(251, 146, 60, 0.25) !important;
}

/* ============================================================
   11. 闯关模块 - 单词列表样式
   ============================================================ */
.spell-word-panel .word-row {
    padding: 12px 8px !important;
    margin-bottom: 4px;
}
.spell-word-panel .word-header .actions button {
    background: #f1f5f9;
    border: none;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    color: #1e293b;
    cursor: pointer;
    transition: 0.2s;
}
.spell-word-panel .word-header .actions button:hover {
    background: #e2e8f0;
}
.spell-word-panel .word-header .actions .filter-btn {
    background: #eef2ff;
    color: #4f6ef7;
}
.spell-word-panel .word-header .actions .filter-btn .dot {
    background: #4f6ef7;
    color: white;
    border-radius: 50%;
    padding: 0 6px;
    margin-left: 4px;
}

/* ============================================================
   12. PC端响应式
   ============================================================ */
@media (max-width: 768px) {
    .admin-layout {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        border-radius: 12px 12px 0 0;
        padding: 12px 0;
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        justify-content: center;
    }
    .admin-sidebar .menu-title {
        display: none;
    }
    .admin-sidebar .menu-item {
        padding: 8px 14px;
        font-size: 0.85rem;
        border-left: none;
        border-bottom: 2px solid transparent;
    }
    .admin-sidebar .menu-item.active {
        border-bottom-color: #3b82f6;
        border-left-color: transparent;
    }
    .admin-content {
        border-radius: 0 0 12px 12px;
        padding: 16px;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .battle-card {
        min-width: 100px;
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    .battle-word-zh {
        font-size: 2rem;
        padding: 8px 16px;
    }
    .battle-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    .battle-input {
        width: 180px;
        font-size: 0.9rem;
        padding: 8px 16px;
    }
    .timer-card {
        font-size: 1.2rem;
        padding: 6px 16px;
    }
    .hp-bar-outer {
        height: 8px;
    }
}

@media (max-width: 480px) {
    .battle-card {
        min-width: 80px;
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    .battle-word-zh {
        font-size: 1.5rem;
    }
    .battle-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    .battle-input {
        width: 140px;
        font-size: 0.8rem;
    }
}

@media (min-width: 1920px) {
    .stat-card .value {
        font-size: 2.5rem;
    }
    .battle-card {
        font-size: 1.2rem;
        padding: 20px 30px;
        min-width: 220px;
    }
    .battle-word-zh {
        font-size: 4rem;
    }
    .battle-btn {
        padding: 16px 36px;
        font-size: 1.2rem;
    }
    .battle-input {
        width: 320px;
        font-size: 1.2rem;
        padding: 14px 28px;
    }
    .timer-card {
        font-size: 2rem;
        padding: 12px 32px;
    }
}

/* ============================================================
   ============================================================
   以下为手机端专属样式
   建议：迁移到 css/mobile/framework.css
   ============================================================
   ============================================================ */

/* ---- 手机版登录页 ---- */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 20px;
}
.login-container {
    background: white;
    border-radius: 32px;
    padding: 40px 28px 36px;
    width: 100%;
    max-width: 360px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    text-align: center;
}
.login-logo {
    font-size: 32px;
    font-weight: 800;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 6px;
}
.login-logo i {
    color: #4f6ef7;
    font-size: 36px;
}
.login-subtitle {
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 28px;
}
.login-input-group {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f1f5f9;
    border-radius: 14px;
    padding: 4px 16px;
    margin-bottom: 14px;
    transition: background 0.2s;
}
.login-input-group:focus-within {
    background: #eef2ff;
}
.login-input-group i {
    color: #94a3b8;
    font-size: 16px;
}
.login-input-group input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 14px 0;
    font-size: 16px;
    outline: none;
    color: #1a1a2e;
}
.login-input-group input::placeholder {
    color: #b0b8c8;
}
.login-submit-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #4f6ef7, #7c5cfc);
    color: white;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.15s;
    margin-top: 8px;
}
.login-submit-btn:active {
    transform: scale(0.96);
}
.login-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.login-error {
    color: #ef4444;
    font-size: 13px;
    margin-top: 12px;
    min-height: 20px;
}
.login-error.hidden {
    display: none;
}

@media (prefers-color-scheme: dark) {
    .login-container {
        background: #1a1a2e;
    }
    .login-logo {
        color: #e8e8f0;
    }
    .login-subtitle {
        color: #64748b;
    }
    .login-input-group {
        background: #2a2a3e;
    }
    .login-input-group:focus-within {
        background: #2a2a4e;
    }
    .login-input-group input {
        color: #e8e8f0;
    }
    .login-input-group input::placeholder {
        color: #6b7280;
    }
}

/* ---- 手机版错题库 ---- */
.mistake-page {
    padding: 0 16px 20px;
}
.mistake-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0 14px;
}
.mistake-back-btn {
    background: none;
    border: none;
    color: #4f6ef7;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
}
.mistake-back-btn:active {
    opacity: 0.6;
}
.mistake-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    flex: 1;
}
.mistake-title i {
    margin-right: 8px;
}
.mistake-count-badge {
    font-size: 11px;
    background: #fee2e2;
    color: #dc2626;
    padding: 4px 14px;
    border-radius: 20px;
    font-weight: 600;
    flex-shrink: 0;
}
.mistake-filter-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 12px;
    margin-bottom: 4px;
}
.mistake-filter-scroll::-webkit-scrollbar {
    display: none;
}
.mistake-filter-btn {
    flex-shrink: 0;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    background: white;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: 0.2s;
    white-space: nowrap;
}
.mistake-filter-btn:active {
    transform: scale(0.94);
}
.mistake-filter-btn.active {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}
.mistake-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}
.mistake-stat-card {
    background: white;
    border-radius: 14px;
    padding: 12px 4px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.02);
}
.mistake-stat-card .num {
    font-size: 22px;
    font-weight: 700;
}
.mistake-stat-card .num.red {
    color: #ef4444;
}
.mistake-stat-card .num.orange {
    color: #f97316;
}
.mistake-stat-card .num.blue {
    color: #4f6ef7;
}
.mistake-stat-card .label {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 2px;
}
.mistake-main-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}
.mistake-main-btn {
    padding: 12px 16px;
    border-radius: 14px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    user-select: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.mistake-main-btn:active {
    transform: scale(0.96);
}
.mistake-main-btn.learn {
    background: #ef4444;
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}
.mistake-main-btn.learn:active {
    background: #dc2626;
}
.mistake-main-btn.spell {
    background: #22c55e;
    color: white;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}
.mistake-main-btn.spell:active {
    background: #16a34a;
}
.mistake-main-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}
.mistake-list-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.mistake-action-btn {
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    background: white;
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: 0.15s;
    display: flex;
    align-items: center;
    gap: 4px;
    user-select: none;
}
.mistake-action-btn:active {
    transform: scale(0.94);
    background: #f1f5f9;
}
.mistake-list-container {
    margin-bottom: 16px;
}
.mistake-item {
    background: white;
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.15s, background 0.15s;
}
.mistake-item:active {
    transform: scale(0.98);
    background: #f8fafc;
}
.mistake-item .checkbox {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    border: 2px solid #cbd5e1;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: transparent;
    transition: all 0.2s;
    margin-top: 4px;
}
.mistake-item .checkbox.checked {
    background: #4f6ef7;
    border-color: #4f6ef7;
    color: white;
}
.mistake-item .word-info {
    flex: 1;
    min-width: 0;
}
.mistake-item .word-info .word {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    letter-spacing: -0.3px;
    margin-bottom: 4px;
    line-height: 1.3;
}
.mistake-item .word-info .word .syl-0 {
    color: #F53F3F;
}
.mistake-item .word-info .word .syl-1 {
    color: #165DFF;
}
.mistake-item .word-info .word .syl-2 {
    color: #722ED1;
}
.mistake-item .word-info .word .syl-3 {
    color: #00B42A;
}
.mistake-item .word-info .word .syl-4 {
    color: #FF7D00;
}
.mistake-item .word-info .word .syl-5 {
    color: #F5319D;
}
.mistake-item .word-info .meaning {
    font-size: 14px;
    color: #64748b;
    line-height: 1.4;
}
.mistake-item .word-info .wrong-answer {
    font-size: 12px;
    color: #ef4444;
    margin-top: 6px;
}
.mistake-item .word-info .wrong-answer .user-ans {
    background: #fee2e2;
    padding: 0 8px;
    border-radius: 4px;
    font-weight: 500;
}
.mistake-item.verb-item .verb-meaning {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 8px;
    line-height: 1.3;
}
.mistake-item.verb-item .verb-form-row {
    font-size: 15px;
    color: #1a1a2e;
    margin-bottom: 4px;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.mistake-item.verb-item .verb-form-row:last-of-type {
    margin-bottom: 0;
}
.mistake-item.verb-item .verb-form-row .label {
    font-size: 10px;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 400;
    flex-shrink: 0;
    min-width: 48px;
    text-align: center;
}
.mistake-item.verb-item .verb-form-row .value {
    font-weight: 600;
    letter-spacing: -0.3px;
}
.mistake-item.verb-item .verb-form-row .value .syl-0 {
    color: #F53F3F;
}
.mistake-item.verb-item .verb-form-row .value .syl-1 {
    color: #165DFF;
}
.mistake-item.verb-item .verb-form-row .value .syl-2 {
    color: #722ED1;
}
.mistake-item.verb-item .verb-form-row .value .syl-3 {
    color: #00B42A;
}
.mistake-item.verb-item .verb-form-row .value .syl-4 {
    color: #FF7D00;
}
.mistake-item.verb-item .verb-form-row .value .syl-5 {
    color: #F5319D;
}
.mistake-item .source-tag {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}
.mistake-item .source-tag.spell {
    background: #fef3c7;
    color: #d97706;
}
.mistake-item .source-tag.review {
    background: #dbeafe;
    color: #1d4ed8;
}
.mistake-item .source-tag.game {
    background: #f3e8ff;
    color: #7c3aed;
}
.mistake-item .speak-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: #eef2ff;
    color: #4f6ef7;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: 0.15s;
}
.mistake-item .speak-btn:active {
    transform: scale(0.88);
    background: #dbeafe;
}
.mistake-item .ignore-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: #fee2e2;
    color: #ef4444;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: 0.15s;
}
.mistake-item .ignore-btn:active {
    transform: scale(0.88);
    background: #fecaca;
}
.mistake-empty-state {
    text-align: center;
    padding: 50px 20px;
    color: #94a3b8;
}
.mistake-empty-state .icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}
.mistake-empty-state .title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 4px;
}
.mistake-empty-state .sub {
    font-size: 13px;
    color: #94a3b8;
}

@media (prefers-color-scheme: dark) {
    .mistake-title {
        color: #e8e8f0;
    }
    .mistake-count-badge {
        background: #450a0a;
        color: #f87171;
    }
    .mistake-filter-btn {
        background: #1a1a2e;
        border-color: #2a2a3e;
        color: #94a3b8;
    }
    .mistake-filter-btn.active {
        background: #ef4444;
        color: white;
        border-color: #ef4444;
    }
    .mistake-stat-card {
        background: #1a1a2e;
        border-color: #2a2a3e;
    }
    .mistake-item {
        background: #1a1a2e;
        border-color: #2a2a3e;
    }
    .mistake-item:active {
        background: #2a2a3e;
    }
    .mistake-item .word-info .word {
        color: #e8e8f0;
    }
    .mistake-item .word-info .meaning {
        color: #94a3b8;
    }
    .mistake-item.verb-item .verb-meaning {
        color: #e8e8f0;
    }
    .mistake-item.verb-item .verb-form-row {
        color: #e8e8f0;
    }
    .mistake-item.verb-item .verb-form-row .label {
        background: #2a2a3e;
        color: #64748b;
    }
    .mistake-item .speak-btn {
        background: #1e3a5f;
        color: #60a5fa;
    }
    .mistake-item .speak-btn:active {
        background: #2a4a7f;
    }
    .mistake-item .ignore-btn {
        background: #450a0a;
        color: #f87171;
    }
    .mistake-item .ignore-btn:active {
        background: #7f1d1d;
    }
    .mistake-item .source-tag.spell {
        background: #451a03;
        color: #fbbf24;
    }
    .mistake-item .source-tag.review {
        background: #1e3a5f;
        color: #60a5fa;
    }
    .mistake-item .source-tag.game {
        background: #2e1065;
        color: #a78bfa;
    }
    .mistake-item .word-info .wrong-answer {
        color: #f87171;
    }
    .mistake-item .word-info .wrong-answer .user-ans {
        background: #450a0a;
    }
    .mistake-action-btn {
        background: #1a1a2e;
        border-color: #2a2a3e;
        color: #94a3b8;
    }
    .mistake-action-btn:active {
        background: #2a2a3e;
    }
    .mistake-empty-state .title {
        color: #e8e8f0;
    }
}

/* ---- 手机版日读适配 ---- */
@media (max-width: 640px) {
    .daily-read-image-wrap {
        padding: 0 !important;
        background: transparent !important;
        border-radius: 0 !important;
    }
    .daily-read-image-wrap img {
        border-radius: 12px;
        width: 100%;
        height: auto;
    }
    .sentence-en {
        font-size: 1.2rem !important;
        line-height: 1.8 !important;
    }
    .sentence-zh {
        font-size: 1rem !important;
    }
    .sentence-block {
        margin-bottom: 1.8rem !important;
        padding: 8px 0 !important;
    }
    .sentence-play-btn,
    .sentence-mic-btn {
        font-size: 1.1rem !important;
        padding: 6px 10px !important;
    }
    .sentence-score-display {
        font-size: 0.9rem !important;
    }
    .sentence-detail-area {
        font-size: 0.8rem !important;
    }
    .daily-read-footer {
        padding: 10px 12px 16px !important;
        gap: 8px !important;
    }
    .daily-read-footer .footer-btn {
        font-size: 0.85rem !important;
        padding: 6px 14px !important;
    }
}
@media (min-width: 641px) and (max-width: 1024px) {
    .sentence-en {
        font-size: 1.4rem !important;
    }
    .sentence-zh {
        font-size: 1.2rem !important;
    }
    .daily-read-image-wrap img {
        border-radius: 16px;
    }
}
@media (min-width: 1025px) {
    .sentence-en {
        font-size: 1.8rem !important;
    }
    .sentence-zh {
        font-size: 1.5rem !important;
    }
}

/* ---- 学习页面隐藏顶部导航栏（手机端专用） ---- */
#app-mobile.hide-header .header {
    display: none !important;
}

/* ============================================================
   13. 投资建议卡片样式（PC端）
   ============================================================ */

/* ---- 卡片容器 ---- */
.inv-card-new {
  background: white;
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 16px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s;
}
.inv-card-new:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

/* ---- 顶部战报区 ---- */
.inv-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.inv-stock-name-large {
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
}
.inv-stock-name-large .stock-code {
  font-size: 0.8rem;
  font-weight: 400;
  color: #6b7280;
  margin-left: 6px;
}
.inv-profit-badge {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1.0rem;
  background: #f3f4f6;
}
.inv-profit-badge.positive {
  color: #16a34a;
  background: #dcfce7;
}
.inv-profit-badge.negative {
  color: #dc2626;
  background: #fee2e2;
}
.inv-profit-badge .profit-rate {
  font-size: 0.8rem;
  font-weight: 500;
}

/* ---- 价格锚点刻度尺 ---- */
.inv-price-bar {
  margin: 12px 0 8px;
}
.inv-price-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 4px;
}
.inv-price-labels .label-current {
  font-weight: 600;
  color: #1e293b;
}
.inv-price-track {
  position: relative;
  height: 6px;
  background: #e5e7eb;
  border-radius: 6px;
  margin: 0 4px;
}
.inv-price-track-fill {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 6px;
  background: #d1d5db;
}
.inv-price-marker {
  position: absolute;
  top: -6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transform: translateX(-50%);
  cursor: default;
}
.inv-price-marker.cost {
  background: #9ca3af;
  border-color: #6b7280;
}
.inv-price-marker.current {
  background: #2563eb;
  border-color: #1d4ed8;
  width: 14px;
  height: 14px;
  top: -8px;
}
.inv-price-marker.target {
  background: #22c55e;
  border-color: #16a34a;
}
.inv-price-marker.stop {
  background: #ef4444;
  border-color: #dc2626;
}

/* ---- 警示横幅 ---- */
.inv-alert-banner {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.85rem;
  color: #92400e;
  margin: 8px 0 10px;
  font-weight: 500;
}

/* ---- 智能信号标签 ---- */
.inv-signal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}
.inv-signal-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 30px;
  font-size: 0.78rem;
  font-weight: 500;
  background: #f3f4f6;
  color: #4b5563;
}
.inv-signal-tag.bad {
  background: #fee2e2;
  color: #991b1b;
}
.inv-signal-tag.good {
  background: #dcfce7;
  color: #166534;
}

/* ---- 操作区 ---- */
.inv-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}
.inv-action-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.inv-btn-lg {
  padding: 8px 24px;
  font-size: 0.95rem;
  border-radius: 30px;
}
.inv-btn-danger {
  background: #ef4444;
  color: white;
}
.inv-btn-danger:hover {
  background: #dc2626;
}
/* ============================================================
   手机端顶部栏精简样式（头像+下拉菜单）
   ============================================================ */

/* 右侧用户入口 */
.right-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-entry {
    display: flex;
    align-items: center;
    justify-content: center;  /* ★ 新增：整体水平居中 */
    gap: 8px;
    padding: 4px 12px 4px 8px;
    border-radius: 30px;
    background: #f1f5f9;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    user-select: none;
    border: 1px solid transparent;
    position: relative;
}
.user-entry:active {
    transform: scale(0.95);
    background: #e2e8f0;
}
.user-entry .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #4f6ef7;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}
.user-entry .avatar.guest {
    background: #94a3b8;
}
.user-entry .info {
    display: flex;
    flex-direction: column;
    justify-content: center;  /* 垂直居中（姓名和徽章在列方向上居中） */
    align-items: center;      /* ★ 水平居中，姓名和标签在卡片内居中对齐 */
    line-height: 1.3;
    min-height: 32px;
}
.user-entry .info .name {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    max-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-entry .info .badge {
    font-size: 9px;
    color: #64748b;
    background: #e2e8f0;
    padding: 0 6px;
    border-radius: 10px;
    display: inline-block;
    width: fit-content;
    font-weight: 500;
}
.user-entry .info .badge.parent-mode {
    background: #ede9fe;
    color: #6d28d9;
}
.user-entry .chevron {
    color: #94a3b8;
    font-size: 10px;
    margin-left: 2px;
    transition: transform 0.2s;
}
.user-entry.open .chevron {
    transform: rotate(180deg);
}

/* 登录按钮（未登录时显示） */
.login-btn-header {
    background: #4f6ef7;
    color: white;
    border: none;
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}
.login-btn-header:active {
    transform: scale(0.94);
    background: #3b5de7;
}

/* 下拉操作菜单 */
.action-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    min-width: 180px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px) scale(0.96);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    transform-origin: top right;
    border: 1px solid #f1f5f9;
    z-index: 20;
}
.action-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.action-menu .menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    font-size: 14px;
    color: #1e293b;
    cursor: pointer;
    transition: background 0.1s;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}
.action-menu .menu-item:active {
    background: #f1f5f9;
}
.action-menu .menu-item i {
    width: 18px;
    color: #64748b;
}
.action-menu .menu-item.danger {
    color: #ef4444;
}
.action-menu .menu-item.danger i {
    color: #ef4444;
}
.action-menu .menu-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 4px 12px;
}

/* 遮罩层（点击外部关闭菜单） */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 15;
    display: none;
}
.menu-overlay.active {
    display: block;
}
/* ============================================================
   头像上传预留（后续家长模式中接入）
   ============================================================ */
.user-entry .avatar {
    background: #4f6ef7;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;  /* 确保图片不溢出圆角 */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.user-entry .avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.user-entry .avatar.has-image {
    background: transparent;  /* 有图片时去掉纯色背景 */
}


/* ============================================================
   复习列表 / 卡片视图 - 单词内空格可视化
   用于 renderWordForDisplay() 输出的 .word-space-mark 占位符
   避免 HTML 空白折叠导致 "look after" / "look  after" 无法区分
   ============================================================ */
.word-space-mark {
    display: inline-block;
    width: 0.45em;
    position: relative;
    vertical-align: baseline;
}

.word-space-mark::after {
    content: '·';
    color: #cbd5e1;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-weight: 400;
    pointer-events: none;
}