:root {
  --primary: #2563EB;
  --primary-light: #EFF6FF;
  --primary-dark: #1D4ED8;
  
  --bg: #F8FAFC;
  --bg-card: #FFFFFF;
  --text-main: #0F172A;
  --text-muted: #475569;
  --text-light: #94A3B8;
  
  --border-light: #E2E8F0;
  --border-hover: #CBD5E1;
  
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 3px 8px -2px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 6px 14px -3px rgba(15, 23, 42, 0.08);
  
  --radius-lg: 8px;
  --radius-md: 6px;
  --radius-sm: 4px;
  --transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  line-height: 1.35;
}

/* Background Ambient Glow */
.bg-decoration {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.22;
}

.bg-blob:nth-child(1) { width: 350px; height: 350px; background: #E0F2FE; top: -100px; right: -50px; }
.bg-blob:nth-child(2) { width: 300px; height: 300px; background: #F3E8FF; bottom: 0px; left: -80px; }

.container {
  max-width: 1720px;
  width: 98%;
  margin: 0 auto;
  padding: 14px 16px 24px 16px;
  z-index: 1;
}

/* 极致紧凑 Header */
header {
  text-align: center;
  margin-bottom: 12px;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 2px;
}

h1 {
  font-size: 1.38rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #0F172A 0%, #2563EB 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-badge {
  padding: 1px 8px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 100px;
  color: var(--primary-dark);
  font-size: 0.68rem;
  font-weight: 700;
}

p.subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* 板块区域 */
.section-block {
  margin-bottom: 12px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--border-light);
}

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-icon-badge {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-icon-badge svg {
  width: 13px;
  height: 13px;
}

.section-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
}

.section-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* 紧凑 5 列响应式网格 */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
  width: 100%;
}

/* 仅聚焦科目信息的超紧凑卡片 (Mini Card) */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  min-height: 48px;
}

.card:hover {
  transform: translateY(-1.5px);
  border-color: #94A3B8;
  box-shadow: var(--shadow-hover);
}

.card-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.card-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #334155;
  flex-shrink: 0;
}

.card-icon svg {
  width: 15px;
  height: 15px;
}

.card-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
}

.card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.card-subtag {
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.card-arrow {
  color: var(--text-light);
  font-size: 0.85rem;
  font-weight: 700;
  transition: transform 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.card:hover .card-arrow {
  transform: translateX(3px);
  color: var(--primary);
}

.card-featured {
  background: #FFFFFF;
  border-width: 1.2px;
}

@media (max-width: 1200px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
}

@media (max-width: 768px) {
  h1 { font-size: 1.2rem; }
  .container { padding: 8px 6px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
  .card { padding: 6px 8px; min-height: 44px; }
  .card-title { font-size: 0.85rem; }
  .card-subtag { font-size: 0.65rem; }
}
