/* ============================================
   CFBT 教学平台 — 参照 075098 风格
   深色背景 + 居中卡片 + 火红点缀
   ============================================ */

/* ---------- CSS 变量 ---------- */
:root {
  --fire-orange: #e85d04;
  --fire-red: #dc2f02;
  --fire-dark: #9d0208;
  --navy-dark: #1a1a2e;
  --navy-mid: #16213e;
  --gold: #ffba08;
  --amber: #faa307;
  --card-bg: rgba(255,255,255,0.92);
  --card-border: rgba(0,0,0,0.05);
  --text: #1a1a2e;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 2.5rem;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  background: linear-gradient(160deg, #1a1a2e 0%, #16213e 15%, #2d1f1a 50%, #1a1a2e 85%, #0f0f1a 100%);
  font-family: 'Segoe UI', 'Roboto', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  min-height: 100vh;
  color: var(--text);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}
body::before {
  content: ''; position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(232,93,4,0.12) 0%, rgba(220,47,2,0.05) 40%, transparent 70%);
  pointer-events: none; z-index: 0;
}
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; }
input { font-family: inherit; outline: none; }

/* ---------- 顶部导航栏 ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(26,26,46,0.92); backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06); height: 52px;
}
.topbar-inner {
  max-width: 600px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px;
}
.topbar-brand { display: flex; align-items: center; gap: 8px; }
.brand-icon { font-size: 18px; }
.brand-text { font-size: 12px; font-weight: 600; color: #e85d04; letter-spacing: 1px; }
.brand-dept { font-size: 10px; font-weight: 400; color: rgba(255,255,255,0.6); }
.breadcrumb-link {
  color: rgba(255,255,255,0.6); font-size: 11px;
  padding: 3px 8px; border-radius: 4px; transition: var(--transition);
}
.breadcrumb-link:hover { color: #e85d04; background: rgba(232,93,4,0.1); }
.topbar-user { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.user-name { color: rgba(255,255,255,0.7); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-logout {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5); padding: 4px 10px; border-radius: 6px;
  font-size: 11px; transition: var(--transition);
}
.btn-logout:hover { background: rgba(220,47,2,0.15); border-color: #dc2f02; color: #dc2f02; }

#app { padding-top: 52px; position: relative; z-index: 1; }
#app.no-topbar { padding-top: 0; }

/* 底部返回栏 */
.back-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 900;
  background: rgba(26,26,46,0.92); backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center; padding: 12px;
}
.back-home-btn {
  display: inline-block; padding: 8px 28px; border-radius: 20px;
  background: linear-gradient(135deg, #dc2f02, #e85d04); color: #fff;
  font-size: 13px; font-weight: 700; letter-spacing: 1px;
  transition: var(--transition);
}
.back-home-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(220,47,2,0.3); }

