/* ===== 组件样式 - 精品视觉 ===== */

/* SSS评级徽章 */
.dp-rating-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 72px; height: 72px; border-radius: 18px;
    font-size: 26px; font-weight: 900;
    letter-spacing: 1px;
    animation: dp-rating-appear 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.dp-rating-badge.C { background: #6b7280; color: white; }
.dp-rating-badge.B { background: linear-gradient(135deg, #3b82f6, #2563eb); color: white; }
.dp-rating-badge.A { background: linear-gradient(135deg, #22c55e, #16a34a); color: white; box-shadow: 0 4px 16px rgba(34,197,94,0.35); }
.dp-rating-badge.S { background: linear-gradient(135deg, #f59e0b, #f97316); color: white; box-shadow: 0 4px 16px rgba(245,158,11,0.35); }
.dp-rating-badge.SS { background: linear-gradient(135deg, #f97316, #ef4444); color: white; box-shadow: 0 4px 16px rgba(249,115,22,0.35); }
.dp-rating-badge.SSS {
    background: linear-gradient(135deg, #ec4899, #8b5cf6, #3b82f6, #22c55e, #eab308);
    color: white; background-size: 200% 200%;
    box-shadow: 0 4px 20px rgba(236,72,153,0.4);
    animation: dp-rating-appear 0.5s ease, dp-rainbow 2s linear infinite;
}
@keyframes dp-rainbow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* 打卡日历 */
.dp-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    max-width: 320px;
    margin: 0 auto;
}
.dp-cal-header {
    text-align: center;
    font-size: 11px; font-weight: 700;
    color: var(--text-muted);
    padding: 6px 0;
}
.dp-cal-day {
    aspect-ratio: 1;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 500;
    background: var(--card-bg);
    color: var(--text-muted);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}
.dp-cal-day.practiced {
    background: linear-gradient(135deg, var(--accent-green), var(--accent-teal));
    color: white; font-weight: 700;
    border: none;
    box-shadow: 0 2px 6px rgba(34,197,94,0.25);
}
.dp-cal-day.today {
    border: 2px solid var(--accent-blue);
}

/* 连胜 */
.dp-streak {
    display: inline-flex; align-items: center; gap: 6px;
    justify-content: center;
    font-size: 22px; font-weight: 900;
    padding: 6px 16px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
}
.dp-streak svg { color: var(--accent-orange); }

/* 每日一句卡片 */
.dp-daily-card {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    border-radius: 20px;
    padding: 24px;
    color: white;
    text-align: center;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(168,85,247,0.25);
}
.dp-daily-card::before {
    content: '';
    position: absolute;
    top: -30%; right: -20%;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
}
.dp-daily-card::after {
    content: '';
    position: absolute;
    bottom: -20%; left: -15%;
    width: 120px; height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}
.dp-daily-label {
    font-size: 12px; font-weight: 700; opacity: 0.85;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative; z-index: 1;
}
.dp-daily-chinese { font-size: 20px; font-weight: 800; margin-bottom: 6px; position: relative; z-index: 1; }
.dp-daily-source { font-size: 11px; opacity: 0.7; margin-bottom: 8px; position: relative; z-index: 1; font-style: italic; }
.dp-daily-english { font-size: 15px; opacity: 0.9; margin-bottom: 16px; position: relative; z-index: 1; }
.dp-daily-btn {
    padding: 10px 24px; border-radius: 12px;
    background: rgba(255,255,255,0.18);
    color: white; border: 1px solid rgba(255,255,255,0.25);
    font-size: 14px; font-weight: 700;
    cursor: pointer; position: relative; z-index: 1;
    display: inline-flex; align-items: center; gap: 8px;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}
.dp-daily-btn:active { transform: scale(0.96); }

/* 开始练习大按钮 */
.dp-start-btn {
    width: 100%;
    padding: 20px;
    border-radius: 18px;
    border: none;
    background: linear-gradient(135deg, #a855f7 0%, #6b5cff 50%, #4d96ff 100%);
    color: white;
    font-size: 18px; font-weight: 900;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    box-shadow: 0 4px 20px rgba(108, 92, 255, 0.35);
    transition: all 0.2s ease;
    letter-spacing: -0.3px;
    animation: dp-start-btn-breath 2.4s ease-in-out infinite;
}
.dp-start-btn:active { transform: scale(0.97); }
@keyframes dp-start-btn-breath {
    0%, 100% { box-shadow: 0 4px 20px rgba(108, 92, 255, 0.35); }
    50% { box-shadow: 0 8px 28px rgba(108, 92, 255, 0.55); }
}
.dp-start-btn::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.08) 50%, transparent 60%);
    animation: dp-shine 3s infinite;
}
@keyframes dp-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 快捷入口卡片 */
.dp-quick-card {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 16px 12px;
    text-align: center;
    color: var(--text);
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
}
.dp-quick-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 4px 16px rgba(108,92,255,0.12);
}
.dp-quick-card:active { transform: scale(0.96); }
/* 快捷卡片 - 无底部线，hover发光即可 */
.dp-quick-icon {
    width: 40px; height: 40px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 8px;
    background: rgba(255,255,255,0.12);
}
.dp-quick-icon.errors { color: var(--accent-red); }
.dp-quick-icon.errors svg { stroke: var(--accent-red); }
.dp-quick-icon.history { color: var(--accent-blue); }
.dp-quick-icon.history svg { stroke: var(--accent-blue); }
.dp-quick-icon.settings { color: var(--text-muted); }
.dp-quick-icon.settings svg { stroke: var(--text-muted); }
.dp-quick-icon.vocab { color: var(--accent-purple); }
.dp-quick-icon.vocab svg { stroke: var(--accent-purple); }
/* 亮色主题快捷图标 */
[data-theme=light] .dp-quick-icon { background: rgba(0,0,0,0.06); }
[data-theme=eye] .dp-quick-icon { background: rgba(0,0,0,0.06); }
.dp-quick-label { font-size: 12px; font-weight: 700; }

/* 错题卡片 */
.dp-error-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 12px;
    background: rgba(249,115,22,0.03);
    backdrop-filter: blur(8px);
}
.dp-error-chinese { font-weight: 700; margin-bottom: 4px; }
.dp-error-type {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 11px; font-weight: 700;
}
.dp-error-type.pronunciation { background: rgba(249,115,22,0.12); color: var(--accent-orange); box-shadow: 0 0 8px rgba(249,115,22,0.15); }
.dp-error-type.grammar { background: rgba(239,68,68,0.12); color: var(--accent-red); box-shadow: 0 0 8px rgba(239,68,68,0.15); }
.dp-error-type.vocabulary { background: rgba(168,85,247,0.12); color: var(--accent-purple); box-shadow: 0 0 8px rgba(168,85,247,0.15); }

/* 问候区 */
.dp-greeting {
    font-size: 28px; font-weight: 900;
    text-align: center; margin-bottom: 24px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Level 显示 */
.dp-level-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 16px; border-radius: 10px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    font-size: 13px; font-weight: 700;
}
.dp-level-badge .cefr {
    color: var(--accent-blue);
}

/* ========== 18 段徽章 (v4) ========== */
.dp-level-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--icon-size, 32px);
    height: var(--icon-size, 32px);
    flex-shrink: 0;
}
.dp-level-icon__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter:
        brightness(0) saturate(100%) /* 全部转黑 */
        drop-shadow(0 0 0 currentColor); /* 保持 alpha */
    transition: transform 0.3s ease, filter 0.3s ease;
}
/* 6 段颜色梯度 - 用 hue-rotate + drop-shadow 控制颜色 */
.dp-level-icon--a1 .dp-level-icon__img {
    /* 灰 #6b7280 */
    filter: brightness(0) saturate(100%) sepia(8%) saturate(420%) hue-rotate(176deg) brightness(92%);
}
.dp-level-icon--a2 .dp-level-icon__img {
    /* 银 #c0c4cc */
    filter: brightness(0) saturate(100%) sepia(6%) saturate(180%) hue-rotate(196deg) brightness(105%);
}
.dp-level-icon--b1 .dp-level-icon__img {
    /* 浅金 #e8d28a */
    filter: brightness(0) saturate(100%) sepia(38%) saturate(620%) hue-rotate(8deg) brightness(108%);
}
.dp-level-icon--b2 .dp-level-icon__img {
    /* 金 #fbbf24 */
    filter: brightness(0) saturate(100%) sepia(78%) saturate(1850%) hue-rotate(2deg) brightness(112%);
}
.dp-level-icon--c1 .dp-level-icon__img {
    /* 橙金 #f59e0b */
    filter: brightness(0) saturate(100%) sepia(95%) saturate(2100%) hue-rotate(354deg) brightness(108%);
}
.dp-level-icon--c2 .dp-level-icon__img {
    /* 钻石青 #06b6d4 */
    filter: brightness(0) saturate(100%) sepia(82%) saturate(1900%) hue-rotate(154deg) brightness(108%);
}

/* C1+ 段辉光 (静态) */
.dp-level-icon--c1 .dp-level-icon__img,
.dp-level-icon--c2 .dp-level-icon__img {
    filter:
        brightness(0) saturate(100%) sepia(95%) saturate(2100%) hue-rotate(354deg) brightness(108%)
        drop-shadow(0 0 4px rgba(239, 68, 68, 0.6))
        drop-shadow(0 0 8px rgba(239, 68, 68, 0.4));
}
/* C2 段单独蓝青辉光 */
.dp-level-icon--c2 .dp-level-icon__img {
    filter:
        brightness(0) saturate(100%) sepia(82%) saturate(1900%) hue-rotate(154deg) brightness(108%)
        drop-shadow(0 0 4px rgba(6, 182, 212, 0.7))
        drop-shadow(0 0 10px rgba(6, 182, 212, 0.5));
}

/* C2 段旋转辉光动画 */
.dp-level-icon--glow {
    animation: dp-icon-c2-rotate 6s linear infinite;
}
@keyframes dp-icon-c2-rotate {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 数字角标 (右下小圆点) */
.dp-level-icon__num {
    position: absolute;
    right: -4px; bottom: -4px;
    min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 8px;
    background: var(--bg-card, #1a1a1a);
    color: var(--accent-gold, #fbbf24);
    border: 1.5px solid var(--accent-gold, #fbbf24);
    font-size: 10px; font-weight: 800;
    line-height: 13px; text-align: center;
    font-variant-numeric: tabular-nums;
}

/* 在 .dp-level-badge 容器里: 图标 + 文字横排 */
.dp-level-badge .dp-level-icon {
    margin-right: 4px;
}

/* Placement 页面 */
.dp-placement-hero {
    text-align: center;
    padding: 32px 0 24px;
}
.dp-placement-title {
    font-size: 26px; font-weight: 900;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}
.dp-placement-subtitle {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 28px;
}
.dp-placement-progress {
    display: flex; gap: 6px; justify-content: center;
    margin-bottom: 20px;
}
.dp-p-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--border);
    transition: all 0.3s ease;
}
.dp-p-dot.active { background: var(--accent-blue); width: 24px; border-radius: 4px; }
.dp-p-dot.done { background: var(--accent-green); }


/* ===== 半引导模式 ===== */
.dp-guided-section {
    margin-top: 16px;
    padding: 16px;
    background: var(--card-bg, rgba(255,255,255,0.06));
    border-radius: 12px;
    border: 1px solid var(--border, rgba(255,255,255,0.1));
}

.dp-guided-sentence {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.8;
    letter-spacing: 0.5px;
    color: var(--text);
}

.dp-blank-word {
    display: inline-block;
    color: var(--accent-purple, #a78bfa);
    border-bottom: none;
    margin: 0 2px;
    padding: 0 4px 2px;
    font-weight: 800;
    letter-spacing: 2px;
    min-width: 2em;
    text-align: center;
    box-shadow: 0 3px 10px rgba(168,85,247,0.25);
    border-radius: 2px;
}

.dp-visible-word {
    color: var(--text-muted);
    font-weight: 600;
}

.dp-guided-hint {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-muted, rgba(255,255,255,0.4));
    font-weight: 500;
}

/* ===== 词卡提示 ===== */
.dp-hint-area {
    text-align: center;
    margin-top: 16px;
}

.dp-hint-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 20px;
    border: 1px solid var(--accent-purple, #a78bfa);
    background: rgba(167,139,250,0.08);
    color: var(--accent-purple, #a78bfa);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.dp-hint-btn:hover { background: rgba(167,139,250,0.18); transform: scale(1.03); }

.dp-vocab-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 14px;
}

.dp-vocab-card {
    position: relative;
    background: var(--card-bg, rgba(255,255,255,0.06));
    border: 1px solid var(--border, rgba(255,255,255,0.1));
    border-radius: 14px;
    overflow: visible;
    min-width: 160px;
    max-width: 220px;
    transition: all 0.25s ease;
    animation: dp-card-in 0.3s ease both;
}
.dp-vocab-card:hover { transform: translateY(-2px); border-color: var(--accent-purple, #a78bfa); box-shadow: 0 6px 20px rgba(167,139,250,0.15); }

@keyframes dp-card-in {
    from { opacity: 0; transform: translateY(10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.dp-vocab-card:nth-child(2) { animation-delay: 0.06s; }
.dp-vocab-card:nth-child(3) { animation-delay: 0.12s; }
.dp-vocab-card:nth-child(4) { animation-delay: 0.18s; }
.dp-vocab-card:nth-child(5) { animation-delay: 0.24s; }

.dp-vc-body {
    padding: 10px 14px 12px 14px;
    flex: 1;
    min-width: 0;
}

.dp-vc-main {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.dp-vc-word {
    font-size: 18px;
    font-weight: 800;
    color: var(--accent-blue, #60a5fa);
    letter-spacing: 0.3px;
}

.dp-vc-phonetic {
    font-size: 12px;
    color: var(--text-muted, rgba(255,255,255,0.4));
    font-style: italic;
}

.dp-vc-meaning {
    margin-top: 4px;
    font-size: 13px;
    color: var(--text-secondary, rgba(255,255,255,0.65));
    line-height: 1.6;
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: nowrap;
}

.dp-vc-pos {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(167,139,250,0.15);
    color: var(--accent-purple, #a78bfa);
    font-size: 11px;
    font-weight: 600;
    margin-right: 4px;
}

.dp-vc-example {
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-muted, rgba(255,255,255,0.35));
    line-height: 1.4;
    font-style: italic;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 6px;
}

.dp-vc-play {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--accent-purple, #a78bfa);
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    opacity: 0.45;
    padding: 0;
}
.dp-vc-play:hover {
    background: rgba(167,139,250,0.15);
    opacity: 1;
    transform: scale(1.08);
}
.dp-vc-play:active { transform: scale(0.9); }
.dp-vc-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.dp-vc-save {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(167,139,250,0.1);
    border: 1px solid rgba(167,139,250,0.2);
    color: var(--accent-purple, #a78bfa);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
    opacity: 0.5;
    padding: 0;
    line-height: 1;
}
.dp-vc-save:hover {
    background: rgba(167,139,250,0.2);
    opacity: 1;
    transform: scale(1.08);
}
.dp-vc-save:active { transform: scale(0.9); }
.dp-vc-save.saved {
    background: rgba(34,197,94,0.15);
    border-color: rgba(34,197,94,0.3);
    color: var(--accent-green, #22c55e);
    opacity: 0.7;
    cursor: default;
}


/* 次要按钮（返回首页等） */
.dp-btn-secondary {
    width: 100%;
    padding: 16px;
    border-radius: 18px;
    border: 2px solid var(--border);
    background: var(--card-bg);
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
}
.dp-btn-secondary:hover {
    border-color: var(--accent-blue);
    background: var(--hover-bg);
}
.dp-btn-secondary:active {
    transform: scale(0.97);
}

/* ===== Round Summary Score Cards ===== */
.dp-score-card {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 900;
    backdrop-filter: blur(8px);
    transition: transform 0.2s;
}
.dp-score-card.perfect {
    background: rgba(0, 201, 167, 0.2);
    color: #00C9A7;
    border: 2px solid rgba(0, 201, 167, 0.4);
}
.dp-score-card.good {
    background: rgba(75, 123, 229, 0.2);
    color: #4B7BE5;
    border: 2px solid rgba(75, 123, 229, 0.4);
}
.dp-score-card.ok {
    background: rgba(255, 165, 0, 0.2);
    color: #FFA500;
    border: 2px solid rgba(255, 165, 0, 0.4);
}
.dp-score-card.low {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
    border: 2px solid rgba(239, 68, 68, 0.4);
}

/* ===== Summary Total Score Colors ===== */
.dp-summary-total.perfect { color: #00C9A7; }
.dp-summary-total.good { color: #4B7BE5; }
.dp-summary-total.ok { color: #FFA500; }
.dp-summary-total.low { color: #EF4444; }

/* ===== Progress Pips (Level-up progress) ===== */
.dp-progress-pip {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 2px solid var(--border);
    background: var(--card-bg);
    transition: all 0.3s ease;
}
.dp-progress-pip.filled {
    background: linear-gradient(135deg, #00C9A7 0%, #4B7BE5 100%);
    border-color: transparent;
    box-shadow: 0 0 12px rgba(0, 201, 167, 0.3);
}

/* Peer Comparison */
.dp-peer-section { animation: dp-fadeIn 0.4s ease; }
@keyframes dp-fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
.dp-peer-row { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.dp-peer-label { font-size:12px; color:var(--text-muted); width:56px; flex-shrink:0; font-weight:600; }
.dp-peer-bar-track { flex:1; height:6px; border-radius:3px; background:var(--border); overflow:hidden; }
.dp-peer-bar-fill { height:100%; border-radius:3px; transition:width 0.8s cubic-bezier(0.22,1,0.36,1); }
.dp-peer-bar-fill.me { background:linear-gradient(90deg, var(--accent-green), var(--accent-teal)); }
.dp-peer-bar-fill.peer { background:var(--border); opacity:0.6; }
.dp-peer-val { font-size:13px; font-weight:800; min-width:28px; text-align:right; color:var(--text-primary); }

/* Vocabulary page back link */
.dp-back-link { display:inline-flex; align-items:center; gap:4px; color:var(--text-muted); font-size:14px; font-weight:600; text-decoration:none; transition:color .2s; }
.dp-back-link:hover { color:var(--accent-blue); }

/* ===== Global Confirm Modal ===== */
.dp-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.dp-confirm-overlay.dp-confirm-open {
    opacity: 1;
    visibility: visible;
}
.dp-confirm-dialog {
    position: relative;
    max-width: 360px;
    width: 100%;
    background: var(--card-bg);
    border-radius: 18px;
    padding: 28px 24px 22px;
    text-align: center;
    border: 1.5px solid transparent;
    background-image: linear-gradient(var(--card-bg), var(--card-bg)),
        linear-gradient(135deg, var(--accent-blue), var(--accent-purple), var(--accent-pink));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45), 0 4px 16px rgba(0, 0, 0, 0.2);
    transform: scale(0.92) translateY(8px);
    transition: transform 0.28s cubic-bezier(0.22, 1.2, 0.36, 1);
}
.dp-confirm-overlay.dp-confirm-open .dp-confirm-dialog {
    transform: scale(1) translateY(0);
}
.dp-confirm-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(249, 115, 22, 0.15));
    color: var(--accent-orange);
    margin-bottom: 14px;
}
.dp-confirm-icon svg { width: 28px; height: 28px; }
.dp-confirm-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}
.dp-confirm-msg {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 22px;
}
.dp-confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.dp-confirm-actions button {
    flex: 1;
    min-width: 0;
    padding: 11px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.18s ease;
    font-family: inherit;
}
.dp-confirm-actions button:active { transform: scale(0.97); }
.dp-confirm-actions .dp-btn-secondary {
    background: var(--border);
    color: var(--text);
}
.dp-confirm-actions .dp-btn-secondary:hover {
    background: rgba(127, 127, 200, 0.25);
}
.dp-confirm-actions .dp-btn-warn {
    background: linear-gradient(135deg, var(--accent-red), var(--accent-orange));
    color: #fff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.32);
}
.dp-confirm-actions .dp-btn-warn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45);
}

/* ===== Hint Toast (for countdown timeout mode suggestion) ===== */
.dp-hint-toast {
    position: fixed;
    left: 50%;
    top: 16%;
    transform: translateX(-50%) translateY(-12px);
    z-index: 9000;
    max-width: 360px;
    width: calc(100% - 32px);
    background: var(--card-bg);
    border-radius: 14px;
    padding: 14px 18px 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
    border: 1.5px solid transparent;
    background-image: linear-gradient(var(--card-bg), var(--card-bg)),
        linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22, 1.2, 0.36, 1);
}
.dp-hint-toast.dp-hint-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}
.dp-hint-arrow {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-yellow), var(--accent-orange));
    color: #fff;
    animation: dp-hint-bob 0.9s ease-in-out infinite;
}
.dp-hint-arrow svg { width: 16px; height: 16px; }
@keyframes dp-hint-bob {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-4px); }
}
.dp-hint-text {
    flex: 1;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--text);
    font-weight: 600;
}
.dp-hint-text b {
    color: var(--accent-orange);
    font-weight: 800;
}

/* ===== Countdown Pulse (timeout urgency) ===== */
@keyframes dp-cd-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.18); }
}
.dp-cd-pulse {
    animation: dp-cd-pulse 0.6s ease-in-out infinite;
    color: var(--accent-red) !important;
}
.dp-cd-hint {
    font-size: 11px;
    color: var(--accent-red);
    font-weight: 700;
    margin-top: 2px;
    opacity: 0.85;
}

/* ===== Progress Nav Arrows ===== */
.dp-progress-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    margin-top: 16px;
}
.dp-nav-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    padding: 0;
}
.dp-nav-arrow:hover:not(:disabled) {
    background: var(--accent-blue);
    color: #fff;
    border-color: var(--accent-blue);
    transform: scale(1.05);
}
.dp-nav-arrow:active:not(:disabled) {
    transform: scale(0.95);
}
.dp-nav-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.dp-nav-arrow svg {
    width: 16px;
    height: 16px;
}
.dp-progress-dots {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 10px;
}
.dp-dot {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}
.dp-dot:hover:not(.active) {
    transform: scale(1.1);
    color: var(--accent-blue);
}
.dp-dot.answered::after {
    content: '\2713';
    position: absolute;
    top: -6px;
    right: -6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-green);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.4);
}
.dp-dot.active.answered::after {
    background: var(--accent-blue);
}


