:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f7fa;
  --bg-tertiary: #eef1f6;
  --bg-card: #ffffff;
  --bg-modal: #ffffff;
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a68;
  --text-tertiary: #6b7280;
  --text-muted: #9ca3af;
  --border-color: #e5e7eb;
  --border-light: #f0f1f5;
  --accent-primary: #3b82f6;
  --accent-primary-hover: #2563eb;
  --accent-secondary: #6366f1;
  --accent-success: #10b981;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;
  --accent-purple: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-orange: #f97316;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;

  --cat-哲: #7c3aed;
  --cat-经: #0891b2;
  --cat-法: #dc2626;
  --cat-教: #059669;
  --cat-文: #d97706;
  --cat-史: #92400e;
  --cat-理: #2563eb;
  --cat-工: #1e40af;
  --cat-农: #16a34a;
  --cat-医: #dc2626;
  --cat-管: #7c3aed;
  --cat-艺: #db2777;
  --cat-军: #374151;

  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --container-width: 1200px;
}

[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-card: #1e293b;
  --bg-modal: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --text-muted: #64748b;
  --border-color: #334155;
  --border-light: #1e293b;
  --accent-primary: #60a5fa;
  --accent-primary-hover: #3b82f6;
  --accent-secondary: #818cf8;
  --accent-success: #34d399;
  --accent-warning: #fbbf24;
  --accent-danger: #f87171;
  --accent-purple: #a78bfa;
  --accent-pink: #f472b6;
  --accent-orange: #fb923c;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.6);

  --cat-哲: #a78bfa;
  --cat-经: #22d3ee;
  --cat-法: #f87171;
  --cat-教: #34d399;
  --cat-文: #fbbf24;
  --cat-史: #f59e0b;
  --cat-理: #60a5fa;
  --cat-工: #3b82f6;
  --cat-农: #4ade80;
  --cat-医: #f87171;
  --cat-管: #a78bfa;
  --cat-艺: #f472b6;
  --cat-军: #94a3b8;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.hidden {
  display: none !important;
}

.site-header {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  color: white;
  padding: 24px 0;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

[data-theme="dark"] .site-header {
  background: linear-gradient(135deg, #1e3a8a 0%, #4c1d95 100%);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.logo-area {
  flex: 1;
  min-width: 280px;
}

.logo {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.tagline {
  font-size: 14px;
  opacity: 0.9;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle,
.favorites-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
  backdrop-filter: blur(10px);
}

.theme-toggle:hover,
.favorites-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.theme-icon-light { display: inline; }
.theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark { display: inline; }

.fav-count {
  background: var(--accent-danger);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 4px;
}

.main-content {
  padding: 32px 20px;
  min-height: calc(100vh - 300px);
}

.search-section {
  margin-bottom: 28px;
}

.search-box {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.search-input {
  flex: 1;
  padding: 16px 20px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: 15px;
  background: var(--bg-card);
  color: var(--text-primary);
  transition: all var(--transition-fast);
  outline: none;
}

.search-input:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-btn {
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-md);
}

.search-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.search-tips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--text-tertiary);
  font-size: 13px;
}

.tag {
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--bg-tertiary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 13px;
}

.tag:hover {
  background: var(--accent-primary);
  color: white;
}

.hot-tag {
  color: var(--accent-danger);
  font-weight: 500;
}

.filters-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.filter-group {
  margin-bottom: 20px;
}

.filter-group:last-child {
  margin-bottom: 0;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

.filter-row .filter-group {
  margin-bottom: 0;
  flex: 1;
  min-width: 250px;
}

.filter-label {
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-size: 14px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab-btn {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.tab-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

.tab-btn.small {
  padding: 6px 12px;
  font-size: 13px;
}

.sort-group {
  min-width: 180px !important;
}

.sort-select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition-fast);
}

.sort-select:focus {
  border-color: var(--accent-primary);
}

.stats-bar {
  display: flex;
  gap: 24px;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-label {
  color: var(--text-tertiary);
  font-size: 14px;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-primary);
}

.loading-state,
.error-state,
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-tertiary);
}

.loader {
  width: 48px;
  height: 48px;
  border: 4px solid var(--bg-tertiary);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-icon,
.empty-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.error-state h3,
.empty-state h3 {
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: 20px;
}

.error-state p,
.empty-state p {
  margin-bottom: 20px;
}

.btn-primary {
  padding: 12px 28px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

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

.major-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.major-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--card-cat-color, var(--accent-primary));
}

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

