/* 闪卡模式样式 - 基于 deepseek_html_20260408_6b9dd2.html */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 闪卡模式变量 - 作用域限定在闪卡容器内 */
#flashcardModeContainer {
    --bg-gradient-start: #e0eafc;
    --bg-gradient-end: #cfdef3;
    --card-bg: rgba(255, 255, 255, 0.65);
    --card-border-inset: rgba(255, 255, 255, 0.5);
    --text-primary: #1e2a3e;
    --text-secondary: #2c3e50;
    --pos-bg: #d9e2ec;
    --pos-color: #2c5a7a;
    --pos-shadow-inset: rgba(0, 0, 0, 0.15);
    --pos-shadow-outset: rgba(255, 255, 255, 0.6);
    --counter-bg: #d9e2ec;
    --counter-color: #2c5a7a;
    --example-bg: rgba(255, 255, 255, 0.5);
    --example-border: rgba(0, 0, 0, 0.05);
    --btn-bg: #eef3fc;
    --btn-color: #2c5a7a;
    --btn-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.05);
    --btn-hover-bg: #4c9aff;
    --btn-hover-color: white;
    --btn-active-bg: #3a7ecf;
    --nav-btn-bg: rgba(255, 255, 255, 0.7);
    --nav-btn-color: #1e2a3e;
    --nav-btn-border: rgba(0, 0, 0, 0.05);
    --nav-btn-shadow: 0 8px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.05);
    --nav-btn-hover-bg: white;
    --progress-bg: rgba(0, 0, 0, 0.08);
    --progress-bar: linear-gradient(90deg, #4c9aff, #7fc9ff);
    --word-gradient: linear-gradient(135deg, #1f3b4c, #2c5a7a);
    --word-shadow: 2px 2px 4px rgba(0,0,0,0.1), 4px 4px 8px rgba(0,0,0,0.05);
    --glare-color: rgba(255, 255, 255, 0.5);
    --flip-bg: linear-gradient(145deg, #ffffff, #f3f7fc);
    --flip-border: rgba(255,255,255,0.8);
}

[data-theme="dark"] #flashcardModeContainer {
    --bg-gradient-start: #0f141e;
    --bg-gradient-end: #1a1f2e;
    --card-bg: rgba(22, 28, 40, 0.8);
    --card-border-inset: rgba(255, 255, 255, 0.12);
    --text-primary: #f0f4fa;
    --text-secondary: #cbd5e6;
    --pos-bg: #2a3446;
    --pos-color: #b8d0ff;
    --pos-shadow-inset: rgba(0, 0, 0, 0.5);
    --pos-shadow-outset: rgba(255, 255, 255, 0.08);
    --counter-bg: #2a3446;
    --counter-color: #b8d0ff;
    --example-bg: rgba(10, 15, 24, 0.6);
    --example-border: rgba(255, 255, 255, 0.12);
    --btn-bg: #2d3a52;
    --btn-color: #c6ddff;
    --btn-shadow: 0 6px 10px rgba(0, 0, 0, 0.4);
    --btn-hover-bg: #4f7ec9;
    --btn-active-bg: #3a5f9e;
    --nav-btn-bg: rgba(20, 28, 40, 0.7);
    --nav-btn-color: #e2ecff;
    --nav-btn-border: rgba(255, 255, 255, 0.1);
    --nav-btn-shadow: 0 10px 20px rgba(0, 0, 0, 0.4), 0 4px 8px rgba(0, 0, 0, 0.3);
    --nav-btn-hover-bg: rgba(60, 80, 120, 0.7);
    --progress-bg: rgba(255, 255, 255, 0.12);
    --progress-bar: linear-gradient(90deg, #6ea8fe, #a3c9ff);
    --word-gradient: linear-gradient(135deg, #d9ebff, #f5faff);
    --word-shadow: 0 0 16px rgba(110, 168, 254, 0.5), 2px 4px 10px rgba(0, 0, 0, 0.4);
    --glare-color: rgba(255, 255, 255, 0.2);
    --flip-bg: linear-gradient(145deg, #1e2638, #2a3448);
    --flip-border: rgba(255,255,255,0.15);
}

/* 闪卡模式容器 */
#flashcardModeContainer {
    position: relative;
    width: 100%;
    flex: 1;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 12px;
    box-sizing: border-box;
    gap: 8px;
}

/* 统一头部样式 - 闪卡模式内联布局 */
#flashcardModeContainer .fill-header {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    z-index: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 0;
    padding: 10px 16px 12px;
    border-bottom: 2px solid var(--border);
    background: transparent;
    border-radius: 24px 24px 0 0;
    width: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
}

#flashcardModeContainer .fill-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.3px;
}

/* 统一进度条样式 - 闪卡模式内联布局 */
#flashcardModeContainer .fill-progress-wrap {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    translate: none;
    z-index: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    margin-bottom: 0;
    padding: 6px 10px;
    background: var(--card-bg);
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    width: 100%;
    box-sizing: border-box;
}

