/* 全局重置，黑白极简风格 */
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }
body { background-color: #ffffff; color: #111111; display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
.app { width: 100%; max-width: 680px; background: #fff; border: 1px solid #ddd; border-radius: 28px; padding: 28px 24px 32px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.04); transition: all 0.2s ease; }
.hidden { display: none !important; }

/* 顶部导航 */
.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; border-bottom: 1px solid #eee; padding-bottom: 12px; }
.top-bar h1 { font-size: 1.6rem; font-weight: 600; letter-spacing: -0.5px; color: #111; }
.top-bar .sub { font-size: 0.8rem; font-weight: 400; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }

/* 首页菜单 */
.menu-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 18px 0 12px; }

/* 【修复点】：专门处理使用 a 标签的菜单卡片 */
a.menu-card { text-decoration: none; color: inherit; }

.menu-card { background: #ffffff; border: 1.5px solid #111; border-radius: 20px; padding: 22px 24px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: background 0.15s, color 0.15s, transform 0.1s; box-shadow: 0 4px 0 #000; user-select: none; text-decoration: none; }
.menu-card:hover { background: #111; color: #fff; }
.menu-card:active { transform: translateY(2px); box-shadow: 0 2px 0 #000; }
.menu-card .menu-title { font-size: 1.4rem; font-weight: 600; letter-spacing: -0.3px; }
.menu-card .menu-desc { font-size: 0.9rem; color: #666; transition: color 0.15s; font-weight: 400; }

/* 【核心修复】：悬浮时强制所有文字（包括 <a> 标签里的）都变成纯白色 */
.menu-card:hover,
.menu-card:hover .menu-title,
.menu-card:hover .menu-desc {
    color: #fff !important;
}

/* 选项面板 */
.option-panel { background: #fafafa; border: 1px solid #ddd; border-radius: 20px; padding: 24px; margin-top: 8px; margin-bottom: 24px; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.option-panel h3 { font-size: 1.1rem; font-weight: 500; margin-bottom: 20px; color: #111; letter-spacing: -0.2px; border-left: 4px solid #000; padding-left: 12px; }
.option-buttons { display: flex; gap: 14px; flex-wrap: wrap; }
.vocab-source-list { display: flex; flex-direction: column; gap: 10px; max-height: 340px; overflow-y: auto; padding-right: 4px; }
.vocab-source-list .btn { text-align: left; padding: 12px 20px; font-size: 0.95rem; }

/* 按钮 */
.btn { background: #fff; border: 1.5px solid #111; border-radius: 60px; padding: 14px 28px; font-size: 1rem; font-weight: 500; color: #111; cursor: pointer; transition: all 0.12s; flex: 1 0 auto; text-align: center; box-shadow: 0 2px 0 #000; user-select: none; letter-spacing: -0.2px; text-decoration: none; }
.btn:hover { background: #111; color: #fff; }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 #000; }
.btn-small { padding: 10px 18px; font-size: 0.9rem; box-shadow: 0 1.5px 0 #000; }

/* 练习卡片 */
.practice-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.practice-header .mode-label { font-size: 0.85rem; color: #888; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500; }
.progress-indicator { font-size: 0.9rem; font-weight: 500; color: #111; background: #f2f2f2; padding: 6px 16px; border-radius: 40px; }
.question-card { background: #fff; border: 1.5px solid #111; border-radius: 24px; padding: 32px 24px 28px; margin-bottom: 24px; box-shadow: 0 6px 0 #000; }
.question-text { font-size: 2.4rem; font-weight: 600; text-align: center; letter-spacing: -0.02em; word-break: break-word; line-height: 1.3; margin-bottom: 12px; }
.question-sub { text-align: center; color: #777; font-size: 0.95rem; margin-bottom: 20px; font-weight: 400; }
.options-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 8px; }
.option-item { background: #fff; border: 1px solid #ddd; border-radius: 16px; padding: 16px 20px; font-size: 1.1rem; font-weight: 500; color: #111; cursor: pointer; transition: all 0.1s; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 1px 0 #eee; user-select: none; word-break: break-word; }
.option-item:hover { background: #f5f5f5; border-color: #111; }
.option-item.selected { background: #111; color: #fff; border-color: #111; }
.option-item.correct { background: #e8f5e9 !important; color: #1b5e20 !important; border-color: #4caf50 !important; font-weight: 600; }
.option-item.wrong { background: #ffebee !important; color: #b71c1c !important; border-color: #f44336 !important; text-decoration: line-through; }
.option-item .check-icon { font-size: 1.2rem; font-weight: 600; }

/* 例句模块 */
.example-block { margin-top: 20px; padding-top: 20px; border-top: 1px dashed #ccc; animation: fadeIn 0.3s ease; }
.example-en { font-size: 1.1rem; color: #111; font-weight: 500; margin-bottom: 8px; word-break: break-word; }
.example-cn { font-size: 0.95rem; color: #666; word-break: break-word; }
.feedback-area { background: #f9f9f9; border-radius: 18px; padding: 20px 22px; margin-top: 20px; border-left: 5px solid #111; }
.feedback-title { font-weight: 600; font-size: 1rem; margin-bottom: 6px; }
.feedback-text { color: #333; font-size: 0.98rem; line-height: 1.6; }

/* 操作栏 */
.action-bar { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; flex-wrap: wrap; gap: 12px; }
.action-left { display: flex; gap: 12px; align-items: center; }
.icon-btn { background: none; border: 1px solid #ddd; border-radius: 40px; padding: 10px 16px; font-size: 0.9rem; cursor: pointer; transition: all 0.1s; color: #555; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; text-decoration: none; }
.icon-btn:hover { background: #f0f0f0; border-color: #111; color: #111; }
.icon-btn.active { background: #111; color: #fff; border-color: #111; }
.icon-only-btn { background: none; border: 1px solid #ddd; border-radius: 40px; padding: 10px; cursor: pointer; transition: all 0.1s; color: #555; display: inline-flex; align-items: center; justify-content: center; }
.icon-only-btn:hover { background: #f0f0f0; border-color: #111; color: #111; }
.icon-only-btn svg { width: 18px; height: 18px; }

/* 词汇集卡片 */
.vocab-card { background: #fff; border: 1.5px solid #111; border-radius: 24px; padding: 40px 24px; margin-bottom: 24px; box-shadow: 0 6px 0 #000; text-align: center; min-height: 200px; display: flex; flex-direction: column; justify-content: center; }
.vocab-word { font-size: 3rem; font-weight: 700; letter-spacing: -0.02em; word-break: break-word; line-height: 1.2; margin-bottom: 12px; }
.vocab-pos { font-size: 1rem; color: #888; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 20px; font-weight: 500; }
.vocab-meaning { font-size: 1.6rem; color: #111; background: #f5f5f5; padding: 16px 20px; border-radius: 60px; margin: 0 auto 20px; max-width: 95%; word-break: break-word; font-weight: 500; border: 1px dashed #ddd; }
.vocab-example-box { text-align: left; background: #fafafa; padding: 16px; border-radius: 12px; border-left: 4px solid #111; }
.vocab-example-en { font-size: 1rem; color: #111; margin-bottom: 6px; font-weight: 500; }
.vocab-example-cn { font-size: 0.9rem; color: #666; }

/* 词汇集导航 */
.vocab-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; gap: 12px; }
.vocab-nav .btn { flex: 1; text-align: center; font-size: 1rem; padding: 14px 0; }
.vocab-index { font-size: 0.9rem; color: #888; min-width: 80px; text-align: center; font-weight: 500; }
.footer { margin-top: 32px; text-align: center; font-size: 0.75rem; color: #aaa; border-top: 1px solid #eee; padding-top: 18px; letter-spacing: 0.3px; }

/* 单词拼写模块专用样式 */
.spelling-hint { display: flex; justify-content: center; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 2.2rem; font-weight: 600; color: #111; margin-bottom: 20px; }
.spelling-input { width: 40px; height: 50px; font-size: 2.2rem; font-weight: 600; text-align: center; border: none; border-bottom: 3px solid #111; background: transparent; color: #111; outline: none; padding: 0; margin: 0; transition: all 0.15s; text-transform: lowercase; }
.spelling-input:focus { border-bottom-color: #0ea5e9; }
.spelling-input.wrong { color: #b71c1c; border-bottom-color: #f44336; background-color: #ffebee; border-radius: 6px 6px 0 0; }
.spelling-input.correct { color: #1b5e20; border-bottom-color: #4caf50; background-color: #e8f5e9; border-radius: 6px 6px 0 0; }

/* 统计弹窗 */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.5); display: flex; justify-content: center; align-items: center; z-index: 9999; backdrop-filter: blur(2px); }
.modal-content { background: #fff; padding: 32px 24px; border-radius: 24px; text-align: center; border: 2px solid #111; box-shadow: 0 10px 40px rgba(0,0,0,0.2); max-width: 360px; width: 90%; animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes popIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } }
.modal-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 24px; color: #111; }
.modal-stats-text { font-size: 1.1rem; color: #555; margin-bottom: 8px; }
.modal-rate-text { font-size: 2.4rem; font-weight: 800; color: #0ea5e9; margin-bottom: 24px; }

@media (max-width: 500px) {
    .app { padding: 20px 16px; }
    .question-text { font-size: 1.8rem; }
    .menu-card { padding: 18px 20px; }
    .menu-card .menu-title { font-size: 1.2rem; }
    .btn { padding: 12px 20px; font-size: 0.9rem; }
    .option-item { padding: 14px 16px; font-size: 1rem; }
    .vocab-word { font-size: 2.2rem; }
    .vocab-meaning { font-size: 1.3rem; }
    .spelling-hint { font-size: 1.8rem; }
    .spelling-input { width: 30px; height: 40px; font-size: 1.8rem; }
}