/* ===== Mic Countdown (连体在 mic-btn 上方) ===== */
.dp-mic-countdown {
    display: none;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    pointer-events: none;
    z-index: 2;
    white-space: nowrap;
    line-height: 1;
}
.dp-mic-countdown.visible { display: inline-flex; }
.dp-mic-countdown #dp-cd-num {
    font-size: 32px;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    letter-spacing: -0.5px;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 12px rgba(255,255,255,0.4);
    transition: color 0.2s ease;
}
.dp-mic-countdown #dp-cd-num.dp-cd-warn {
    color: var(--accent-orange);
    text-shadow: 0 0 12px rgba(255,140,0,0.5);
}
.dp-mic-countdown #dp-cd-label {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    font-weight: 700;
    line-height: 1;
    margin-top: 2px;
    transition: color 0.2s ease, font-size 0.2s ease;
}
.dp-mic-countdown #dp-cd-label.dp-cd-hint {
    color: var(--accent-red);
    font-size: 13px;
    animation: dp-cd-hint-pulse 0.9s ease-in-out infinite;
}
@keyframes dp-cd-pulse-anim {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.85; }
}
.dp-mic-countdown.visible #dp-cd-num.dp-cd-pulse {
    animation: dp-cd-pulse-anim 0.6s ease-in-out infinite;
}
@keyframes dp-cd-hint-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

