:root {
  --primary: #4a6572;
  --bg: #f9f8f4;
  --accent: #ffeb99;
  --text: #333;
  --white: #fff;
  --success: #27ae60;
  --error: #e74c3c;
  --border: #e0e0e0;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { font-family: -apple-system, sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; }
.safe-area { max-width: 600px; margin: 0 auto; min-height: 100vh; padding-bottom: 30px; }

/* 登录页 */
.login-container { padding: 40px 24px; text-align: center; }
.logo-title { font-size: 24px; font-weight: bold; color: var(--primary); margin-bottom: 40px; }
.input-group { background: var(--white); border-radius: 12px; overflow: hidden; margin-bottom: 24px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.input-item { display: flex; align-items: center; padding: 16px; border-bottom: 1px solid var(--border); }
.input-item:last-child { border-bottom: none; }
.input-item label { width: 80px; text-align: left; font-size: 14px; color: #666; }
.input-item input { flex: 1; border: none; outline: none; font-size: 16px; }
.btn-primary { background: var(--primary); color: var(--white); border: none; border-radius: 12px; padding: 16px; width: 100%; font-size: 18px; font-weight: 600; cursor: pointer; }

/* 首页卡片 */
.user-card { background: var(--white); border-radius: 16px; padding: 24px; margin: 20px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); border-top: 4px solid var(--primary); }
.welcome { font-size: 14px; color: #888; }
.user-name { font-size: 22px; font-weight: bold; margin: 8px 0; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.stat-box { background: var(--bg); padding: 16px; border-radius: 10px; }
.stat-label { font-size: 12px; color: #888; }
.stat-val { font-size: 18px; font-weight: bold; color: var(--primary); }

/* 功能列表 */
.menu-list { list-style: none; padding: 0 20px; }
.menu-item { background: var(--white); border-radius: 16px; margin-bottom: 16px; box-shadow: 0 4px 12px rgba(0,0,0,0.05); border-left: 6px solid var(--primary); }
.menu-link { display: flex; align-items: center; padding: 24px; text-decoration: none; color: var(--text); }
.menu-icon { width: 40px; height: 40px; background: #f0f4f7; border-radius: 10px; margin-right: 16px; display: flex; align-items: center; justify-content: center; color: var(--primary); }
.menu-info h3 { font-size: 18px; font-weight: bold; }
.menu-info p { font-size: 14px; color: #888; margin-top: 4px; }

/* 题目页面 */
.top-bar { position: sticky; top: 0; background: var(--primary); color: white; display: flex; justify-content: space-between; padding: 12px 20px; z-index: 100; }
.q-area { background: var(--white); padding: 24px; margin: 15px; border-radius: 12px; border-left: 4px solid var(--accent); }
.q-type { display: inline-block; background: var(--accent); padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: bold; margin-bottom: 12px; }
.q-title { font-size: 18px; line-height: 1.6; }
.options { padding: 0 15px; }
.opt-item { background: var(--white); border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 15px; display: flex; align-items: center; cursor: pointer; transition: 0.2s; }
.opt-marker { width: 24px; height: 24px; background: #eee; border-radius: 50%; text-align: center; line-height: 24px; margin-right: 12px; font-weight: bold; }
.opt-item.selected { border-color: #3498db; background: rgba(52, 152, 219, 0.05); }
.opt-item.correct { border-color: var(--success); background: rgba(39, 174, 96, 0.1); }
.opt-item.wrong { border-color: var(--error); background: rgba(231, 76, 60, 0.1); }
.correct .opt-marker { background: var(--success); color: white; }
.wrong .opt-marker { background: var(--error); color: white; }

.analysis { background: #f8f9fa; margin: 15px; padding: 16px; border-radius: 10px; border-left: 4px solid #ddd; }
.nav-footer { margin-top: 30px; display: flex; gap: 15px; padding: 0 15px; }
.btn-nav { flex: 1; padding: 14px; border-radius: 10px; border: none; font-weight: bold; cursor: pointer; }
.btn-prev { background: #7f8c8d; color: white; }
.btn-next { background: var(--primary); color: white; }

/* 题号弹窗 */
.modal-overlay { position: fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.5); display:none; z-index: 200; }
.num-modal { position: fixed; bottom:0; left:0; width:100%; background:white; border-radius: 20px 20px 0 0; padding:24px; transform:translateY(100%); transition:0.3s; z-index: 201; }
.num-modal.active { transform:translateY(0); }
.num-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; max-height: 300px; overflow-y: auto; }
.num-item { padding: 10px; background: #eee; text-align: center; border-radius: 8px; font-weight: bold; }
.num-item.correct { background: var(--success); color: white; }
.num-item.wrong { background: var(--error); color: white; }
.num-item.active { border: 2px solid var(--primary); }

.bottom-actions { position: fixed; bottom: 0; left: 0; width: 100%; background: white; padding: 12px 20px; border-top: 1px solid #eee; display: flex; justify-content: space-between; gap: 15px; }
.btn-submit { background: #e74c3c; color: white; padding: 12px 30px; border-radius: 8px; border: none; font-weight: bold; }