#flashcardModeContainer .fill-progress-track {
    flex: 1;
    height: 8px;
    background: var(--progress-bg);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.08);
}

#flashcardModeContainer .fill-progress-fill {
    height: 100%;
    background: var(--progress-bar);
    border-radius: 4px;
    transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

#flashcardModeContainer .fill-progress-text {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    white-space: nowrap;
    min-width: 80px;
    text-align: right;
    transition: color 0.3s;
    letter-spacing: 0.3px;
}

/* 暗色模式适配 */
[data-theme="dark"] #flashcardModeContainer .fill-progress-wrap {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
}

[data-theme="dark"] #flashcardModeContainer .fill-progress-track {
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
    background: rgba(255,255,255,0.06);
}

/* 闪卡容器 - 居中并自适应大小，保持固定宽高比 1000:827，同时受宽高双向约束 */
.card-3d {
    width: min(85vw, 1000px, calc(85vh * 1.209));
    aspect-ratio: 1000 / 827;
    height: auto;
    border-radius: 48px;
    padding: 0;
    box-shadow: 0 25px 40px -12px rgba(0,0,0,0.25), 0 0 0 1px var(--card-border-inset) inset;
    transform-style: preserve-3d;
    position: relative;
    background: var(--card-bg);
}

.card-3d.flipped .glare {
    opacity: 0 !important;
    transition: none;
}

.card-face {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    padding: clamp(24px, 4vw, 40px);
    border-radius: inherit;
    overflow: hidden;
    backdrop-filter: blur(18px);
}

.card-back {
    transform: rotateY(180deg);
    justify-content: center;
    align-items: center;
}

.card-front {
    overflow: visible;
}

#exampleArea {
    position: relative;
}

#magicCard .card-face .fill-bottom {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    flex-direction: column;
    gap: 0;
    z-index: 10;
    width: 46px;
    padding: 0;
    background-color: transparent;
    border-width: 1.5px;
    border-style: solid;
    border-color: var(--border);
    border-radius: 999px;
    box-shadow: none;
    overflow: hidden;
}

#magicCard .card-face .fill-bottom button {
    width: 100%;
    height: 46px;
    border-radius: 0;
    border: none;
    flex-shrink: 0;
}

#magicCard .card-face .fill-bottom button:first-child {
    border-bottom: 1px solid var(--border);
}

/* 响应式字体大小 */
.word {
    font-size: clamp(2.2rem, 7vw, 4rem);
}

.flip-front {
    font-size: clamp(2rem, 5.5vw, 3.5rem);
}

.flip-back {
    font-size: clamp(1.4rem, 3.5vw, 2.4rem);
}

.meaning {
    font-size: clamp(1.1rem, 2.8vw, 1.5rem);
}