.major-card[data-cat="哲"] { --card-cat-color: var(--cat-哲); }
.major-card[data-cat="经"] { --card-cat-color: var(--cat-经); }
.major-card[data-cat="法"] { --card-cat-color: var(--cat-法); }
.major-card[data-cat="教"] { --card-cat-color: var(--cat-教); }
.major-card[data-cat="文"] { --card-cat-color: var(--cat-文); }
.major-card[data-cat="史"] { --card-cat-color: var(--cat-史); }
.major-card[data-cat="理"] { --card-cat-color: var(--cat-理); }
.major-card[data-cat="工"] { --card-cat-color: var(--cat-工); }
.major-card[data-cat="农"] { --card-cat-color: var(--cat-农); }
.major-card[data-cat="医"] { --card-cat-color: var(--cat-医); }
.major-card[data-cat="管"] { --card-cat-color: var(--cat-管); }
.major-card[data-cat="艺"] { --card-cat-color: var(--cat-艺); }
.major-card[data-cat="军"] { --card-cat-color: var(--cat-军); }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  padding-right: 32px;
}

.card-title {
  flex: 1;
}

.major-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.3;
}

.major-code {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
}

.card-badges {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.badge {
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge-cat {
  background: var(--card-cat-color, var(--accent-primary));
  color: white;
}

.badge-degree {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.badge-first-class {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}

.badge-feature {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: white;
}

.badge-hot {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
}

.card-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.meta-label {
  color: var(--text-muted);
}

.meta-value {
  font-weight: 600;
  color: var(--text-primary);
}

.popularity-stars {
  display: inline-flex;
  gap: 1px;
  color: #fbbf24;
  font-size: 12px;
}

.card-stats {
  border-top: 1px solid var(--border-light);
  padding-top: 16px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.stat-row:last-child {
  margin-bottom: 0;
}

.stat-name {
  font-size: 13px;
  color: var(--text-tertiary);
}

.progress-bar {
  flex: 1;
  max-width: 140px;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
  margin: 0 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-success), #34d399);
  border-radius: 4px;
  transition: width var(--transition-slow);
}

.progress-fill.medium {
  background: linear-gradient(90deg, var(--accent-warning), #fbbf24);
}

.progress-fill.low {
  background: linear-gradient(90deg, var(--accent-danger), #f87171);
}

.stat-value-num {
  font-weight: 700;
  font-size: 13px;
  min-width: 50px;
  text-align: right;
  color: var(--text-primary);
}

.salary-value {
  color: var(--accent-orange);
}

.favorite-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all var(--transition-fast);
  z-index: 2;
}

.favorite-btn:hover {
  background: var(--bg-tertiary);
  transform: scale(1.1);
}

.favorite-btn.active {
  color: var(--accent-danger);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn var(--transition-normal);
  backdrop-filter: blur(4px);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--bg-modal);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 960px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: var(--shadow-modal);
  animation: slideUp var(--transition-normal);
  position: relative;
  display: flex;
  flex-direction: column;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 18px;
  cursor: pointer;
  z-index: 10;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--accent-danger);
  color: white;
  transform: rotate(90deg);
}

.modal-content {
  overflow-y: auto;
  flex: 1;
}

.modal-loading {
  padding: 60px 20px;
  text-align: center;
}

.detail-header {
  padding: 32px 32px 24px;
  background: linear-gradient(135deg, var(--detail-cat-color, var(--accent-primary)) 0%, var(--accent-secondary) 100%);
  color: white;
  position: relative;
}

.detail-header[data-cat="哲"] { background: linear-gradient(135deg, var(--cat-哲), #5b21b6); }
.detail-header[data-cat="经"] { background: linear-gradient(135deg, var(--cat-经), #0e7490); }
.detail-header[data-cat="法"] { background: linear-gradient(135deg, var(--cat-法), #b91c1c); }
.detail-header[data-cat="教"] { background: linear-gradient(135deg, var(--cat-教), #047857); }
.detail-header[data-cat="文"] { background: linear-gradient(135deg, var(--cat-文), #b45309); }
.detail-header[data-cat="史"] { background: linear-gradient(135deg, var(--cat-史), #78350f); }
.detail-header[data-cat="理"] { background: linear-gradient(135deg, var(--cat-理), #1d4ed8); }
.detail-header[data-cat="工"] { background: linear-gradient(135deg, var(--cat-工), #1e3a8a); }
.detail-header[data-cat="农"] { background: linear-gradient(135deg, var(--cat-农), #15803d); }
.detail-header[data-cat="医"] { background: linear-gradient(135deg, var(--cat-医), #b91c1c); }
.detail-header[data-cat="管"] { background: linear-gradient(135deg, var(--cat-管), #6d28d9); }
.detail-header[data-cat="艺"] { background: linear-gradient(135deg, var(--cat-艺), #be185d); }
.detail-header[data-cat="军"] { background: linear-gradient(135deg, var(--cat-军), #1f2937); }

.detail-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  padding-right: 40px;
}

.detail-subtitle {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  font-size: 14px;
  opacity: 0.95;
  margin-top: 12px;
}

.detail-subtitle .item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.detail-tabs {
  display: flex;
  gap: 4px;
  padding: 16px 32px 0;
  background: var(--bg-card);
  border-bottom: 2px solid var(--border-light);
  overflow-x: auto;
  position: sticky;
  top: 0;
  z-index: 5;
}

.detail-tab {
  padding: 14px 20px;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.detail-tab:hover {
  color: var(--accent-primary);
}

.detail-tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.detail-body {
  padding: 28px 32px;
}

.tab-section {
  display: none;
  animation: fadeIn var(--transition-normal);
}

.tab-section.active {
  display: block;
}

.tab-section h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-section h3::before {
  content: '';
  width: 4px;
  height: 20px;
  background: var(--accent-primary);
  border-radius: 2px;
}

.section-block {
  margin-bottom: 28px;
}

.overview-text {
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: var(--radius-md);
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 16px;
  border-left: 4px solid var(--accent-primary);
}

.charts-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.chart-card {
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: var(--radius-md);
}

.chart-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.pie-chart-container {
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.pie-chart {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  position: relative;
  transition: transform var(--transition-normal);
}

.pie-chart:hover {
  transform: scale(1.05);
}

.pie-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend-value {
  font-weight: 600;
  color: var(--text-primary);
  margin-left: auto;
}

.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.bar-label {
  width: 80px;
  font-size: 12px;
  color: var(--text-secondary);
  text-align: right;
  flex-shrink: 0;
}

.bar-track {
  flex: 1;
  height: 24px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 4px;
  transition: width 0.8s ease;
  display: flex;
  align-items: center;
  padding-right: 8px;
  justify-content: flex-end;
}

.bar-fill-text {
  color: white;
  font-size: 11px;
  font-weight: 600;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.course-item {
  background: var(--bg-secondary);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  border-left: 3px solid var(--accent-primary);
}

.course-item:hover {
  background: var(--accent-primary);
  color: white;
  transform: translateX(4px);
}

.industries-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.industry-item {
  background: var(--bg-secondary);
  padding: 14px 18px;
  border-radius: var(--radius-md);
}

.industry-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-weight: 600;
}

.industry-name {
  color: var(--text-primary);
  font-size: 14px;
}

.industry-percent {
  color: var(--accent-primary);
}

.industry-bar {
  height: 10px;
  background: var(--bg-tertiary);
  border-radius: 5px;
  overflow: hidden;
}

.industry-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-purple));
  border-radius: 5px;
  transition: width 0.8s ease;
}

.salary-highlight {
  background: linear-gradient(135deg, var(--accent-orange), #ea580c);
  color: white;
  padding: 20px;
  border-radius: var(--radius-md);
  text-align: center;
  margin-bottom: 24px;
}

.salary-number {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 4px;
}

.salary-desc {
  font-size: 14px;
  opacity: 0.9;
}

.cities-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.city-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

.city-rank {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.city-item:nth-child(1) .city-rank { background: #fbbf24; color: #78350f; }
.city-item:nth-child(2) .city-rank { background: #9ca3af; color: white; }
.city-item:nth-child(3) .city-rank { background: #d97706; color: white; }

.city-name {
  flex: 1;
  font-weight: 500;
  font-size: 14px;
}

.city-bar {
  flex: 2;
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  overflow: hidden;
  max-width: 200px;
}

.city-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-orange), #f97316);
  border-radius: 4px;
}

.city-salary {
  font-weight: 700;
  color: var(--accent-orange);
  font-size: 14px;
  min-width: 70px;
  text-align: right;
}

.post-list,
.university-list,
.qa-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.post-item,
.university-item,
.qa-item {
  background: var(--bg-secondary);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.post-item:hover,
.university-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}

.post-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-size: 15px;
}

.post-major {
  font-size: 13px;
  color: var(--text-tertiary);
}

.post-major::before {
  content: '→ 推荐考研专业：';
  color: var(--accent-primary);
  font-weight: 500;
}

.university-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.university-name {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 15px;
}

.university-levels {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.level-tag {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.level-985 {
  background: #dc2626;
  color: white;
}

.level-211 {
  background: #2563eb;
  color: white;
}

.level-double {
  background: #059669;
  color: white;
}

.level-strongbase {
  background: linear-gradient(135deg, #7c3aed, #6366f1);
  color: white;
}

.university-score {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.score-label {
  color: var(--text-tertiary);
}

.score-value {
  font-weight: 700;
  color: var(--accent-orange);
  font-size: 16px;
}

.qa-item {
  border-left: 4px solid var(--accent-primary);
}

.qa-q {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-size: 14px;
  display: flex;
  gap: 8px;
}

.qa-q::before {
  content: 'Q';
  background: var(--accent-primary);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.qa-a {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
  padding-left: 28px;
}

.select-subjects-card {
  background: var(--bg-secondary);
  padding: 20px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.subject-preferred {
  display: inline-block;
  background: var(--accent-primary);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  font-size: 14px;
}

.subjects-section {
  margin-bottom: 20px;
}

.subjects-title {
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
  font-size: 14px;
}

.subject-bar-row {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 8px;
}

.subject-bar-label {
  width: 100px;
  font-size: 13px;
  color: var(--text-secondary);
}

.subject-bar-track {
  flex: 1;
  height: 10px;
  background: var(--bg-tertiary);
  border-radius: 5px;
  overflow: hidden;
}

.subject-bar-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.8s ease;
}

.fill-physics { background: linear-gradient(90deg, #3b82f6, #1d4ed8); }
.fill-history { background: linear-gradient(90deg, #f59e0b, #d97706); }

.subject-bar-value {
  width: 45px;
  text-align: right;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}

.second-subjects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.second-subject-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-primary);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.second-subject-combo {
  color: var(--text-secondary);
}

.second-subject-percent {
  color: var(--accent-primary);
  font-weight: 600;
}

.related-section {
  padding: 24px 32px 32px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
}

.related-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.related-item {
  background: var(--bg-card);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid var(--border-light);
}

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

.related-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: 4px;
}

.related-code {
  font-size: 12px;
  color: var(--text-muted);
  font-family: 'Courier New', monospace;
}

.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  border: none;
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  z-index: 99;
  transition: all var(--transition-fast);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.back-to-top:not(.hidden) {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.site-footer {
  background: var(--bg-secondary);
  padding: 24px 0;
  border-top: 1px solid var(--border-light);
  margin-top: 48px;
}

.footer-inner {
  text-align: center;
  color: var(--text-tertiary);
  font-size: 13px;
}

.footer-links {
  margin-top: 8px;
}

.footer-links a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-primary-hover);
  text-decoration: underline;
}

@media (max-width: 1200px) {
  :root {
    --container-width: 100%;
  }

  .majors-grid {
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  }
}

@media (max-width: 768px) {
  .logo {
    font-size: 22px;
  }

  .tagline {
    font-size: 12px;
  }

  .main-content {
    padding: 20px 12px;
  }

  .search-box {
    flex-direction: column;
  }

  .search-btn {
    width: 100%;
  }

  .filters-section {
    padding: 16px;
  }

  .filter-row {
    flex-direction: column;
    gap: 16px;
  }

  .filter-row .filter-group {
    min-width: 100%;
  }

  .stats-bar {
    gap: 12px;
    padding: 12px 16px;
  }

  .stat-value {
    font-size: 16px;
  }

  .majors-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .detail-header,
  .detail-tabs,
  .detail-body,
  .related-section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .detail-header {
    padding-top: 24px;
    padding-bottom: 20px;
  }

  .detail-title {
    font-size: 22px;
  }

  .detail-tabs {
    padding-top: 12px;
  }

  .detail-tab {
    padding: 12px 14px;
    font-size: 13px;
  }

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

  .courses-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .modal {
    max-height: 95vh;
    border-radius: var(--radius-lg);
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 16px 0;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .logo-area {
    min-width: 100%;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .theme-toggle,
  .favorites-btn {
    padding: 8px 12px;
    font-size: 13px;
  }

  .tab-btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  .tab-btn.small {
    padding: 5px 10px;
    font-size: 12px;
  }

  .major-card {
    padding: 16px;
  }

  .major-name {
    font-size: 16px;
  }

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

  .detail-header {
    padding-top: 20px;
    padding-bottom: 16px;
  }

  .detail-title {
    font-size: 18px;
    padding-right: 32px;
  }

  .detail-subtitle {
    gap: 8px 14px;
    font-size: 13px;
  }

  .detail-tab {
    padding: 10px 10px;
    font-size: 12px;
  }

  .detail-body {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .tab-section h3 {
    font-size: 16px;
  }

  .overview-text {
    padding: 14px;
    font-size: 13px;
  }

  .courses-grid {
    grid-template-columns: 1fr;
  }

  .charts-row {
    gap: 14px;
  }

  .pie-chart {
    width: 100px;
    height: 100px;
  }

  .university-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .salary-number {
    font-size: 28px;
  }

  .city-item {
    flex-wrap: wrap;
  }

  .city-bar {
    max-width: 100%;
    flex-basis: 100%;
    order: 3;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    font-size: 12px;
    line-height: 1.8;
  }

  .footer-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
}
