/* 移动端基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1890ff;
    --success: #52c41a;
    --error: #ff4d4f;
    --bg: #f5f5f5;
    --text: #333;
    --text-secondary: #666;
    --border: #e8e8e8;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* 顶部导航 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 500;
    z-index: 100;
}

/* 主内容区 */
.main {
    padding: 60px 16px 70px;
    max-width: 600px;
    margin: 0 auto;
}

/* 底部导航 */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    border-top: 1px solid var(--border);
    display: flex;
    z-index: 100;
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    transition: color 0.2s;
}

.tab-item.active {
    color: var(--primary);
}

.tab-item .icon {
    font-size: 22px;
    margin-bottom: 2px;
}

/* 卡片 */
.card {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 6px;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:active {
    background: #096dd9;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-outline {
    border: 1px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

/* 选项按钮 */
.option-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-item {
    display: flex;
    align-items: flex-start;
    padding: 14px 16px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.option-item:active {
    transform: scale(0.98);
}

.option-item.selected {
    border-color: var(--primary);
    background: #e6f7ff;
}

.option-item.correct {
    border-color: var(--success);
    background: #f6ffed;
}

.option-item.wrong {
    border-color: var(--error);
    background: #fff2f0;
}

.option-item.disabled {
    pointer-events: none;
}

.option-letter {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}

.option-item.correct .option-letter {
    background: var(--success);
    color: white;
}

.option-item.wrong .option-letter {
    background: var(--error);
    color: white;
}

.option-text {
    flex: 1;
    line-height: 1.5;
}

/* 题目内容 */
.question-type {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.question-text {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 20px;
    white-space: pre-wrap;
}

/* 进度条 */
.progress-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin-bottom: 16px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s;
}

/* 结果页面 */
.result-icon {
    font-size: 64px;
    text-align: center;
    margin-bottom: 16px;
}

.result-text {
    text-align: center;
    font-size: 18px;
    margin-bottom: 24px;
}

.result-text.success {
    color: var(--success);
}

.result-text.error {
    color: var(--error);
}

/* 错题本 */
.wrong-item {
    padding: 12px;
    background: white;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid var(--error);
}

.wrong-item .q-text {
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--text);
}

.wrong-item .q-info {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.stat-value {
    font-size: 28px;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* 模式选择 */
.mode-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.mode-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.mode-item:active {
    transform: scale(0.98);
}

.mode-item.selected {
    border-color: var(--primary);
    background: #e6f7ff;
}

.mode-item .icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.mode-item .title {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 4px;
}

.mode-item .desc {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 空状态 */
.empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty .icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* 隐藏 */
.hidden {
    display: none !important;
}

/* 多选确认按钮 */
.confirm-btn-wrap {
    margin-top: 20px;
    text-align: center;
}