/* ---------- 登录页（覆盖层样式，参照 075098） ---------- */
.login-wrapper {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: transparent; padding: 20px;
}
.login-card {
  background: linear-gradient(160deg, #1a1a2e 0%, #16213e 40%, #1a1a2e 100%);
  border-radius: 2rem;
  padding: 2.2rem 2rem 2rem 2rem;
  width: 100%; max-width: 400px;
  box-shadow: 0 0 0 2px rgba(220,47,2,0.3), 0 0 60px rgba(220,47,2,0.25), 0 30px 60px rgba(0,0,0,0.6);
  text-align: center; position: relative; overflow: hidden;
  animation: modalPopIn 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes modalPopIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.login-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, #9d0208, #dc2f02, #e85d04, #dc2f02, #9d0208);
  animation: scanLine 2s ease-in-out infinite;
}
@keyframes scanLine { 0%,100%{opacity:0.7} 50%{opacity:1} }
.login-header { margin-bottom: 24px; position: relative; z-index: 1; }
.login-logo {
  font-size: 3.5rem; display: block; margin-bottom: 6px;
  animation: warnPulse 1.5s ease-in-out infinite;
}
@keyframes warnPulse {
  0%,100% { transform: scale(1); text-shadow: 0 0 20px rgba(220,47,2,0.5); }
  50% { transform: scale(1.06); text-shadow: 0 0 40px rgba(220,47,2,0.8); }
}
.login-header h1 { font-size: 1.3rem; font-weight: 800; color: #fff; letter-spacing: 2px; position: relative; z-index: 1; }
.login-header p { font-size: 0.7rem; color: #fca5a5; font-weight: 600; margin-top: 4px; position: relative; z-index: 1; }
.login-bg-decor { display: none; }
.input-group { margin-bottom: 16px; text-align: left; position: relative; z-index: 1; }
.input-group label { display: block; font-size: 0.72rem; font-weight: 700; color: #d1d5db; margin-bottom: 6px; }
.input-group input {
  width: 100%; padding: 12px 16px; border-radius: 14px;
  border: 2px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.06);
  color: #fff; font-size: 0.95rem; transition: var(--transition);
}
.input-group input:focus { border-color: #e85d04; background: rgba(255,255,255,0.1); box-shadow: 0 0 0 4px rgba(232,93,4,0.12); }
.input-group input::placeholder { color: rgba(255,255,255,0.3); }
.login-options { margin: 4px 0 12px; text-align: left; position: relative; z-index: 1; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 0.72rem; color: #d1d5db; cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: #e85d04; }
.btn-login {
  width: 100%; padding: 13px; border-radius: 14px;
  background: linear-gradient(135deg, #dc2f02 0%, #e85d04 100%);
  color: #fff; font-size: 1rem; font-weight: 700; letter-spacing: 2px;
  transition: var(--transition); box-shadow: 0 6px 24px rgba(220,47,2,0.4);
  margin-top: 6px; position: relative; z-index: 1;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 10px 32px rgba(220,47,2,0.5); }
.btn-login:active { transform: scale(0.97); }
.login-error { color: #fca5a5; font-size: 0.72rem; font-weight: 600; margin-top: 12px; min-height: 20px; position: relative; z-index: 1; }

/* ---------- 首页 — 居中卡片式 ---------- */
#page-home { padding: 24px 18px 48px; display: flex; align-items: center; justify-content: center; min-height: calc(100vh - 52px); }
.home-card {
  max-width: 550px; width: 100%; margin: 0 auto;
  background: var(--card-bg); backdrop-filter: blur(20px);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 30px 60px -15px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.08);
  position: relative; z-index: 1;
}
.home-hero-logo {
  position: absolute; top: 22%; left: 50%; transform: translate(-50%,-50%);
  width: 280px; max-width: 55%; opacity: 0.3; pointer-events: none; z-index: 0;
}
.home-hero-logo img { width: 100%; height: auto; border-radius: 24px; filter: blur(0.5px); }
.home-hero-text { text-align: center; padding: 2rem 1.5rem 0.5rem; position: relative; z-index: 2; }
.fire-badge {
  display: inline-block; font-size: 0.65rem; font-weight: 700;
  background: linear-gradient(135deg, #9d0208, #dc2f02); color: #fff;
  padding: 5px 16px; border-radius: 40px; letter-spacing: 1.5px;
  margin-bottom: 12px; box-shadow: 0 4px 15px rgba(220,47,2,0.35);
}
.home-card .page-title {
  font-size: 1.4rem; font-weight: 800;
  background: linear-gradient(135deg, #9d0208 0%, #dc2f02 40%, #e85d04 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; line-height: 1.45; margin-bottom: 4px;
}
.home-card .page-subtitle {
  color: #8b5e34; font-weight: 600; font-size: 0.68rem;
  background: #fff8f0; display: inline-block; padding: 4px 14px;
  border-radius: 60px; border: 1px solid rgba(232,93,4,0.2);
}
.home-card .card-grid {
  display: flex; flex-direction: column;
  gap: 12px; padding: 0.5rem 1.5rem 1rem 1.5rem; position: relative; z-index: 2;
}
/* 首页功能卡片 — 参照按钮风格 */
.home-card .feature-card {
  display: flex; align-items: center; justify-content: flex-start;
  background: #fff; border-radius: 22px; padding: 13px 19px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.05); gap: 15px; cursor: pointer;
  position: relative; overflow: hidden;
}
.home-card .feature-card::before { display: none; }
.home-card .feature-card::after {
  content: ''; position: absolute; left: 0; top: 12px; bottom: 12px;
  width: 3px; border-radius: 0 3px 3px 0; transition: all 0.25s ease;
}
.home-card .feature-card:nth-child(1)::after { background: #0f3460; }
.home-card .feature-card:nth-child(2)::after { background: #e85d04; }
.home-card .feature-card:nth-child(3)::after { background: #7c3aed; }
.home-card .feature-card:nth-child(4)::after { background: #059669; }
.home-card .feature-card .card-icon {
  width: 54px; height: 54px; border-radius: 16px; display: flex;
  align-items: center; justify-content: center; font-size: 1.8rem;
  flex-shrink: 0; margin-bottom: 0;
}
.home-card .feature-card:nth-child(1) .card-icon { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); }
.home-card .feature-card:nth-child(2) .card-icon { background: linear-gradient(135deg, #ffedd5, #fed7aa); }
.home-card .feature-card:nth-child(3) .card-icon { background: linear-gradient(135deg, #ede9fe, #ddd6fe); }
.home-card .feature-card:nth-child(4) .card-icon { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.home-card .feature-card .btn-text { flex: 1; min-width: 0; position: relative; z-index: 1; }
.home-card .feature-card h3 { font-size: 1rem; font-weight: 700; color: #1a1a2e; margin-bottom: 2px; }
.home-card .feature-card p { font-size: 0.65rem; color: #6b7280; font-weight: 500; margin-bottom: 0; }
.home-card .feature-card .card-arrow { display: none; }
.home-card .feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 28px -10px rgba(0,0,0,0.18);
  border-color: rgba(232,93,4,0.15);
}
.home-card .feature-card:active { transform: scale(0.975); transition: 0.08s; }

/* 首页底栏 */
.home-footer {
  text-align: center; font-size: 0.58rem; color: #9ca3af;
  padding: 16px 1.5rem 1.5rem;
  border-top: 1px solid #f3f4f6; font-weight: 500;
  position: relative; z-index: 2;
}

/* ---------- 其他页面 — 保持功能，适配配色 ---------- */
.content-container { max-width: 800px; margin: 0 auto; padding: 28px 18px 40px; }
.content-header { text-align: center; margin-bottom: 28px; }
.content-header h2 { font-size: 1.3rem; color: #fff; margin-bottom: 6px; }
.content-header p { font-size: 0.75rem; color: rgba(255,255,255,0.5); }

/* 内页通用卡片网格 */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.card-grid.three-col { grid-template-columns: repeat(3, 1fr); }
.card-grid.two-col { grid-template-columns: repeat(2, 1fr); max-width: 700px; margin: 0 auto; }

/* 内页通用功能卡片 */
.feature-card {
  background: rgba(255,255,255,0.92); border-radius: 20px; padding: 28px 24px;
  cursor: pointer; transition: var(--transition);
  box-shadow: 0 4px 14px rgba(0,0,0,0.06); border: 1px solid rgba(0,0,0,0.04);
}
.feature-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,0.14); }
.feature-card .card-icon { font-size: 36px; margin-bottom: 12px; }
.feature-card h3 { font-size: 16px; font-weight: 700; color: #1a1a2e; margin-bottom: 6px; }
.feature-card p { font-size: 12px; color: #6b7280; }
.card-arrow { font-size: 13px; color: #e85d04; font-weight: 600; }
.feature-card:hover .card-arrow { letter-spacing: 2px; }

/* 首页特殊覆盖（竖排卡片） */
.home-card .card-grid { display: flex; flex-direction: column; gap: 12px; }
.home-card .card-grid.three-col,
.home-card .card-grid.two-col { grid-template-columns: 1fr; }

/* 理论教学 */
.course-list { display: flex; flex-direction: column; gap: 10px; }
.course-item {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(10px);
  border-radius: 20px; padding: 14px 18px; box-shadow: 0 4px 14px rgba(0,0,0,0.06);
  transition: var(--transition); border: 1px solid rgba(0,0,0,0.04);
}
.course-item:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.course-num {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  color: #fff; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.course-item:nth-child(1) .course-num { background: linear-gradient(135deg, #9d0208, #dc2f02); }
.course-item:nth-child(2) .course-num { background: linear-gradient(135deg, #e85d04, #f59e0b); }
.course-item:nth-child(3) .course-num { background: linear-gradient(135deg, #0f3460, #1e6ef0); }
.course-item:nth-child(4) .course-num { background: linear-gradient(135deg, #059669, #10b981); }
.course-item:nth-child(5) .course-num { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.course-item:nth-child(6) .course-num { background: linear-gradient(135deg, #b45309, #d97706); }
.course-item:nth-child(7) .course-num { background: linear-gradient(135deg, #be185d, #ec4899); }
.course-item:nth-child(8) .course-num { background: linear-gradient(135deg, #1e40af, #3b82f6); }

.course-item:nth-child(1) .btn-watch { background: linear-gradient(135deg, #9d0208, #dc2f02); }
.course-item:nth-child(2) .btn-watch { background: linear-gradient(135deg, #e85d04, #f59e0b); }
.course-item:nth-child(3) .btn-watch { background: linear-gradient(135deg, #0f3460, #1e6ef0); }
.course-item:nth-child(4) .btn-watch { background: linear-gradient(135deg, #059669, #10b981); }
.course-item:nth-child(5) .btn-watch { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.course-item:nth-child(6) .btn-watch { background: linear-gradient(135deg, #b45309, #d97706); }
.course-item:nth-child(7) .btn-watch { background: linear-gradient(135deg, #be185d, #ec4899); }
.course-item:nth-child(8) .btn-watch { background: linear-gradient(135deg, #1e40af, #3b82f6); }
.course-info { flex: 1; min-width: 0; }
.course-info h3 { font-size: 14px; color: #1a1a2e; margin-bottom: 2px; font-weight: 700; }
.course-info p { font-size: 11px; color: #6b7280; }
.btn-watch {
  flex-shrink: 0; padding: 7px 16px; border-radius: 20px;
  background: linear-gradient(135deg, #dc2f02, #e85d04); color: #fff;
  font-size: 12px; font-weight: 600; transition: var(--transition); box-shadow: 0 4px 12px rgba(220,47,2,0.2);
}
.btn-watch:hover { transform: scale(1.05); box-shadow: 0 6px 18px rgba(220,47,2,0.3); }

/* 课程表 Hero */
.schedule-hero {
  background: linear-gradient(180deg, rgba(26,26,46,0.6) 0%, rgba(22,33,62,0.6) 100%);
  text-align: center; padding: 32px 18px 28px;
  border-bottom: 1px solid rgba(232,93,4,0.15);
}
.schedule-hero::before { display: none; }
.schedule-main-title { font-size: 1.3rem; font-weight: 800; color: #fff; }
.schedule-sub-title { font-size: 0.75rem; color: #e85d04; margin-top: 4px; letter-spacing: 2px; }
.schedule-meta { display: inline-block; margin-top: 8px; padding: 5px 16px; background: rgba(255,255,255,0.06); border-radius: 20px; font-size: 0.68rem; color: rgba(255,255,255,0.6); border: 1px solid rgba(255,255,255,0.08); }
.schedule-location { margin-top: 4px; font-size: 0.7rem; color: rgba(255,255,255,0.4); }
.schedule-body { max-width: 1100px; margin: 0 auto; padding: 20px 18px 40px; }

/* 日程卡片 */
.day-cards-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.day-card {
  background: rgba(255,255,255,0.9); border-radius: 18px;
  overflow: hidden; transition: var(--transition); cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05); border: 1px solid rgba(0,0,0,0.04);
}
.day-card:nth-child(odd) { background: rgba(255,255,255,0.92); }
.day-card:nth-child(even) { background: rgba(255,248,240,0.92); }
.day-card:nth-child(5n+1) { border-left: 3px solid #0f3460; }
.day-card:nth-child(5n+2) { border-left: 3px solid #e85d04; }
.day-card:nth-child(5n+3) { border-left: 3px solid #7c3aed; }
.day-card:nth-child(5n+4) { border-left: 3px solid #059669; }
.day-card:nth-child(5n+5) { border-left: 3px solid #dc2f02; }
.day-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.day-card.expanded { grid-column: 1/-1; border-color: rgba(232,93,4,0.3); }
.day-card.is-today { border-color: #dc2f02; box-shadow: 0 0 0 2px rgba(220,47,2,0.2); }
.day-card-header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.day-card-num {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #9d0208, #e85d04); color: #fff;
  font-size: 16px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.day-card-info { flex: 1; }
.day-card-day { font-size: 14px; font-weight: 700; color: #1a1a2e; }
.day-card-date { font-size: 11px; color: #6b7280; }
.day-card-sessions { font-size: 11px; color: #e85d04; font-weight: 600; }
.day-card-arrow { font-size: 16px; color: #9ca3af; transition: transform 0.3s; }
.day-card.expanded .day-card-arrow { transform: rotate(180deg); color: #e85d04; }
.day-card-body { display: none; border-top: 1px solid rgba(0,0,0,0.06); background: #fafafa; }
.day-card.expanded .day-card-body { display: block; }
.session-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid rgba(0,0,0,0.04); }
.session-time { flex-shrink: 0; min-width: 80px; font-size: 11px; font-weight: 700; color: #e85d04; background: #fff5f0; padding: 4px 8px; border-radius: 4px; text-align: center; align-self: center; }
.session-content { font-size: 13px; color: #1a1a2e; flex: 1; line-height: 1.6; }
.session-location { font-size: 11px; color: #6b7280; background: #f3f4f6; padding: 3px 8px; border-radius: 10px; flex-shrink: 0; align-self: center; white-space: nowrap; }
.schedule-legend { font-size: 12px; color: rgba(255,255,255,0.5); margin-bottom: 16px; }
.legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }
.legend-dot.expanded { background: #e85d04; }
.legend-dot.collapsed { background: #9ca3af; }
.legend-dot.ongoing { background: #dc2f02; animation: pulse-dot 1.5s infinite; }
@keyframes pulse-dot { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ============== 刷题模块（参照075098风格） ============== */
.quiz-page-card {
  max-width: 580px; width: 100%; margin: 0 auto;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(20px);
  border-radius: 2.5rem; overflow: hidden; padding: 1.4rem 1.5rem 2rem 1.5rem;
  box-shadow: 0 30px 60px -15px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.08);
  position: relative;
}
.quiz-page-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px;
  background: linear-gradient(90deg, #9d0208, #dc2f02, #e85d04, #dc2f02, #9d0208);
}

/* 排行榜入口卡片 */
.lb-card {
  display: block; text-decoration: none;
  background: linear-gradient(135deg, #1a0533, #2d1060, #1a0533);
  border-radius: 22px; padding: 2px; margin-bottom: 14px;
  box-shadow: 0 10px 32px rgba(124,58,237,0.35);
  transition: all 0.3s ease; animation: lb-float 3s ease-in-out infinite;
  overflow: hidden;
}
@keyframes lb-float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-3px)} }
.lb-card:hover { box-shadow: 0 14px 40px rgba(124,58,237,0.5); transform: translateY(-4px); }
.lb-inner {
  background: linear-gradient(135deg, rgba(20,8,50,0.95), rgba(40,15,80,0.95));
  border-radius: 20px; padding: 13px 16px;
  display: flex; align-items: center; gap: 10px;
}
.lb-icon-row { font-size: 1.4rem; }
.lb-title {
  font-size: 0.9rem; font-weight: 800;
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.lb-sub { font-size: 0.62rem; color: rgba(255,255,255,0.5); }
.lb-arrow { color: #ffd700; margin-left: auto; }

/* 问答区 Hero */
.quiz-hero { text-align: center; margin-bottom: 0.3rem; padding-top: 0.3rem; }
.quiz-hero .q-icon { font-size: 1.8rem; }
.quiz-hero h2 { font-size: 1.2rem; font-weight: 800; background: linear-gradient(135deg, #9d0208, #dc2f02, #e85d04); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.quiz-hero .q-sub { font-size: 0.6rem; color: #9ca3af; }

/* 模式切换器 */
.mode-switch { display: flex; gap: 4px; margin-bottom: 8px; background: #f3f4f6; border-radius: 14px; padding: 4px; }
.mode-switch .mode-tab { flex: 1; padding: 9px 6px; border-radius: 11px; border: none; font-size: 0.72rem; font-weight: 700; cursor: pointer; font-family: inherit; background: transparent; color: #6b7280; transition: all 0.2s; text-align: center; }
.mode-switch .mode-tab.active { background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.06); }
.mode-switch .mode-tab.quiz-t.active { color: #dc2f02; }
.mode-switch .mode-tab.memo-t.active { color: #16a34a; }

/* 分类标签 */
.cat-tabs { display: flex; gap: 3px; margin-bottom: 8px; background: #f3f4f6; border-radius: 12px; padding: 3px; }
.cat-tab { flex: 1; min-width: 48px; padding: 7px 2px; text-align: center; font-size: 0.6rem; font-weight: 700; color: #6b7280; cursor: pointer; border: none; background: transparent; border-radius: 10px; transition: all 0.2s; font-family: inherit; white-space: nowrap; }
.cat-tab.active { background: #fff; color: #dc2f02; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.cat-tab .count { font-size: 0.5rem; opacity: 0.5; }

/* 工具栏 */
.qtoolbar { display: flex; align-items: center; gap: 5px; margin-bottom: 8px; padding: 6px 8px; border-radius: 12px; flex-wrap: wrap; background: #fff7ed; border: 1px solid #fed7aa; }
.qtoolbar.memo { background: #f0fdf4; border-color: #bbf7d0; }
.tb-btn { padding: 5px 10px; border-radius: 8px; border: none; font-size: 0.63rem; font-weight: 700; cursor: pointer; font-family: inherit; transition: all 0.2s; white-space: nowrap; }
.tb-btn.restart { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.tb-btn.shuffle { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.tb-btn.test { background: linear-gradient(135deg, #dc2f02, #e85d04); color: #fff; margin-left: auto; }
.tb-btn.jump { background: #16a34a; color: #fff; margin-left: auto; }
.tb-jump-inp { width: 46px; padding: 4px 2px; border-radius: 6px; border: 1px solid #bbf7d0; font-size: 0.6rem; font-weight: 600; text-align: center; font-family: inherit; outline: none; }

/* 进度 */
.q-progress { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 0.63rem; font-weight: 600; color: #6b7280; }
.q-progress .bar { flex: 1; height: 5px; background: #e5e7eb; border-radius: 3px; overflow: hidden; }
.q-progress .fill { height: 100%; background: linear-gradient(90deg, #dc2f02, #e85d04); border-radius: 3px; transition: width 0.3s; }

/* 题目卡片 */
.q-card {
  background: #fff; border-radius: 18px; padding: 18px;
  margin-bottom: 12px; border: 1px solid #f3f4f6;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03); min-height: 160px;
}
.q-type-badge { display: inline-block; font-size: 0.55rem; font-weight: 700; color: #fff; padding: 2px 8px; border-radius: 8px; margin-bottom: 8px; }
.q-type-badge.single { background: #3b82f6; }
.q-type-badge.multi { background: #f59e0b; }
.q-type-badge.tf { background: #10b981; }
.q-text { font-size: 0.88rem; font-weight: 700; color: #1a1a2e; line-height: 1.6; margin-bottom: 14px; }
.q-opts { display: flex; flex-direction: column; gap: 7px; }
.q-opt {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px;
  border: 2px solid #e5e7eb; border-radius: 13px; cursor: pointer; transition: all 0.2s;
  background: #fff; font-size: 0.78rem; font-weight: 500; color: #374151;
  text-align: left; width: 100%; font-family: inherit;
}
.q-opt:hover { border-color: #e85d04; background: #fff7ed; }
.q-opt.selected { border-color: #dc2f02; background: #fff7ed; font-weight: 700; }
.q-opt.correct { border-color: #059669; background: #d1fae5; color: #065f46; }
.q-opt.wrong { border-color: #dc2626; background: #fee2e2; color: #991b1b; }
.q-opt.dim { opacity: 0.5; }
.q-opt-letter {
  width: 28px; height: 28px; border-radius: 50%; background: #f3f4f6;
  color: #6b7280; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.7rem; flex-shrink: 0;
}
.q-opt.selected .q-opt-letter { background: #dc2f02; color: #fff; }
.q-opt.correct .q-opt-letter { background: #059669; color: #fff; }
.q-opt.wrong .q-opt-letter { background: #dc2626; color: #fff; }

/* 答题结果提示 */
.q-result { margin-top: 12px; padding: 10px 14px; border-radius: 12px; font-weight: 700; font-size: 0.78rem; text-align: center; display: none; }
.q-result.show { display: block; }
.q-result.ok { background: #d1fae5; color: #065f46; }
.q-result.no { background: #fee2e2; color: #991b1b; }

/* 多选确认 */
.multi-cfm {
  display: block; width: 100%; padding: 8px; margin-top: 8px; border: none;
  border-radius: 10px; font-size: 0.72rem; font-weight: 700; cursor: pointer;
  font-family: inherit; background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff;
}
.multi-cfm:disabled { background: #d1d5db; cursor: default; }

/* 导航按钮 */
.q-nav { display: flex; gap: 8px; margin-top: 10px; }
.q-nav-btn {
  flex: 1; padding: 9px; border: 2px solid #e5e7eb; border-radius: 13px;
  background: #fff; font-size: 0.72rem; font-weight: 600; cursor: pointer;
  font-family: inherit; color: #374151; text-align: center; transition: all 0.2s;
}
.q-nav-btn:hover { border-color: #e85d04; color: #e85d04; }
.q-nav-btn:disabled { opacity: 0.3; cursor: default; }
.q-nav-btn.primary { background: linear-gradient(135deg, #dc2f02, #e85d04); color: #fff; border-color: transparent; }

/* 统计行 */
.q-stats { display: flex; justify-content: space-around; margin-top: 14px; padding: 10px; background: #fafafa; border-radius: 12px; font-size: 0.63rem; font-weight: 600; }
.q-stats .val { font-size: 1.05rem; font-weight: 800; }
.q-stats .lbl { font-size: 0.52rem; color: #9ca3af; }
.q-stats .done .val { color: #9d0208; }
.q-stats .ok .val { color: #059669; }
.q-stats .no .val { color: #dc2626; }
.q-stats .pct .val { color: #e85d04; }

/* 完成状态 */
.q-done { text-align: center; padding: 32px 0; }
.q-done .emoji { font-size: 3.5rem; }
.q-done h3 { font-size: 1.1rem; color: #9d0208; margin: 10px 0; }
.q-done p { font-size: 0.78rem; color: #6b7280; }

/* 排行榜表格（卡片内） */
#page-ranking { padding: 16px 12px 60px; display: flex; align-items: flex-start; justify-content: center; }
.ranking-card { max-width: 580px; width: 100%; }
.ranking-table-wrapper { overflow-x: auto; }
.ranking-table {
  width: 100%; border-collapse: collapse; background: rgba(255,255,255,0.92);
  border-radius: 18px; overflow: hidden; box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
.ranking-table th { background: #1a1a2e; color: #e85d04; padding: 10px 12px; font-size: 12px; }
.ranking-table td { padding: 9px 12px; font-size: 12px; border-bottom: 1px solid rgba(0,0,0,0.04); color: #1a1a2e; }
.rank-1 { background: linear-gradient(135deg,#FFD700,#FFA000); color:#000; }
.rank-2 { background: linear-gradient(135deg,#C0C0C0,#909090); color:#000; }
.rank-3 { background: linear-gradient(135deg,#CD7F32,#A0522D); color:#fff; }
.rank-other { background: #f3f4f6; color: #6b7280; }
.highlight-row td { background: #fff8f0 !important; }

/* 评分结果 */
.result-card { max-width: 440px; margin: 0 auto; background: rgba(255,255,255,0.92); border-radius: 2rem; padding: 36px; text-align: center; box-shadow: 0 20px 40px rgba(0,0,0,0.2); }
.result-icon { font-size: 52px; }
.result-score { font-size: 42px; font-weight: 800; color: #dc2f02; }
.result-details { display: flex; gap: 16px; justify-content: center; margin: 20px 0; }
.result-stat .stat-num { font-size: 20px; font-weight: 700; color: #1a1a2e; }
.result-stat .stat-label { font-size: 11px; color: #6b7280; }
.btn-retry { display: inline-block; background: linear-gradient(135deg, #dc2f02, #e85d04); color: #fff; padding: 10px 24px; border-radius: 20px; font-size: 13px; font-weight: 600; }

/* ========== 排行榜（暗黑金主题） ========== */
.ranking-bg {
  background: #0a0618; min-height: 100vh;
  padding: 16px; display: flex; justify-content: center;
  position: relative; overflow: hidden;
}
/* 粒子 */
.ranking-bg::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,215,0,0.3), transparent),
    radial-gradient(1px 1px at 25% 55%, rgba(255,200,0,0.2), transparent),
    radial-gradient(1.5px 1.5px at 40% 15%, rgba(255,255,255,0.2), transparent),
    radial-gradient(1px 1px at 60% 70%, rgba(255,215,0,0.25), transparent),
    radial-gradient(1.5px 1.5px at 75% 35%, rgba(255,180,0,0.2), transparent),
    radial-gradient(1px 1px at 90% 60%, rgba(255,255,255,0.15), transparent),
    radial-gradient(2px 2px at 15% 80%, rgba(255,215,0,0.15), transparent),
    radial-gradient(1px 1px at 55% 45%, rgba(255,200,0,0.2), transparent),
    radial-gradient(1.5px 1.5px at 85% 10%, rgba(255,215,0,0.18), transparent),
    radial-gradient(1px 1px at 35% 90%, rgba(255,255,255,0.12), transparent);
}
.ranking-container { max-width: 520px; width: 100%; margin: 0 auto; position: relative; z-index: 1; }
.rk-title-wrap { text-align: center; margin-bottom: 16px; padding-top: 10px; }
.rk-title-svg { width: 100%; max-width: 460px; height: auto; }
.rk-sub { font-size: 0.68rem; color: #ff9500; font-weight: 700; letter-spacing: 2px; text-shadow: 0 0 10px rgba(255,150,0,0.5); }

/* 领奖台 */
.rk-podium { display: flex; align-items: flex-end; justify-content: center; gap: 8px; margin-bottom: 20px; }
.rk-pod-item { text-align: center; flex: 1; max-width: 130px; }
.rk-pod-avatar {
  width: 44px; height: 44px; border-radius: 50%; margin: 0 auto 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 900; color: #fff; position: relative;
}
.rk-pod-avatar.g1 { width: 54px; height: 54px; font-size: 1.8rem; background: linear-gradient(135deg,#ffd700,#ffaa00); box-shadow: 0 0 30px rgba(255,215,0,0.6); }
.rk-pod-avatar.g2 { background: linear-gradient(135deg,#c0c0c0,#a0a0a0); box-shadow: 0 0 20px rgba(192,192,192,0.4); }
.rk-pod-avatar.g3 { background: linear-gradient(135deg,#cd7f32,#a0522d); box-shadow: 0 0 20px rgba(205,127,50,0.4); }
.rk-pod-crown { font-size: 1rem; position: absolute; top: -10px; }
.rk-pod-name { font-weight: 800; font-size: 0.72rem; color: #fff; max-width: 100px; margin: 0 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-pod-dept { font-size: 0.48rem; color: rgba(255,255,255,0.5); max-width: 100px; margin: 0 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-pod-score { font-size: 0.65rem; font-weight: 700; background: linear-gradient(135deg,#ffd700,#ff9500); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.rk-pod-bar { height: 40px; border-radius: 8px 8px 0 0; margin-top: 6px; }
.rk-pod-bar.g1 { height: 50px; background: linear-gradient(180deg,#ffd700,#b8860b); }
.rk-pod-bar.g2 { height: 36px; background: linear-gradient(180deg,#c0c0c0,#808080); }
.rk-pod-bar.g3 { height: 28px; background: linear-gradient(180deg,#cd7f32,#8b4513); }

/* 排行榜列表 */
.rk-list { background: rgba(20,15,45,0.9); border-radius: 20px; border: 1px solid rgba(255,215,0,0.12); padding: 12px; max-height: 50vh; overflow-y: auto; }
.rk-card {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px;
  margin-bottom: 6px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.05); transition: all 0.3s;
}
.rk-card:last-child { margin-bottom: 0; }
.rk-card.t1 { border-color: rgba(255,215,0,0.3); background: rgba(255,215,0,0.06); }
.rk-card.t2 { border-color: rgba(192,192,192,0.25); background: rgba(192,192,192,0.04); }
.rk-card.t3 { border-color: rgba(205,127,50,0.25); background: rgba(205,127,50,0.04); }
.rk-num {
  width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-weight: 900; font-size: 0.72rem; flex-shrink: 0;
}
.rk-num.g1 { background: #ffd700; color: #1a0533; }
.rk-num.g2 { background: #c0c0c0; color: #1a0533; }
.rk-num.g3 { background: #cd7f32; color: #1a0533; }
.rk-num.normal { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.4); }
.rk-info { flex: 1; min-width: 0; }
.rk-name { font-weight: 800; font-size: 0.8rem; color: #fff; }
.rk-dept { font-size: 0.5rem; color: rgba(255,255,255,0.4); }
.rk-badge {
  display: inline-block; font-size: 0.5rem; font-weight: 700; padding: 1px 6px;
  border-radius: 8px; margin-left: 4px; vertical-align: middle;
}
.rk-score { font-size: 0.78rem; font-weight: 800; color: #ffd700; text-align: right; flex-shrink: 0; min-width: 52px; }
.rk-tests { font-size: 0.55rem; color: rgba(255,255,255,0.3); text-align: right; }

/* 段位颜色 */
.bg-divine { background: rgba(255,215,0,0.2); color: #ffd700; }
.bg-ruby { background: rgba(255,68,68,0.2); color: #ff4444; }
.bg-diamond { background: rgba(147,112,219,0.2); color: #9370db; }
.bg-gold { background: rgba(255,215,0,0.15); color: #ffaa00; }
.bg-silver { background: rgba(192,192,192,0.15); color: #c0c0c0; }
.bg-bronze { background: rgba(205,127,50,0.15); color: #cd7f32; }

.rk-back { text-align: center; margin-top: 14px; }
.rk-back-btn {
  display: inline-block; padding: 8px 24px; border-radius: 50px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.5); font-size: 0.72rem; font-weight: 600;
  transition: all 0.2s;
}
.rk-back-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }
.rk-footer { text-align: center; font-size: 0.5rem; color: rgba(255,255,255,0.2); margin-top: 16px; line-height: 1.6; }

/* 响应式 */
@media (max-width: 480px) {
  .quiz-page-card { padding: 1.2rem 0.8rem 1.4rem 0.8rem; border-radius: 2rem; }
  .q-text { font-size: 0.8rem; }
  .q-opt { font-size: 0.72rem; padding: 9px 10px; }
  .q-opt-letter { width: 24px; height: 24px; font-size: 0.65rem; }
  .mode-switch .mode-tab { font-size: 0.65rem; }
  .cat-tab { font-size: 0.55rem; }
}

/* 排行榜入口在刷题首页 */
#page-quiz .content-container { max-width: 580px; }
#page-quiz .lb-card { margin-bottom: 16px; }

.result-card {
  max-width: 440px; margin: 0 auto; background: rgba(255,255,255,0.92);
  border-radius: 2rem; padding: 36px; text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.result-icon { font-size: 52px; margin-bottom: 10px; }
.result-score { font-size: 42px; font-weight: 800; color: #dc2f02; }
.result-details { display: flex; gap: 16px; justify-content: center; margin: 20px 0; }
.result-stat .stat-num { font-size: 20px; font-weight: 700; color: #1a1a2e; }
.result-stat .stat-label { font-size: 11px; color: #6b7280; }
.btn-retry { display: inline-block; background: linear-gradient(135deg, #dc2f02, #e85d04); color: #fff; padding: 10px 24px; border-radius: 20px; font-size: 13px; font-weight: 600; }

/* 排行榜 */
.ranking-table-wrapper { overflow-x: auto; }
.ranking-table {
  width: 100%; border-collapse: collapse; background: rgba(255,255,255,0.92);
  border-radius: 18px; overflow: hidden; box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}
.ranking-table th { background: #1a1a2e; color: #e85d04; padding: 10px 12px; font-size: 12px; }
.ranking-table td { padding: 9px 12px; font-size: 12px; border-bottom: 1px solid rgba(0,0,0,0.04); color: #1a1a2e; }
.rank-1 { background: linear-gradient(135deg,#FFD700,#FFA000); color:#000; }
.rank-2 { background: linear-gradient(135deg,#C0C0C0,#909090); color:#000; }
.rank-3 { background: linear-gradient(135deg,#CD7F32,#A0522D); color:#fff; }
.rank-other { background: #f3f4f6; color: #6b7280; }
.highlight-row td { background: #fff8f0 !important; }

/* Tabs & 资料 */
.tabs { display: flex; gap: 4px; margin-bottom: 18px; background: rgba(255,255,255,0.1); border-radius: 14px; padding: 4px; }
.tab { flex: 1; padding: 9px 14px; background: transparent; font-size: 12px; font-weight: 600; color: rgba(255,255,255,0.6); border-radius: 10px; transition: var(--transition); }
.tab.active { background: #e85d04; color: #fff; }
.materials-list { display: flex; flex-direction: column; gap: 8px; }
.material-item {
  display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,0.92);
  border-radius: 18px; padding: 13px 16px; box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.material-icon { font-size: 24px; }
.material-info h4 { font-size: 13px; color: #1a1a2e; }
.material-info p { font-size: 11px; color: #6b7280; }
.btn-preview { background: transparent; color: #e85d04; border: 1px solid rgba(232,93,4,0.3); padding: 6px 14px; border-radius: 14px; font-size: 11px; }
.btn-download { background: #e85d04; color: #fff; padding: 6px 14px; border-radius: 14px; font-size: 11px; }

/* 弹窗 */
.modal-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-content { background: #fff; border-radius: 1.5rem; width: 90vw; max-width: 800px; max-height: 85vh; overflow-y: auto; }
.video-modal { padding: 22px; }
.modal-close { position: absolute; top: 8px; right: 12px; background: none; font-size: 20px; color: #6b7280; }
.modal-close:hover { color: #dc2f02; }
.video-container { position: relative; padding-bottom: 56.25%; height: 0; margin-top: 10px; }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 12px; }

/* 响应式 */
@media (max-width: 1100px) { .day-cards-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) {
  .day-cards-grid { grid-template-columns: repeat(2, 1fr); }
  #page-home { padding: 16px 10px 36px; }
  .home-card { border-radius: 2rem; }
  .home-hero-text { padding: 1.5rem 1rem 0.5rem; }
  .home-card .page-title { font-size: 1.2rem; }
  .home-card .feature-card { padding: 11px 14px; gap: 10px; }
  .home-card .feature-card .card-icon { width: 46px; height: 46px; font-size: 1.5rem; }
  .home-card .feature-card h3 { font-size: 0.9rem; }
  .login-card { padding: 1.8rem 1.2rem 1.6rem; border-radius: 1.5rem; }
  .login-header h1 { font-size: 1.1rem; }
  .login-logo { font-size: 2.8rem; }
}
@media (max-width: 480px) { .day-cards-grid { grid-template-columns: 1fr; } }