.glare {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border-radius: inherit;
    background: radial-gradient(circle at 0% 0%, var(--glare-color) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: soft-light;
}

.content {
    position: relative;
    z-index: 2;
    color: var(--text-primary);
}

/* 纯图标按钮（无文字） */
.icon-only-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--btn-bg);
    border: none;
    color: var(--btn-color);
    width: 44px;
    height: 44px;
    border-radius: 40px;
    cursor: pointer;
    box-shadow: var(--btn-shadow);
    transition: all 0.2s;
    transform: translateY(-1px);
    backdrop-filter: blur(4px);
    border: 1px solid var(--example-border);
    padding: 0;
}
.icon-only-btn:hover {
    background: var(--btn-hover-bg);
    color: var(--btn-hover-color);
    box-shadow: 0 10px 16px rgba(0,0,0,0.3);
    transform: translateY(-3px);
}
.icon-only-btn:active {
    background: var(--btn-active-bg);
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transform: translateY(1px);
}
.icon-only-btn svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 胶囊按钮 */
.capsule-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 56px;
    height: 80px;
    background: var(--btn-bg);
    border-radius: 28px;
    box-shadow: var(--btn-shadow);
    border: 1px solid var(--example-border);
    overflow: hidden;
    transition: all 0.2s ease;
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    justify-self: center;
}

.capsule-button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 16px rgba(0,0,0,0.3);
}

.capsule-btn {
    flex: 1;
    width: 100%;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: var(--btn-color);
}

.capsule-btn:hover {
    background: #3b82f6;
    color: white;
}

.capsule-btn:active {
    background: #2563eb;
    transform: scale(0.95);
}

.capsule-btn svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 隐藏/显示翻译按钮特定样式 */
button#toggleTranslationBtn {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

/* 生成例句按钮特定样式 */
button#generateExampleBtn {
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

