/* 及简乐享 Demo - 页面特定样式 */

/* ===== 首页 ===== */
.welcome-banner {
  background: linear-gradient(135deg, #1890ff 0%, #36cfc9 100%);
  border-radius: var(--radius-lg);
  padding: 30px;
  color: #fff;
  margin-bottom: 24px;
}

.welcome-text h1 { font-size: 24px; margin-bottom: 6px; color: #fff; }
.welcome-text p { opacity: 0.85; font-size: 14px; margin-bottom: 20px; }

.welcome-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.welcome-stats .stat-card {
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(10px);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}

.welcome-stats .stat-card:hover { background: rgba(255,255,255,0.25); }
.welcome-stats .stat-icon { background: rgba(255,255,255,0.2) !important; color: #fff !important; }
.welcome-stats .stat-value { color: #fff; }
.welcome-stats .stat-label { color: rgba(255,255,255,0.75); }
.welcome-stats .stat-trend { color: rgba(255,255,255,0.9); }

.home-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.home-section {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.home-section.full-width { grid-column: 1 / -1; }

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-header h2 { font-size: 16px; font-weight: 600; }

/* 课程迷你卡片 */
.course-cards { display: flex; flex-direction: column; gap: 12px; }

.course-card-mini {
  display: flex;
  gap: 14px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.course-card-mini:hover { background: var(--bg-hover); transform: translateX(4px); }

.course-cover-mini {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.course-card-info { flex: 1; min-width: 0; }
.course-card-title { font-size: 14px; font-weight: 500; margin-bottom: 8px; }

.course-card-progress {
  display: flex;
  align-items: center;
  gap: 8px;
}

.progress-text { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* 活动迷你卡片 */
.activity-cards { display: flex; flex-direction: column; gap: 12px; }

.activity-card-mini {
  display: flex;
  gap: 14px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  align-items: center;
}

.activity-card-mini:hover { background: var(--bg-hover); }

.activity-date-badge {
  width: 52px;
  text-align: center;
  flex-shrink: 0;
}

.date-month { font-size: 12px; color: var(--primary-color); }
.date-day { font-size: 22px; font-weight: 700; color: var(--text-primary); }

.activity-card-info { flex: 1; min-width: 0; }
.activity-card-title { font-size: 14px; font-weight: 500; margin-bottom: 3px; }
.activity-card-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.activity-card-tags { display: flex; gap: 4px; }
.activity-enroll-count { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* 直播迷你卡片 */
.live-cards { display: flex; gap: 14px; flex-wrap: wrap; }

.live-card-mini {
  flex: 1;
  min-width: 240px;
  padding: 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-secondary);
}

.live-card-mini.live { background: linear-gradient(135deg, #fff1f0, #ffe7e7); }
.live-card-mini:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.live-status-badge { font-size: 12px; font-weight: 600; margin-bottom: 8px; }
.live-status-badge.live { color: #f5222d; }
.live-status-badge.upcoming { color: #faad14; }
.live-card-title { font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.live-card-meta { font-size: 12px; color: var(--text-muted); }
.live-viewers { font-size: 12px; color: var(--text-secondary); margin-top: 6px; }

/* 场景网格 */
.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}

.scenario-card {
  text-align: center;
  padding: 20px 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
}

.scenario-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.scenario-icon { font-size: 32px; margin-bottom: 8px; }
.scenario-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.scenario-desc { font-size: 12px; color: var(--text-muted); }

/* ===== 文档页 ===== */
.docs-layout { display: flex; gap: 20px; }

.docs-sidebar {
  width: 240px;
  flex-shrink: 0;
}

.docs-sidebar h3 { font-size: 15px; margin-bottom: 12px; }

.category-list {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.category-item {
  display: flex;
  justify-content: space-between;
  padding: 11px 16px;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  border-left: 3px solid transparent;
}

.category-item:hover { background: var(--bg-hover); }
.category-item.active { background: var(--primary-light); border-left-color: var(--primary-color); color: var(--primary-color); }

.category-count {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 1px 8px;
  border-radius: 10px;
}

.docs-sidebar-info {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.docs-sidebar-info h3 { font-size: 14px; margin-bottom: 10px; }

.docs-main { flex: 1; min-width: 0; }

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.doc-card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.doc-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--primary-color); }

.doc-card-header { display: flex; justify-content: space-between; margin-bottom: 10px; }
.doc-category-tag { font-size: 12px; color: var(--primary-color); }
.doc-card-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; line-height: 1.4; }
.doc-card-excerpt { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.doc-card-footer {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

/* 文档详情 */
.doc-detail { }
.doc-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 20px; }
.doc-content { font-size: 15px; line-height: 1.8; margin-bottom: 24px; }
.doc-actions { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.doc-comments h4 { margin-bottom: 12px; }
.comment-input { display: flex; flex-direction: column; gap: 10px; }
.comment-input textarea { border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 10px; font-family: inherit; font-size: 14px; resize: vertical; background: var(--bg-primary); color: var(--text-primary); }

/* ===== 乐问页 ===== */
.qa-layout { display: flex; gap: 20px; }
.qa-main { flex: 1; min-width: 0; }

.qa-sidebar {
  width: 280px;
  flex-shrink: 0;
}

.sidebar-card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}

.sidebar-card h3 { font-size: 15px; margin-bottom: 14px; }

.qa-section-title { margin-bottom: 12px; }
.qa-section-title h3 { font-size: 15px; }

.qa-item {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.qa-item:first-child { border-radius: var(--radius-md) var(--radius-md) 0 0; }
.qa-item:last-child { border-bottom: none; border-radius: 0 0 var(--radius-md) var(--radius-md); }
.qa-item.clickable { cursor: pointer; }
.qa-item.clickable:hover { background: var(--bg-hover); }

.qa-item-left { flex-shrink: 0; padding-top: 2px; }
.qa-item-content { flex: 1; min-width: 0; }
.qa-item-title { font-size: 15px; font-weight: 500; margin-bottom: 6px; line-height: 1.4; }
.qa-item-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; display: flex; gap: 8px; }
.qa-item-stats { font-size: 12px; color: var(--text-secondary); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.qa-item-right { flex-shrink: 0; }

.answered-badge { padding: 3px 8px; background: #f6ffed; color: #52c41a; font-size: 12px; border-radius: 3px; }
.unanswered-badge { padding: 3px 8px; background: #fff7e6; color: #fa8c16; font-size: 12px; border-radius: 3px; }

.dark-theme .answered-badge { background: rgba(82,196,26,0.15); }
.dark-theme .unanswered-badge { background: rgba(250,140,22,0.15); }

/* 达人榜 */
.expert-list { display: flex; flex-direction: column; gap: 12px; }

.expert-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.expert-rank {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  color: #fff;
  flex-shrink: 0;
}

.expert-rank.rank-1 { background: #f5222d; }
.expert-rank.rank-2 { background: #fa8c16; }
.expert-rank.rank-3 { background: #faad14; }

.expert-info { flex: 1; min-width: 0; }
.expert-name { font-size: 14px; font-weight: 500; }
.expert-dept { font-size: 12px; color: var(--text-muted); }
.expert-stats { font-size: 12px; color: var(--text-muted); text-align: right; }

/* 问答详情 */
.qa-detail { }
.qa-author { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 14px; }
.qa-tags { margin-bottom: 12px; display: flex; gap: 6px; }
.qa-stats-bar { display: flex; gap: 16px; font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; }
.top-answer { background: var(--bg-secondary); border-radius: var(--radius-sm); padding: 16px; margin-bottom: 20px; border-left: 3px solid var(--success-color); }
.top-answer-header { font-size: 14px; font-weight: 600; color: var(--success-color); margin-bottom: 8px; }
.answer-input h4 { margin-bottom: 10px; }
.answer-input textarea { width: 100%; border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 10px; font-family: inherit; font-size: 14px; resize: vertical; background: var(--bg-primary); color: var(--text-primary); }
.answer-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }

/* ===== 课程页 ===== */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 30px;
}

.course-card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.course-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--primary-color); }

.course-cover {
  height: 130px;
  background: linear-gradient(135deg, var(--primary-light), #e8f4f8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
}

.required-badge, .optional-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 3px;
  font-weight: 500;
}

.required-badge { background: #f5222d; color: #fff; }
.optional-badge { background: #52c41a; color: #fff; }

.course-info { padding: 16px; }
.course-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.course-instructor { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }

.course-meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.course-rating { color: #faad14; }

.course-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.course-completed-badge { color: var(--success-color); font-size: 13px; font-weight: 500; }
.course-features { margin-top: 10px; }
.course-features h3 { font-size: 16px; margin-bottom: 6px; }

/* 课程详情 */
.course-detail-header { display: flex; gap: 20px; margin-bottom: 24px; }
.course-detail-cover { width: 100px; height: 100px; background: var(--primary-light); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 48px; flex-shrink: 0; }
.course-detail-info { flex: 1; }
.course-detail-info h2 { font-size: 20px; margin-bottom: 8px; }
.course-detail-info p { font-size: 14px; color: var(--text-secondary); margin-bottom: 12px; }
.course-detail-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; }
.course-detail-tags { display: flex; gap: 6px; }
.course-progress-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; padding: 12px 16px; background: var(--bg-secondary); border-radius: var(--radius-sm); }

.chapter-list h3 { margin-bottom: 12px; }

.chapter-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.chapter-item:hover { background: var(--bg-hover); }

.chapter-index {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.chapter-item.completed .chapter-index { background: var(--success-color); color: #fff; }
.chapter-title { flex: 1; font-size: 14px; }
.chapter-status { font-size: 12px; color: var(--text-muted); }
.chapter-item.completed .chapter-status { color: var(--success-color); }

.course-detail-actions { display: flex; gap: 12px; margin-top: 24px; }

/* ===== 考试页 ===== */
.exam-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.exam-section { margin-bottom: 28px; }
.exam-section h2 { font-size: 17px; margin-bottom: 14px; }

.exam-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.exam-card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.exam-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.exam-card-header h3 { font-size: 16px; }

.exam-card-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
  margin-bottom: 16px;
  font-size: 13px;
}

.exam-card-info .label {
  color: var(--text-muted);
  margin-right: 6px;
}

.exam-card-actions { display: flex; gap: 10px; }
.exam-features { margin-top: 10px; }
.exam-features h3 { font-size: 16px; margin-bottom: 6px; }

/* 考试进行中 */
.exam-taking { max-width: 800px; margin: 0 auto; }

.exam-taking-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.exam-timer-display {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.timer {
  font-size: 22px;
  font-weight: 700;
  color: var(--danger-color);
  font-variant-numeric: tabular-nums;
}

.exam-progress-info {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.question-card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.question-type {
  display: inline-block;
  padding: 2px 10px;
  background: var(--primary-light);
  color: var(--primary-color);
  border-radius: 3px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 14px;
}

.question-text {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 20px;
  line-height: 1.6;
}

.question-options { display: flex; flex-direction: column; gap: 10px; }

.option-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
}

.option-item:hover { border-color: var(--primary-color); background: var(--primary-light); }
.option-item.selected { border-color: var(--primary-color); background: var(--primary-light); }
.option-item input { display: none; }

.option-letter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
  font-size: 13px;
}

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

.exam-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.question-dots {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.q-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: var(--transition);
}

.q-dot.current { border-color: var(--primary-color); background: var(--primary-color); color: #fff; }
.q-dot.answered { border-color: var(--success-color); background: #f6ffed; color: var(--success-color); }
.q-dot.current.answered { background: var(--primary-color); color: #fff; }

/* 考试成绩 */
.exam-result { text-align: center; padding: 20px; }
.result-icon { font-size: 48px; margin-bottom: 16px; }
.result-score { font-size: 64px; font-weight: 700; color: var(--primary-color); margin: 16px 0; }

/* ===== 学习地图 ===== */
.map-features-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.feature-tag {
  padding: 6px 14px;
  background: var(--primary-light);
  color: var(--primary-color);
  border-radius: 20px;
  font-size: 13px;
}

.dark-theme .feature-tag { background: rgba(24,144,255,0.15); }

.map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.map-card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.map-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.map-card-visual {
  height: 180px;
  padding: 20px;
  overflow: hidden;
}

.map-card-visual.game {
  background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
}

.map-card-visual.list {
  background: linear-gradient(135deg, #f6ffed 0%, #d9f7be 100%);
}

.game-map-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 100%;
}

.game-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.node-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

.game-node.completed .node-number { border-color: var(--success-color); background: var(--success-color); color: #fff; }
.game-node.available .node-number { border-color: var(--primary-color); background: var(--primary-color); color: #fff; }
.game-node.locked .node-number { opacity: 0.5; }

.node-status { font-size: 12px; }
.node-connector { width: 20px; height: 3px; background: #ccc; margin-bottom: 20px; }

.list-map-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  justify-content: center;
}

.list-node {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  background: rgba(255,255,255,0.8);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.list-node .node-idx {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.list-node.completed .node-idx { background: var(--success-color); color: #fff; }
.list-node.available .node-idx { background: var(--primary-color); color: #fff; }
.node-badge { margin-left: auto; font-size: 11px; }

.map-card-info { padding: 18px; }
.map-card-info h3 { font-size: 16px; margin-bottom: 6px; }
.map-card-info p { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.map-card-meta { display: flex; gap: 14px; font-size: 12px; color: var(--text-secondary); margin-bottom: 10px; }

/* 学习地图详情 */
.map-detail-header { margin-bottom: 24px; }
.map-detail-header h2 { margin-bottom: 6px; }
.map-detail-stats { display: flex; gap: 16px; font-size: 13px; color: var(--text-secondary); margin-top: 10px; }

.stages-timeline { position: relative; padding-left: 20px; }

.stage-item {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  position: relative;
}

.stage-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
}

.stage-number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  z-index: 1;
  border: 2px solid var(--border-color);
}

.stage-item.completed .stage-number { background: var(--success-color); color: #fff; border-color: var(--success-color); }
.stage-item.available .stage-number { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.stage-item.locked .stage-number { opacity: 0.5; }

.stage-line {
  width: 2px;
  flex: 1;
  background: var(--border-color);
  min-height: 24px;
}

.stage-content {
  flex: 1;
  padding-bottom: 6px;
}

.stage-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.stage-header h4 { font-size: 15px; }
.stage-meta { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; display: flex; gap: 12px; }
.stage-progress { margin-bottom: 10px; max-width: 300px; }

.map-complete-msg {
  text-align: center;
  padding: 20px;
  background: #f6ffed;
  border-radius: var(--radius-md);
  margin-top: 20px;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.map-info-section {
  margin-top: 10px;
  padding: 24px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  text-align: center;
}

.map-info-section h3 { font-size: 18px; margin-bottom: 8px; }

.map-role-cards {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 16px;
}

.role-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  font-size: 14px;
}

.role-card span:first-child { font-size: 28px; }

/* ===== 活动页 ===== */
.activity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.activity-card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.activity-card:hover { box-shadow: var(--shadow-md); }
.activity-card.ended { opacity: 0.75; }

.activity-card-top { display: flex; gap: 18px; padding: 20px; }

.activity-date-display {
  width: 60px;
  text-align: center;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  flex-shrink: 0;
}

.activity-date-display.ended { background: var(--bg-secondary); }
.date-m { font-size: 12px; color: var(--primary-color); font-weight: 500; }
.date-d { font-size: 24px; font-weight: 700; }

.activity-main-info { flex: 1; min-width: 0; }
.activity-main-info h3 { font-size: 16px; margin-bottom: 6px; }
.activity-main-info p { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.activity-detail-items { font-size: 13px; color: var(--text-secondary); display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.activity-tags { display: flex; gap: 6px; }
.activity-result { font-size: 13px; color: var(--text-muted); margin-top: 8px; }

.activity-card-bottom {
  padding: 14px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.enroll-info { flex: 1; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-muted); }
.enroll-bar { flex: 1; max-width: 200px; }
.activity-actions { display: flex; gap: 8px; }
.activity-features { margin-top: 10px; }
.activity-features h3 { font-size: 16px; margin-bottom: 6px; }

/* 活动详情 */
.activity-detail { }
.detail-section { margin-bottom: 20px; }
.detail-section h4 { font-size: 15px; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border-color); }
.detail-actions { display: flex; gap: 10px; margin-top: 16px; }

.attendee-list { display: flex; flex-direction: column; gap: 8px; max-height: 200px; overflow-y: auto; }
.attendee-item { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14px; }

/* ===== 投票页 ===== */
.vote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.vote-card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.vote-card.ended { opacity: 0.8; }

.vote-card-header { margin-bottom: 16px; }
.vote-card-header h3 { font-size: 16px; margin-bottom: 6px; }
.vote-card-meta { display: flex; gap: 12px; font-size: 12px; color: var(--text-muted); }
.ended-badge { font-size: 12px; color: var(--text-muted); background: var(--bg-hover); padding: 2px 8px; border-radius: 3px; font-weight: normal; }

.vote-options { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }

.vote-option {
  padding: 8px 0;
  cursor: pointer;
  transition: var(--transition);
}

.vote-option:hover { opacity: 0.8; }

.vote-option-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 14px;
}

.survey-preview { padding: 14px 0; }
.survey-preview ul { list-style: none; padding: 0; }
.survey-preview li { padding: 4px 0; font-size: 13px; color: var(--text-secondary); }
.survey-preview li::before { content: '• '; color: var(--primary-color); }
.survey-form .survey-question { padding-bottom: 16px; border-bottom: 1px solid var(--border-color); }

.vote-card-actions { display: flex; gap: 8px; justify-content: flex-end; }
.vote-features { margin-top: 10px; }
.vote-features h3 { font-size: 16px; margin-bottom: 6px; }

/* ===== 论坛页 ===== */
.forum-table {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.forum-table-header {
  display: grid;
  grid-template-columns: 1fr 100px 120px 80px;
  gap: 12px;
  padding: 12px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.forum-row {
  display: grid;
  grid-template-columns: 1fr 100px 120px 80px;
  gap: 12px;
  padding: 14px 18px;
  font-size: 14px;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
  align-items: center;
}

.forum-row:last-child { border-bottom: none; }
.forum-row.clickable { cursor: pointer; }
.forum-row.clickable:hover { background: var(--bg-hover); }

.col-author, .col-stats { font-size: 13px; color: var(--text-muted); }
.col-date { font-size: 12px; color: var(--text-muted); }

.forum-empty { padding: 40px; }
.forum-features { margin-top: 10px; }
.forum-features h3 { font-size: 16px; margin-bottom: 6px; }

/* 帖子详情 */
.post-author-info { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.post-content { font-size: 15px; line-height: 1.8; margin-bottom: 16px; }
.post-actions-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }

.reply-section h4 { margin-bottom: 14px; }

.reply-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
}

.reply-content { flex: 1; }
.reply-header { display: flex; gap: 10px; margin-bottom: 6px; font-size: 14px; }
.reply-actions { display: flex; gap: 12px; margin-top: 6px; }

.reply-input { margin-top: 16px; }
.reply-input textarea { width: 100%; border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 10px; font-family: inherit; font-size: 14px; resize: vertical; background: var(--bg-primary); color: var(--text-primary); }
.reply-toolbar { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.reply-toolbar .btn-primary { margin-left: auto; }

/* ===== 直播页 ===== */
.live-section { margin-bottom: 30px; }
.live-section h2 { font-size: 18px; margin-bottom: 16px; }

.live-main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.live-main-card {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  min-height: 400px;
}

.live-player {
  background: #000;
  position: relative;
}

.live-player-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
}

.live-badge-big {
  padding: 6px 18px;
  background: rgba(245,34,45,0.9);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.live-title-overlay { font-size: 20px; font-weight: 600; }
.live-host-overlay { font-size: 14px; opacity: 0.8; }
.live-viewers-overlay { font-size: 13px; opacity: 0.7; }

.live-chat-panel {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--border-color);
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
}

.chat-header h3 { font-size: 15px; }
.chat-header span { font-size: 12px; color: var(--text-muted); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-msg {
  font-size: 13px;
  line-height: 1.5;
  padding: 4px 0;
}

.chat-msg.system { color: var(--text-muted); font-style: italic; text-align: center; }
.chat-user { color: var(--primary-color); font-weight: 500; margin-right: 6px; }

.chat-input-area {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
}

.chat-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.chat-input:focus { outline: none; border-color: var(--primary-color); }

.live-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.live-card:hover { box-shadow: var(--shadow-md); }
.live-card-icon { font-size: 36px; flex-shrink: 0; }
.live-card-info { flex: 1; min-width: 0; }
.live-card-info h3 { font-size: 15px; margin-bottom: 4px; }
.live-card-info p { font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.live-card-meta { display: flex; gap: 12px; font-size: 12px; color: var(--text-muted); flex-wrap: wrap; }
.live-features { margin-top: 10px; }
.live-features h3 { font-size: 16px; margin-bottom: 6px; }

/* ===== 证书页 ===== */
.cert-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.cert-card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.cert-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.cert-preview {
  padding: 24px;
  background: linear-gradient(135deg, #fff7e6, #ffe7ba);
}

.cert-border {
  border: 2px solid #d4a849;
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  background: rgba(255,255,255,0.8);
}

.cert-header-text { font-size: 14px; color: #8c6d1f; margin-bottom: 8px; }
.cert-holder { font-size: 20px; font-weight: 700; margin-bottom: 6px; color: #333; }
.cert-desc { font-size: 13px; color: #666; margin-bottom: 8px; }
.cert-issuer { font-size: 11px; color: #999; }
.cert-date { font-size: 11px; color: #999; }

.cert-card-info { padding: 16px; }
.cert-card-info h3 { font-size: 15px; margin-bottom: 4px; }
.cert-card-info p { font-size: 12px; color: var(--text-muted); }

/* 证书详情 */
.cert-full {
  padding: 40px;
  background: linear-gradient(135deg, #fffbe6, #fff1b8);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.cert-full-border {
  border: 3px solid #d4a849;
  border-radius: var(--radius-md);
  padding: 40px;
  text-align: center;
  background: rgba(255,255,255,0.9);
  position: relative;
}

.cert-ribbon { font-size: 48px; margin-bottom: 12px; }
.cert-full-title { font-size: 24px; color: #8c6d1f; margin-bottom: 20px; }
.cert-full-holder { font-size: 32px; font-weight: 700; margin-bottom: 12px; color: #333; }
.cert-full-desc { font-size: 16px; color: #666; margin-bottom: 12px; }
.cert-full-related { font-size: 14px; color: #999; margin-bottom: 4px; }
.cert-full-footer { display: flex; justify-content: space-between; margin-top: 24px; font-size: 13px; color: #999; }
.cert-detail-actions { display: flex; gap: 12px; justify-content: center; }

.cert-features { margin-top: 10px; }
.cert-features h3 { font-size: 16px; margin-bottom: 6px; }

/* ===== 管理后台 ===== */
.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0;
}

.admin-tab {
  padding: 10px 20px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  transition: var(--transition);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-family: inherit;
}

.admin-tab:hover { color: var(--primary-color); }
.admin-tab.active { color: var(--primary-color); border-bottom-color: var(--primary-color); font-weight: 500; }

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.admin-charts-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.admin-chart-card {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.admin-chart-card h3 { font-size: 15px; margin-bottom: 16px; }

.content-dist { display: flex; flex-direction: column; gap: 12px; }

.dist-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dist-label { width: 50px; font-size: 13px; color: var(--text-secondary); text-align: right; flex-shrink: 0; }
.dist-bar-wrapper { flex: 1; }
.dist-value { width: 50px; font-size: 13px; color: var(--text-muted); flex-shrink: 0; }

/* 管理功能 */
.mgmt-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.mgmt-toolbar h3 { font-size: 16px; }
.mgmt-actions { display: flex; gap: 10px; align-items: center; }
.mgmt-features { margin-top: 16px; font-size: 13px; color: var(--text-secondary); text-align: center; }

/* 平台设置 */
.settings-section {
  margin-bottom: 30px;
}

.settings-section h3 {
  font-size: 16px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.settings-items { display: flex; flex-direction: column; gap: 14px; }

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

.setting-item strong { font-size: 14px; display: block; margin-bottom: 2px; }
.setting-item p { font-size: 12px; margin: 0; }

/* 学习记录 */
.learning-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .map-grid, .activity-grid, .vote-grid, .exam-cards {
    grid-template-columns: 1fr;
  }

  .live-main-card {
    grid-template-columns: 1fr;
  }

  .forum-table-header, .forum-row {
    grid-template-columns: 1fr;
  }

  .col-author, .col-date, .col-stats { display: none; }

  .admin-charts-grid {
    grid-template-columns: 1fr;
  }
}
