/* 中学生英语高效辅助学习系统 全局 CSS 视觉系统 */

:root {
    --primary-color: #0284c7;
    --primary-hover: #0369a1;
    --secondary-color: #0d9488;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --bg-gradient: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 50%, #f0fdf4 100%);
    --card-bg: rgba(255, 255, 255, 0.92);
    --card-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 8px;
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body {
    font-family: var(--font-family);
    background: var(--bg-gradient);
    min-height: 100vh;
    color: #1e293b;
    padding-bottom: 50px;
}

/* 顶栏与全屏玻璃形态 */
.app-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.brand-logo {
    font-weight: 800;
    font-size: 1.35rem;
    background: linear-gradient(135deg, #0284c7, #0d9488);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: -0.5px;
}

.student-status-capsule {
    background: rgba(241, 245, 249, 0.8);
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.student-status-capsule:hover {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.header-dropdown-menu {
    border-radius: 14px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
}

.header-dropdown-menu .dropdown-item {
    border-radius: 8px;
    padding: 0.5rem 0.85rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: #334155;
    transition: all 0.15s ease;
}

.header-dropdown-menu .dropdown-item:hover {
    background-color: #f1f5f9;
    color: #0284c7;
}

/* 关卡进度条 */
.quest-progress-bar {
    height: 14px;
    border-radius: 10px;
    background: #e2e8f0;
    overflow: hidden;
}

.quest-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #10b981);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
}

/* 主能卡片设计 */
.quiz-card, .word-card, .slogan-card, .essay-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 2rem;
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quiz-card:hover, .word-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px rgba(2, 132, 199, 0.15);
}

/* 艾宾浩斯 3D 翻转卡片 (增强型高颜值弹性容器) */
.flashcard-container {
    perspective: 1200px;
    min-height: 460px;
    cursor: pointer;
    margin-bottom: 1.5rem;
}

.flashcard {
    width: 100%;
    min-height: 460px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 20px 40px -10px rgba(2, 132, 199, 0.12), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
}

.flashcard.flipped {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 2.25rem 2rem;
    border-radius: 24px;
    box-sizing: border-box;
    overflow-y: auto;
}

.card-front {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
}

.card-back {
    transform: rotateY(180deg);
    background: linear-gradient(145deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 2px solid #a7f3d0;
}

/* 单词卡片核心排版结构 (防止重叠) */
.recite-hero-word-text {
    font-size: 3.6rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -1.5px;
    line-height: 1.15;
    margin-bottom: 0.85rem;
    word-break: break-word;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.recite-phonetic-pill {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #475569;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 0.4rem 1.25rem;
    border-radius: 50px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* 语音跟读高科技控制盒 */
.speech-follow-panel {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    border-radius: 20px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 12px 30px -5px rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.speech-status-pill {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
}

.btn-recite-mic {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-size: 1.05rem;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
    transition: all 0.25s ease;
}

.btn-recite-mic:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(239, 68, 68, 0.55);
    color: #ffffff;
}

.btn-recite-mic.recording {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    animation: micPulse 1.2s infinite ease-in-out;
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.6);
}

@keyframes micPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.04); }
    100% { transform: scale(1); }
}

/* 底部操作工具栏 (悬浮浮窗，与卡片彻底解耦) */
.recite-action-dock {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 50px;
    padding: 0.65rem 1.25rem;
    box-shadow: 0 15px 35px -5px rgba(2, 132, 199, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.recite-dock-nav-btn {
    border-radius: 50px;
    padding: 0.5rem 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

/* 大按钮样式适配触屏 */
.btn-lg-custom {
    padding: 0.85rem 1.8rem;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
    transition: all 0.2s ease;
}

.btn-lg-custom:active {
    transform: scale(0.97);
}

.btn-success-custom {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
}

.btn-primary-custom {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: white;
    border: none;
}

/* 语法口诀卡片与字号层级精化 */
.slogan-card {
    background: linear-gradient(135deg, #ffffff 0%, #fffbf0 100%);
    border: 1px solid #fde68a;
    border-left: 5px solid #f59e0b;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.08);
    padding: 1.5rem;
}

.slogan-card .slogan-card-title {
    font-size: 1.08rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
}

.slogan-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: #1e293b;
    line-height: 1.65;
}

.slogan-text h3 {
    font-size: 1.0rem !important;
    font-weight: 700 !important;
    color: #1d4ed8 !important;
    background: #eff6ff;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
    margin-top: 0.75rem !important;
    margin-bottom: 0.6rem !important;
    display: inline-block;
}

.slogan-text h4 {
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    color: #334155 !important;
    border-bottom: 1px dashed #cbd5e1;
    padding-bottom: 0.35rem;
    margin-top: 0.85rem !important;
    margin-bottom: 0.5rem !important;
}

.slogan-text .badge.bg-primary {
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    padding: 0.28rem 0.65rem !important;
    border-radius: 6px !important;
    letter-spacing: 0.01em;
}

.slogan-text .badge.bg-success-subtle,
.slogan-text .badge.bg-warning-subtle {
    font-size: 0.78rem !important;
    padding: 0.2rem 0.5rem !important;
    border-radius: 6px !important;
}

.slogan-text ul {
    list-style: none;
    padding-left: 0;
    margin-top: 0.6rem;
    margin-bottom: 0.6rem;
}

.slogan-text ul > li {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.85rem 1.1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.slogan-text ul > li:hover {
    border-color: #3b82f6;
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.slogan-text ul > li > ul {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    padding-left: 0;
    border-top: 1px dashed #cbd5e1;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.slogan-text ul > li > ul > li {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 8px;
    padding: 0.55rem 0.8rem;
    margin-bottom: 0;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.4rem;
    transition: all 0.15s ease;
}

.slogan-text ul > li > ul > li:hover {
    background: #f0f9ff;
    border-color: #bae6fd;
}

.slogan-text .sentence-item {
    color: #0f172a;
    font-size: 0.92rem;
    font-weight: 600;
}

.slogan-nav-tab {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475569;
    border-radius: 18px;
    padding: 0.4rem 0.95rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.slogan-nav-tab:hover, .slogan-nav-tab.active {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.25);
}


/* 关卡底栏完成动作悬浮/嵌入面板 */
.step-action-bar {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    border: 1.5px dashed #a7f3d0;
    border-radius: 20px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.06);
    transition: all 0.25s ease;
}

.step-action-bar:hover {
    border-color: #34d399;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.12);
}

.btn-step-submit {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 50px;
    padding: 0.85rem 1.85rem;
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 8px 20px -4px rgba(16, 185, 129, 0.4);
    white-space: nowrap;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    cursor: pointer;
    text-decoration: none !important;
}

.btn-step-submit:hover {
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 25px -4px rgba(16, 185, 129, 0.55);
}

.btn-step-submit:active {
    transform: translateY(1px);
    box-shadow: 0 4px 10px -2px rgba(16, 185, 129, 0.4);
}

.badge-points-reward {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: 0.2rem 0.65rem;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* 金币积分徽章 */
.points-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* 金币跳动与关卡完成特效 */
@keyframes coinPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3) rotate(15deg); }
    100% { transform: scale(1); }
}

.coin-pop {
    animation: coinPop 0.5s ease;
}

/* 音频/TTS 播放控制器 */
.audio-ctrl-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e0f2fe;
    color: #0284c7;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.audio-ctrl-btn:hover {
    background: #0284c7;
    color: white;
}

/* 响应式平板/手机调整 */
@media (max-width: 768px) {
    main.container {
        min-height: calc(100vh - 60px);
        display: flex;
        flex-direction: column;
    }
    #recite-card-area {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    .recite-card-wrapper {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    .quiz-card, .word-card, .slogan-card, .essay-card {
        padding: 1rem;
    }
    .brand-logo {
        font-size: 1.1rem;
    }
    .flashcard-container {
        perspective: 1200px;
        min-height: 400px !important;
        height: auto !important;
        margin-bottom: 0.75rem !important;
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
    }
    .flashcard {
        min-height: 400px !important;
        height: 100% !important;
        flex: 1 1 auto;
        border-radius: 20px;
    }
    .card-front, .card-back {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        padding: 1.15rem 0.85rem !important;
        border-radius: 20px;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        overflow-y: auto !important;
    }
    .recite-hero-word-text {
        font-size: 2.25rem !important;
        line-height: 1.15;
        margin-bottom: 0.25rem !important;
    }
    .recite-phonetic-pill {
        font-size: 0.92rem !important;
        padding: 0.25rem 0.75rem !important;
    }
    .speech-follow-panel {
        padding: 0.75rem 0.85rem !important;
        border-radius: 16px !important;
        margin-top: 0.4rem !important;
        margin-bottom: 0.4rem !important;
        width: 100%;
    }
    .btn-recite-mic {
        padding: 0.55rem 0.85rem !important;
        font-size: 0.88rem !important;
        width: 100%;
    }
    .recite-action-dock {
        padding: 0.5rem 0.75rem !important;
        border-radius: 50px;
        gap: 0.4rem !important;
        margin-top: 0.75rem !important;
        margin-bottom: 0.5rem !important;
    }
    .recite-action-dock .btn {
        padding: 0.55rem 0.5rem !important;
        font-size: 0.85rem !important;
        white-space: nowrap !important;
    }
    .recite-dock-nav-btn {
        width: 40px !important;
        height: 40px !important;
        border-radius: 50% !important;
        padding: 0 !important;
        font-size: 1.1rem !important;
    }
    #mode-selector-group {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
        width: 100%;
    }
    .mode-pill-btn {
        padding: 0.4rem 0.85rem !important;
        font-size: 0.82rem !important;
        flex-shrink: 0 !important;
    }
}