.capsule-divider {
    width: 80%;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

/* 单词区域 */
.word-section {
    text-align: center;
    margin-bottom: 14px;
    padding-top: 8px;
}
.word-section.animate .word {
    animation: fadeSlide 0.25s ease-out;
}
@keyframes fadeSlide {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

.word {
    font-size: clamp(2.5rem, 10vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    background: var(--word-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: var(--word-shadow);
    display: block;
    margin-bottom: 10px;
}
.pos {
    font-size: clamp(0.8rem, 2.5vw, 0.95rem);
    background: var(--pos-bg);
    display: inline-block;
    padding: 5px 14px;
    border-radius: 40px;
    margin-bottom: 10px;
    color: var(--pos-color);
    box-shadow: inset 0 2px 5px var(--pos-shadow-inset), 0 1px 0 var(--pos-shadow-outset);
    font-weight: 500;
    backdrop-filter: blur(4px);
}
.meaning {
    font-size: clamp(1rem, 3.5vw, 1.35rem);
    color: var(--text-secondary);
    font-weight: 500;
    display: block;
}

/* 例句区域 — 左侧文本，右侧竖直按钮 */
.example-area {
    background: var(--example-bg);
    border-radius: 20px;
    padding: 16px 72px 16px 18px;
    margin: 0 0 14px;
    border: 1px solid var(--example-border);
    backdrop-filter: blur(8px);
    transition: all 0.25s;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: start;
    gap: 6px 12px;
    flex: 1;
    min-height: 72px;
}
.example-en {
    font-size: clamp(0.85rem, 2.5vw, 1rem);
    line-height: 1.5;
    margin-bottom: 0;
    font-style: italic;
    color: var(--text-primary);
    grid-column: 1;
    grid-row: 1;
}
.example-zh {
    font-size: clamp(0.75rem, 2.2vw, 0.9rem);
    color: var(--text-secondary);
    transition: opacity 0.2s;
    grid-column: 1;
    grid-row: 2;
}
.hide-zh .example-zh {
    display: none;
}

.button-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

/* 响应式调整按钮大小 */
.icon-only-btn {
    width: clamp(36px, 8vw, 44px);
    height: clamp(36px, 8vw, 44px);
}

.capsule-button {
    width: clamp(48px, 10vw, 56px);
    height: clamp(80px, 20vw, 100px);
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
    justify-self: center;
}

.nav-btn {
    padding: clamp(10px, 2.5vw, 12px) clamp(20px, 5vw, 26px);
    font-size: clamp(0.85rem, 2vw, 0.95rem);
}

.counter {
    font-size: clamp(0.85rem, 2vw, 0.95rem);
    padding: clamp(6px, 1.5vw, 8px) clamp(14px, 3.5vw, 18px);
}

/* 翻转模式 */
.flip-mode .pos,
.flip-mode .meaning {
    display: none !important;
}
.flip-container {
    perspective: 1200px;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}
.flipper {
    position: relative;
    width: 100%;
    max-width: 80vw;
    height: clamp(100px, 25vw, 140px);
    transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
    cursor: pointer;
    margin: 0 auto;
}
.flip-mode .flipper:hover {
    transform: rotateY(180deg);
}
.flip-front, .flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 36px;
    background: var(--flip-bg);
    box-shadow: 0 15px 25px -8px rgba(0,0,0,0.2), inset 0 0 0 1px var(--flip-border);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(12px);
}
.flip-front {
    transform: rotateY(0deg);
    font-size: 2.8rem;
    font-weight: 800;
    background: var(--word-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: var(--word-shadow);
}
.flip-back {
    transform: rotateY(180deg);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.4;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--example-border);
}

/* 导航按钮容器 */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0;
    gap: 12px;
}

/* 导航按钮：阴影强化 + 反向3D倾斜（通过CSS变量实现） */
.nav-btn {
    --btn-rotate-x: 0deg;
    --btn-rotate-y: 0deg;
    background: var(--nav-btn-bg);
    border: 1px solid var(--nav-btn-border);
    color: var(--nav-btn-color);
    padding: 12px 26px;
    border-radius: 60px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    backdrop-filter: blur(8px);
    box-shadow: var(--nav-btn-shadow);
    transition: box-shadow 0.2s, background 0.2s, transform 0.1s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    transform: perspective(400px) rotateX(calc(var(--btn-rotate-x) * -1)) rotateY(calc(var(--btn-rotate-y) * -1));
    will-change: transform;
}
.nav-btn svg {
    width: 18px; height: 18px;
    stroke: currentColor;
    stroke-width: 2.2;
    fill: none;
}
/* 悬停时叠加额外旋转，与动态倾斜共存 */
.nav-btn:hover {
    background: var(--nav-btn-hover-bg);
    box-shadow: 0 18px 28px rgba(0, 0, 0, 0.25), 0 6px 12px rgba(0, 0, 0, 0.15);
    transform: perspective(400px) rotateX(calc(var(--btn-rotate-x) * -1 - 5deg)) rotateY(calc(var(--btn-rotate-y) * -1 - 5deg)) scale(1.03);
}
.nav-btn:active {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: perspective(400px) rotateX(calc(var(--btn-rotate-x) * -1 - 2deg)) rotateY(calc(var(--btn-rotate-y) * -1 - 2deg)) scale(0.97);
}

.counter {
    font-size: 0.95rem;
    background: var(--counter-bg);
    padding: 8px 18px;
    border-radius: 60px;
    color: var(--counter-color);
    box-shadow: inset 0 2px 6px var(--pos-shadow-inset), 0 1px 0 var(--pos-shadow-outset);
    font-weight: 500;
    backdrop-filter: blur(4px);
}

/* 评级反馈覆盖层 */
.feedback-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    background: var(--card-bg);
    backdrop-filter: blur(8px);
    border-radius: inherit;
    animation: feedbackFadeIn 0.25s ease-out;
}

@keyframes feedbackFadeIn {
    0% { opacity: 0; transform: scale(0.92); }
    100% { opacity: 1; transform: scale(1); }
}

.feedback-content {
    text-align: center;
    padding: 20px;
}

.feedback-icon {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
}

.feedback-icon.feedback-known {
    color: #22c55e;
}

.feedback-icon.feedback-vague {
    color: #f59e0b;
}

.feedback-icon.feedback-unknown {
    color: #ef4444;
}

.feedback-text {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.feedback-text.feedback-known {
    color: #22c55e;
}

.feedback-text.feedback-vague {
    color: #f59e0b;
}

.feedback-text.feedback-unknown {
    color: #ef4444;
}

.feedback-detail {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 280px;
    margin: 0 auto;
    word-break: break-all;
}

.feedback-detail strong {
    color: var(--text-primary);
    font-weight: 700;
}

/* 掌握度评级按钮 */
.mastery-ratings {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
}

.mastery-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 18px;
    border: 1px solid var(--example-border, rgba(0,0,0,0.1));
    background: var(--card-bg);
    color: var(--text-secondary);
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    font-family: inherit;
}

.mastery-btn:hover:not(.active) {
    background: var(--btn-hover-bg, #eef3fc);
    color: var(--btn-hover-color, #1e2a3e);
    border-color: var(--btn-hover-bg, #4c9aff);
}

.mastery-btn.active {
    background: var(--accent, #3b82f6);
    color: white;
    border-color: var(--accent, #3b82f6);
}

.mastery-btn.unknown.active {
    background: #ef4444;
    border-color: #ef4444;
}

.mastery-btn.vague.active {
    background: #f59e0b;
    border-color: #f59e0b;
}

.mastery-btn.known.active {
    background: #22c55e;
    border-color: #22c55e;
}

.mastery-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* 旋转动画 */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 空状态样式 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 400px;
    text-align: center;
    padding: 20px;
}

.empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.empty-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    opacity: 0.8;
}

@media (max-width: 550px) {
    .card-3d { 
        padding: 16px; 
        width: min(98vw, 680px);
    }
    .flip-front { font-size: 2rem; }
    .flip-back { font-size: 1.5rem; }
    .nav-btn { padding: 8px 16px; font-size: 0.85rem; }
}

/* ================================================================
   移动端闪卡模式优化
   ================================================================ */

@media (max-width: 640px) {
    #flashcardModeContainer {
        padding: 8px;
        gap: 6px;
        min-height: 0;
    }

    #flashcardModeContainer .fill-header {
        padding: 8px 12px 10px;
        gap: 8px;
        border-radius: 18px 18px 0 0;
    }

    #flashcardModeContainer .fill-header h3 {
        font-size: 15px;
    }

    /* 卡片尺寸调整：移动端留更多呼吸空间 */
    .card-3d {
        width: min(96vw, 600px);
        height: auto;
        min-height: 420px;
        aspect-ratio: 600 / 496;
        border-radius: 32px;
        box-shadow: 0 15px 30px -8px rgba(0,0,0,0.2), 0 0 0 1px var(--card-border-inset) inset;
    }

    .card-face {
        padding: 20px 16px;
    }

    /* 单词区域 */
    .word-section {
        padding-top: 6px;
        margin-bottom: 8px;
    }

    .word {
        font-size: clamp(2rem, 8vw, 2.8rem);
        margin-bottom: 8px;
    }

    .pos {
        font-size: 0.75rem;
        padding: 4px 10px;
        margin-bottom: 8px;
    }

    .meaning {
        font-size: clamp(0.9rem, 3.5vw, 1.1rem);
    }

    /* 例句区域 */
    .example-area {
        padding: 12px 56px 12px 12px;
        margin: 0 0 8px;
        border-radius: 16px;
        gap: 4px 10px;
        min-height: 60px;
        flex: 0 0 auto;
    }

    .example-en {
        font-size: 0.8rem;
    }

    .example-zh {
        font-size: 0.7rem;
    }

    /* 右侧胶囊按钮：缩小并贴边 */
    #magicCard .card-face .fill-bottom {
        right: 4px;
        width: 40px;
        margin-left: 0;
        margin-right: 0;
        border-radius: 20px;
        border-width: 1px;
    }

    #magicCard .card-face .fill-bottom button {
        height: 40px;
    }

    /* 导航按钮 */
    .nav-buttons {
        margin-top: 8px;
        gap: 8px;
    }

    .nav-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
        border-radius: 50px;
        gap: 4px;
    }

    .nav-btn svg {
        width: 16px;
        height: 16px;
    }

    .counter {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    /* 掌握度评级按钮 */
    .mastery-ratings {
        margin-top: 8px;
        gap: 6px;
    }

    .mastery-btn {
        padding: 6px 12px;
        font-size: 11px;
        border-radius: 16px;
        gap: 4px;
    }

    .mastery-btn svg {
        width: 14px;
        height: 14px;
    }

    .mastery-btn span {
        display: inline;
    }

    /* 进度条 */
    #flashcardModeContainer .fill-progress-wrap {
        margin-top: 8px;
        padding: 5px 8px;
        border-radius: 10px;
    }

    #flashcardModeContainer .fill-progress-track {
        height: 6px;
    }

    #flashcardModeContainer .fill-progress-text {
        font-size: 10px;
        min-width: 60px;
    }

    /* 反馈覆盖层 */
    .feedback-overlay {
        border-radius: 32px;
    }

    .feedback-content {
        padding: 12px;
    }

    .feedback-icon {
        font-size: 40px;
    }

    .feedback-text {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .feedback-detail {
        font-size: 12px;
        max-width: 240px;
    }

    /* 翻转模式 */
    .flipper {
        max-width: 90vw;
        height: clamp(80px, 22vw, 110px);
    }

    .flip-front {
        font-size: 1.8rem;
        border-radius: 28px;
    }

    .flip-back {
        font-size: 1.3rem;
        border-radius: 28px;
    }

    /* 暗色模式 */
    [data-theme="dark"] .card-3d {
        box-shadow: 0 15px 30px -8px rgba(0,0,0,0.4), 0 0 0 1px var(--card-border-inset) inset;
    }
}