/* ---- DP 首页未登录 banner (P0-7 引导 DP 自己的 login/register) ---- */
.dp-login-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 18px;
    margin-bottom: 20px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 201, 167, 0.12), rgba(75, 123, 229, 0.12));
    border: 1px solid rgba(0, 201, 167, 0.25);
    color: var(--text, #e6e8eb);
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0, 201, 167, 0.08);
}
.dp-login-banner-text {
    flex: 1 1 auto;
    min-width: 0;
}
.dp-login-banner-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.dp-login-banner-link {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: 10px;
    color: var(--text, #e6e8eb);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}
.dp-login-banner-link:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
    color: #00C9A7;
}
.dp-login-banner-link-primary {
    background: linear-gradient(135deg, #00C9A7, #4B7BE5);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 201, 167, 0.3);
}
.dp-login-banner-link-primary:hover {
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(0, 201, 167, 0.4);
}
@media (max-width: 480px) {
    .dp-login-banner {
        flex-direction: row;            /* 保持一行 */
        align-items: center;
        padding: 10px 12px;             /* 紧凑 padding */
        gap: 6px;
    }
    .dp-login-banner-text {
        font-size: 12px;                /* 14 -> 12, 给按钮腾空间 */
        line-height: 1.3;
        flex: 1 1 auto;
        min-width: 0;
    }
    .dp-login-banner-actions {
        flex-shrink: 0;
        gap: 4px;
        width: auto;                    /* 不强制 100% */
    }
    .dp-login-banner-link {
        padding: 5px 9px;               /* 7px 14px -> 5px 9px */
        font-size: 11px;                /* 13 -> 11 */
        border-radius: 8px;
    }
}


/* ===== 跟读词交互：可点击单词 ===== */
.dp-clickable-word {
    color: var(--accent-blue);
    cursor: pointer;
    border-bottom: none;
    padding: 1px 4px 2px;
    border-radius: 3px;
    background: rgba(108,92,231,0.08);
    transition: all 0.15s ease;
    position: relative;
    box-shadow: 0 2px 8px rgba(108,92,231,0.15);
}
.dp-clickable-word:hover {
    color: var(--accent-purple);
    background: rgba(168,85,247,0.12);
    box-shadow: 0 2px 12px rgba(168,85,247,0.2);
}
.dp-clickable-word:active {
    transform: scale(0.95);
}
.dp-normal-word {
    color: var(--text-primary);
}

/* ===== 跟读词浮层 ===== */
.dp-word-popup-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(6px) saturate(100%);
    -webkit-backdrop-filter: blur(6px) saturate(100%);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.dp-word-popup-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.dp-word-popup {
    position: fixed;
    z-index: 9999;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0.92);
    width: calc(100% - 40px);
    max-width: 340px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.25s cubic-bezier(0.22, 1.2, 0.36, 1);
}
.dp-word-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.dp-word-popup-card {
    position: relative;
    background: var(--card-bg);
    border-radius: 18px;
    padding: 24px 22px 20px;
    border: 1.5px solid transparent;
    background-image: linear-gradient(var(--card-bg), var(--card-bg)),
        linear-gradient(135deg, var(--accent-blue), var(--accent-purple), var(--accent-pink));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    box-shadow: 0 20px 56px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dp-wp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.dp-wp-word-info {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}
.dp-wp-word {
    font-size: 22px;
    font-weight: 800;
    color: var(--accent-blue);
}
.dp-wp-phonetic {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 400;
}
.dp-wp-play {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--accent-green), var(--accent-teal));
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
    transition: transform 0.15s ease;
}
.dp-wp-play:active { transform: scale(0.9); }
.dp-wp-play svg { width: 18px; height: 18px; }

