/* ============================================
   v4 学科详情页 subject.html 样式
   ============================================ */

.subject-hero {
  margin: 20px auto 32px !important;
  padding: 28px 40px !important;
  border-radius: 24px;
  display: grid !important;
  grid-template-columns: auto auto auto !important;
  justify-content: center !important;
  gap: 0 40px !important;
  align-items: center;
  box-shadow: 0 16px 48px rgba(0,0,0,0.12);
  position: relative;
  overflow: hidden;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  float: none !important;
  clear: both !important;
  left: auto !important;
  right: auto !important;
}
/* 背景装饰：左上光晕 + 右下圆形 */
.subject-hero::before {
  content: ''; position: absolute;
  top: -60px; left: -40px; width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.25) 0%, transparent 70%);
  pointer-events: none;
}
.subject-hero::after {
  content: ''; position: absolute;
  bottom: -50px; right: -30px; width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  pointer-events: none;
}

/* 左侧：学科大图标 */
.subj-icon-big {
  font-size: 56px; line-height: 1;
  background: rgba(255,255,255,0.3);
  border-radius: 20px; padding: 14px 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255,255,255,0.5);
  box-shadow: 0 8px 28px rgba(0,0,0,0.1);
  position: relative; z-index: 1;
}

/* 中间：信息区 */
.subj-info {
  position: relative; z-index: 1;
  min-width: 0;
}
.subj-info h1 {
  font-size: 30px; font-weight: 900; margin: 0 0 3px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.12);
  letter-spacing: 1px;
}
.subj-info > p {
  font-size: 13px; margin: 0 0 14px; opacity: 0.92;
  letter-spacing: 0.5px;
}

/* 统计数据：卡片式 */
.subj-stats {
  display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap;
}
.ss-item {
  background: rgba(255,255,255,0.22);
  border-radius: 10px;
  padding: 6px 14px;
  text-align: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.35);
  min-width: 64px;
}
.ss-num {
  display: block; font-size: 20px; font-weight: 900; line-height: 1.2;
  text-shadow: 0 1px 6px rgba(0,0,0,0.12);
  font-variant-numeric: tabular-nums;
}
.ss-l { font-size: 11px; opacity: 0.85; margin-top: 2px; }