/* 现代化 Toast 悬浮通知系统 (替代传统硬弹窗 alert) */
.app-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.app-toast-item {
    pointer-events: auto;
    min-width: 280px;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12), 0 5px 15px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    padding: 0.9rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
}

.app-toast-item.show {
    transform: translateX(0);
    opacity: 1;
}

.app-toast-item.toast-success {
    border-left: 5px solid #10b981;
}
.app-toast-item.toast-error {
    border-left: 5px solid #ef4444;
}
.app-toast-item.toast-warning {
    border-left: 5px solid #f59e0b;
}
.app-toast-item.toast-info {
    border-left: 5px solid #0284c7;
}

.app-toast-icon {
    font-size: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 自定义高颜值 Modal 确认弹窗 */
.app-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.app-modal-backdrop.show {
    opacity: 1;
}

.app-modal-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 24px;
    padding: 2.25rem 2rem;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.app-modal-backdrop.show .app-modal-card {
    transform: scale(1) translateY(0);
}

.app-modal-icon {
    font-size: 2.75rem;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.app-modal-title {
    font-weight: 800;
    font-size: 1.25rem;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.app-modal-body {
    font-size: 0.95rem;
    color: #475569;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.app-modal-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* 交互式学习日历网格样式 */
.calendar-header-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    text-align: center;
    font-weight: 700;
    color: #64748b;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.cal-head-cell {
    padding: 6px 0;
    font-size: 0.95rem;
}

.calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.calendar-cell {
    min-height: 96px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.calendar-cell.empty-cell {
    background: transparent;
    border: none;
    cursor: default;
}

.calendar-cell:hover:not(.empty-cell) {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -5px rgba(2, 132, 199, 0.15);
    border-color: #0284c7;
}

.calendar-cell.cell-today {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #0284c7;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.2);
}

.calendar-cell.cell-today .cal-day-num {
    background: #0284c7;
    color: #ffffff;
}

.calendar-cell.cell-past {
    background: #fafafa;
}

.calendar-cell.cell-future {
    background: #f8fafc;
    border-style: dashed;
}

.cal-day-num {
    font-weight: 800;
    font-size: 0.95rem;
    color: #1e293b;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.cal-cell-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}

.cal-badge {
    font-size: 0.72rem;
    padding: 3px 6px;
    border-radius: 8px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-sub-text {
    font-size: 0.7rem;
    font-weight: 700;
    text-align: center;
}

/* 5 关卡自由跳关胶囊导航条 */
.quest-step-pills {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 8px;
    box-shadow: 0 10px 25px -5px rgba(2, 132, 199, 0.1);
    border: 1px solid rgba(226, 232, 240, 0.8);
    backdrop-filter: blur(12px);
    overflow-x: auto;
}

.step-pill-item {
    flex: 1;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    white-space: nowrap;
}

.step-pill-item:hover {
    background: #f0f9ff;
    color: #0284c7;
    border-color: #0284c7;
    transform: translateY(-2px);
}

.step-pill-item.active {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.3);
}

.step-pill-item.completed {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
}

.step-pill-item.active.completed {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border-color: transparent;
}

.step-pill-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 800;
}

.step-pill-item.active .step-pill-num {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* 主页 Dashboard 统计卡片与 Banner 样式 */
.dash-hero-banner {
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    border-radius: 24px;
    padding: 2.25rem 2rem;
    box-shadow: 0 15px 35px -5px rgba(2, 132, 199, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.9);
    position: relative;
    overflow: hidden;
}

.dash-hero-banner::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(2, 132, 199, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
}

.dash-stat-card {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(10px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dash-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 36px -5px rgba(2, 132, 199, 0.15);
}

.dash-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* 移动端顶栏横向滑轨容器 */
.header-nav-scroll {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
}

.header-nav-scroll::-webkit-scrollbar {
    display: none;
}

/* ==================================================== */
/* 📱 移动端与平板多端自适应响应式媒体查询 (Responsive Breakpoints) */
/* ==================================================== */

/* 1. 移动端手机屏幕 (< 576px) */
@media (max-width: 576px) {
    body {
        padding-bottom: 30px;
    }

    .app-header {
        padding: 0.5rem 0;
    }

    .brand-logo {
        font-size: 1.15rem;
    }

    .dash-hero-banner {
        padding: 1.25rem 1rem;
        border-radius: 18px;
    }

    .dash-hero-banner h2 {
        font-size: 1.35rem;
    }

    .dash-stat-card {
        padding: 1.1rem;
        border-radius: 16px;
    }

    .quiz-card, .word-card, .slogan-card, .essay-card {
        padding: 1.1rem 0.9rem;
        border-radius: 16px;
        margin-bottom: 1rem;
    }

    .btn-lg-custom {
        padding: 0.7rem 1.2rem;
        font-size: 0.95rem;
        border-radius: 12px;
        width: 100%;
        margin-bottom: 8px;
    }

    .quest-step-pills {
        justify-content: flex-start;
        gap: 6px;
        padding: 6px;
        border-radius: 16px;
        -webkit-overflow-scrolling: touch;
    }

    .step-pill-item {
        min-width: 95px;
        padding: 7px 9px;
        font-size: 0.78rem;
        border-radius: 10px;
    }

    .step-pill-num {
        width: 18px;
        height: 18px;
        font-size: 0.7rem;
    }

    .flashcard-container {
        min-height: 310px !important;
        height: 310px !important;
        margin-bottom: 0.5rem !important;
    }

    .flashcard {
        min-height: 310px !important;
        height: 310px !important;
        border-radius: 20px;
    }

    .app-toast-container {
        top: 12px;
        right: 12px;
        left: 12px;
    }

    .app-toast-item {
        min-width: auto;
        max-width: 100%;
        font-size: 0.88rem;
        padding: 0.75rem 1rem;
    }

    .app-modal-card {
        padding: 1.5rem 1.15rem;
        border-radius: 20px;
        max-width: 94%;
    }

    .calendar-cell {
        min-height: 64px;
        padding: 4px;
        border-radius: 10px;
    }

    .cal-day-num {
        width: 20px;
        height: 20px;
        font-size: 0.8rem;
    }

    .cal-badge {
        font-size: 0.62rem;
        padding: 2px 3px;
    }
}

/* 2. 平板端屏幕 (576px ~ 992px) */
@media (min-width: 576px) and (max-width: 992px) {
    .dash-hero-banner {
        padding: 1.75rem 1.5rem;
    }

    .dash-stat-card {
        padding: 1.25rem;
    }

    .quiz-card, .word-card, .slogan-card, .essay-card {
        padding: 1.5rem 1.25rem;
    }

    .step-pill-item {
        min-width: 110px;
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .calendar-cell {
        min-height: 80px;
    }
}

/* 3. 手机与平板通用中窄屏 (< 768px) */
@media (max-width: 768px) {
    .brand-logo {
        font-size: 1.2rem;
    }

    .quest-step-pills {
        overflow-x: auto;
    }
}