.dp-wp-meaning {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
}
.dp-wp-pos {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.12);
    padding: 1px 7px;
    border-radius: 4px;
    margin-right: 4px;
}
.dp-wp-example {
    font-size: 13px;
    color: var(--accent-blue);
    font-style: italic;
    line-height: 1.5;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
}
.dp-wp-save {
    width: 100%;
    padding: 10px 16px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.25);
    transition: all 0.2s ease;
}
.dp-wp-save:active { transform: scale(0.97); }
.dp-wp-save.saved {
    background: rgba(255,255,255,0.08);
    color: var(--text-muted);
    box-shadow: none;
    cursor: default;
}
.dp-wp-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.06);
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}
.dp-wp-close:hover { background: rgba(255,255,255,0.12); }

/* ===== 跟读模式首次提示 ===== */
.dp-follow-section {
    position: relative;
}
.dp-follow-tip {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%) translateY(-100%) scale(0.92);
    background: rgba(25, 25, 45, 0.96);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 12px;
    padding: 10px 16px 10px 14px;
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 100;
    pointer-events: none;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 10px;
}
.dp-follow-tip.active {
    opacity: 1;
    transform: translateX(-50%) translateY(-100%) scale(1);
    pointer-events: auto;
}
.dp-follow-tip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: rgba(25, 25, 45, 0.96);
    border-right: none;
    border-bottom: none;
    border-radius: 0 0 2px 0;
}
.dp-tip-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border-radius: 6px;
    color: white;
    font-size: 11px;
    font-weight: 700;
}
.dp-tip-close {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.3);
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    padding: 0;
    line-height: 1;
}
.dp-tip-close:hover {
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.6);
}