/* 超小屏：极致紧凑 */
@media (max-width: 380px) {
    .card-3d {
        border-radius: 24px;
        min-height: 380px;
    }

    .card-face {
        padding: 14px 10px;
    }

    .word {
        font-size: 1.6rem;
        margin-bottom: 4px;
    }

    .pos {
        font-size: 0.7rem;
        padding: 3px 8px;
        margin-bottom: 4px;
    }

    .meaning {
        font-size: 0.85rem;
    }

    .example-area {
        padding: 8px 48px 8px 10px;
        margin: 0 0 6px;
        border-radius: 12px;
        gap: 2px 8px;
    }

    .example-en {
        font-size: 0.7rem;
    }

    .example-zh {
        font-size: 0.65rem;
    }

    #magicCard .card-face .fill-bottom {
        width: 36px;
    }

    #magicCard .card-face .fill-bottom button {
        height: 36px;
    }

    .nav-btn {
        padding: 6px 10px;
        font-size: 0.7rem;
    }

    .nav-btn svg {
        width: 14px;
        height: 14px;
    }

    .mastery-btn {
        padding: 5px 10px;
        font-size: 10px;
        border-radius: 14px;
    }

    .mastery-btn svg {
        width: 12px;
        height: 12px;
    }

    .counter {
        font-size: 0.7rem;
        padding: 4px 10px;
    }

    .feedback-overlay {
        border-radius: 24px;
    }

    .feedback-icon {
        font-size: 32px;
    }

    .feedback-text {
        font-size: 16px;
    }
}

/* 统一总结样式 - 使用 fill-practice.css 中的 .fill-summary 系列样式 */
/* 闪卡模式总结页面在卡片背面，使用 fill-summary 结构 */
#flashcardModeContainer .card-back .fill-summary {
    padding: 8px 0;
    width: 100%;
}

#flashcardModeContainer .card-back .fill-summary-title {
    font-size: 22px;
}

#flashcardModeContainer .card-back .fill-summary-stat {
    padding: 8px 14px;
    min-width: 60px;
}

#flashcardModeContainer .card-back .fill-summary-val {
    font-size: 22px;
}

/* 暗色模式适配 - 总结统计卡片 */
[data-theme="dark"] #flashcardModeContainer .card-back .fill-summary-stat {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.08);
}