/* 操作按钮 */
.subj-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.subj-actions .btn-hero {
  font-size: 13px; padding: 9px 20px;
  border-radius: 10px;
  font-weight: 700;
  transition: all .25s ease;
}
.subj-actions .btn-hero-primary {
  background: linear-gradient(135deg, #fff 0%, #f8f8ff 100%);
  color: #333;
  border: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.subj-actions .btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.subj-actions .btn-hero-ghost {
  background: rgba(255,255,255,0.9);
  color: #444;
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: 12px;
}
.subj-actions .btn-hero-ghost:hover { background: #fff; transform: translateY(-2px); }

/* 右侧：正确率进度环 */
.subj-ring {
  width: 112px; height: 112px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}
.ring-inner {
  width: 90px; height: 90px;
  border-radius: 50%;
  background: rgba(0,0,0,0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.35);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.ring-num {
  font-size: 24px; font-weight: 900; color: #fff; line-height: 1;
  text-shadow: 0 1px 6px rgba(0,0,0,0.2);
  font-variant-numeric: tabular-nums;
}
.ring-l { font-size: 11px; color: rgba(255,255,255,0.9); margin-top: 5px; }

/* 成就徽章行 */
.subj-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.badge {
  font-size: 12px; font-weight: 700;
  background: rgba(255,255,255,0.28);
  border: 1px solid rgba(255,255,255,0.5);
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  text-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.badge-lock { opacity: 0.75; font-weight: 400; }

.section-title {
  font-size: 22px; font-weight: 900; color: #222;
  margin: 0 0 4px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.section-sub {
  font-size: 13px; color: var(--text-soft); margin: 0 0 18px;
  text-align: center;
}

/* ---- 知识图谱 ---- */
.knowledge-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.knowledge-card {
  background: #fff; border-radius: 14px; padding: 16px;
  text-decoration: none; color: inherit;
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
  border: 2px solid transparent;
  transition: all .2s ease; position: relative; display: block;
  border-left: 4px solid var(--kc, #FF8C42);
}
.knowledge-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,0.1); border-color: var(--kc); }
.knowledge-card.core { background: linear-gradient(135deg, rgba(255,140,66,0.04), rgba(255,255,255,1)); }
.kc-title { font-size: 15px; font-weight: 800; color: #222; display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.kc-tag {
  font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 999px;
  background: linear-gradient(90deg, #FF8C42, #FF4D8D); color: #fff;
}
.kc-progress { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.kc-bar { flex: 1; height: 8px; background: rgba(0,0,0,0.05); border-radius: 999px; overflow: hidden; }
.kc-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #FFC95C, #FF8C42, #FF4D8D);
  transition: width 1s ease;
}
.kc-percent { font-size: 13px; font-weight: 800; color: var(--kc, #FF8C42); min-width: 36px; text-align: right; }
.kc-meta {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--text-soft);
}

/* ---- 真题卷 ---- */
.paper-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.paper-card {
  display: flex; align-items: center; gap: 16px;
  background: #fff; padding: 18px 20px; border-radius: 14px;
  text-decoration: none; color: inherit;
  box-shadow: 0 4px 14px rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.04);
  transition: all .2s ease;
}
.paper-card:hover { transform: translateX(4px); box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
.paper-year {
  background: linear-gradient(135deg, #FF8C42, #FF4D8D);
  color: #fff; font-size: 18px; font-weight: 900;
  padding: 12px 16px; border-radius: 12px; min-width: 60px; text-align: center;
}
.paper-info { flex: 1; }
.paper-region { font-size: 16px; font-weight: 800; color: #222; margin-bottom: 4px; }
.paper-meta { font-size: 12px; color: var(--text-soft); }
.paper-arrow { color: #FF8C42; font-weight: 700; font-size: 14px; }

/* ---- 视频区（subject.html 简化版）---- */
#subjectVideoGrid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}

/* ---- 错题本卡 ---- */
.wrongbook-card {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px;
  padding: 24px 32px;
  background: linear-gradient(135deg, #6BB6FF 0%, #6C5CE7 100%);
  color: #fff; border-radius: 18px;
  box-shadow: 0 16px 40px rgba(108,92,231,0.3);
}
.wrongbook-card h3 { font-size: 20px; font-weight: 900; margin-bottom: 4px; }
.wrongbook-card p { margin: 0; opacity: 0.9; font-size: 14px; }
.wrongbook-card .btn-hero-primary { background: #fff; color: #6C5CE7; }

@media (max-width: 900px) {
  .subject-hero {
    grid-template-columns: auto 1fr;
    padding: 28px 28px;
    gap: 0 24px;
  }
  .subj-ring { width: 92px; height: 92px; }
  .ring-inner { width: 74px; height: 74px; }
  .ring-num { font-size: 20px; }
  .subj-icon-big { font-size: 52px; padding: 12px 14px; border-radius: 18px; }
  .subj-info h1 { font-size: 28px; }
  .ss-item { min-width: 60px; padding: 6px 12px; }
  .ss-num { font-size: 18px; }
  .knowledge-grid, #subjectVideoGrid { grid-template-columns: repeat(2, 1fr); }
  .paper-list { grid-template-columns: 1fr; }
  .wrongbook-card { grid-template-columns: 1fr; text-align: center; }
}
@media (max-width: 600px) {
  .subject-hero {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
    gap: 16px;
  }
  .subj-stats { justify-content: center; }
  .subj-actions { justify-content: center; }
}
@media (max-width: 560px) {
  .knowledge-grid, #subjectVideoGrid { grid-template-columns: 1fr; }
}