/* ===== 流动光边框 ===== */
.dp-flow-border {
    position: relative;
    border-radius: 16px;
}
.dp-flow-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 17px;
    background: conic-gradient(
        from var(--flow-angle, 0deg),
        transparent 0%,
        rgba(108,92,231,0.35) 15%,
        rgba(168,85,247,0.3) 30%,
        rgba(236,72,153,0.15) 45%,
        transparent 60%,
        transparent 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    padding: 1px;
    pointer-events: none;
    animation: dp-flow-rotate 4s linear infinite;
    z-index: 0;
}
@keyframes dp-flow-rotate {
    to { --flow-angle: 360deg; }
}
@property --flow-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

/* 亮色主题下降低透明度 */
[data-theme=light] .dp-flow-border::before {
    opacity: 0.35;
}

/* ===== 页面内容层（在微光之上） ===== */
.dp-question-page {
    position: relative;
    z-index: 1;
}

/* ===== 去AI感 - 亮色/护眼主题适配 ===== */
[data-theme=light] .dp-error-card { background: rgba(249,115,22,0.02); }
[data-theme=eye] .dp-error-card { background: rgba(249,115,22,0.015); }
[data-theme=light] .dp-error-type { box-shadow: none; }
[data-theme=eye] .dp-error-type { box-shadow: none; }
[data-theme=light] .dp-blank-word { box-shadow: 0 2px 6px rgba(168,85,247,0.12); }
[data-theme=eye] .dp-blank-word { box-shadow: 0 2px 6px rgba(168,85,247,0.08); }
[data-theme=light] .dp-clickable-word { background: rgba(108,92,231,0.06); box-shadow: none; }
[data-theme=eye] .dp-clickable-word { background: rgba(108,92,231,0.05); box-shadow: none; }
[data-theme=light] .dp-clickable-word:hover { background: rgba(168,85,247,0.1); }
[data-theme=eye] .dp-clickable-word:hover { background: rgba(168,85,247,0.08); }
