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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f7fa;
  color: #1a1a2e;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 头部 */
.header {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  color: white;
  padding: 40px 0 50px;
}

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

.header-left {
  flex: 1;
}

.header-right {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-search {
  position: relative;
  width: 240px;
}

.header-search .header-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  z-index: 1;
}

.header-search input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  outline: none;
  transition: all 0.2s;
  box-sizing: border-box;
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.header-search input:focus {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.fav-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 10px 18px;
  border-radius: 24px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.fav-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.fav-count {
  background: #ef4444;
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 4px;
}

.logo {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

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

/* 搜索区 */
.search-section {
  margin-top: -30px;
  margin-bottom: 30px;
}

.search-box {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.search-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.search-item {
  flex: 1;
  min-width: 140px;
}

.search-item label {
  display: block;
  font-size: 13px;
  color: #64748b;
  margin-bottom: 6px;
  font-weight: 500;
}

.search-item input,
.search-item select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.search-item input:focus,
.search-item select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-btn-wrap {
  flex: 0 0 auto;
  min-width: 100px;
}

.btn-primary {
  width: 100%;
  padding: 10px 24px;
  background: linear-gradient(135deg, #3b82f6, #1e40af);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.filter-row {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.filter-label {
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
}

.checkbox-item input {
  cursor: pointer;
}

/* 选科下拉样式 */
.subject-item {
  flex: 2;
  min-width: 260px;
}

.subject-selects {
  display: flex;
  gap: 6px;
}

.subject-selects select {
  flex: 1;
  padding: 10px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
  background: white;
  cursor: pointer;
  min-width: 0;
}

.subject-selects select:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.subject-selects select:disabled {
  background: #f8fafc;
  color: #cbd5e1;
  cursor: not-allowed;
}

/* 结果统计 */
.result-stats {
  margin-bottom: 16px;
  font-size: 14px;
  color: #64748b;
}

.result-stats strong {
  color: #1e3a8a;
  font-size: 16px;
}

/* 院校列表 */
.school-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.school-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
  border-left: 4px solid #3b82f6;
}

.school-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.school-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.school-name {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
}

.school-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}

.tag-province {
  background: #eff6ff;
  color: #2563eb;
}

.tag-level {
  background: #f0fdf4;
  color: #16a34a;
}

.tag-type {
  background: #fef3c7;
  color: #d97706;
}

.school-feature {
  color: #64748b;
  font-size: 14px;
  margin-bottom: 14px;
}

.school-majors {
  margin-top: 12px;
  border-top: 1px solid #f1f5f9;
  padding-top: 14px;
}

.major-count {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 10px;
}

.major-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.major-chip {
  padding: 6px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 6px;
}

.major-chip .score {
  font-weight: 600;
  color: #dc2626;
  font-size: 12px;
}

.major-chip .match {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.subject-tag {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #ede9fe;
  color: #7c3aed;
  font-weight: 500;
}

.match-chong {
  background: #fef2f2;
  color: #dc2626;
}

.match-wen {
  background: #fffbeb;
  color: #d97706;
}

.match-bao {
  background: #f0fdf4;
  color: #16a34a;
}

/* 冲稳保分组 */
.major-group {
  margin-bottom: 12px;
}

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

.major-group-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  padding-left: 8px;
  border-left: 3px solid;
  display: flex;
  align-items: center;
}

.major-group-title.group-chong {
  color: #dc2626;
  border-color: #dc2626;
}

.major-group-title.group-wen {
  color: #d97706;
  border-color: #d97706;
}

.major-group-title.group-bao {
  color: #16a34a;
  border-color: #16a34a;
}

.school-footer {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-fav-btn-footer {
  background: #fef2f2;
  color: #ef4444;
  border: 1px solid #fecaca;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.card-fav-btn-footer:hover {
  background: #fee2e2;
}

.card-fav-btn-footer.faved {
  background: #fee2e2;
}

.view-detail {
  color: #3b82f6;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.view-detail:hover {
  text-decoration: underline;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-tip {
  font-size: 13px;
  margin-top: 6px;
}

/* 引导卡片（未输入分数时） */
.guide-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  padding: 48px 32px;
  text-align: center;
  color: white;
  margin-top: 24px;
  box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.guide-icon {
  font-size: 56px;
  margin-bottom: 16px;
}

.guide-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 24px;
}

.guide-tips {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.guide-tip {
  font-size: 14px;
  opacity: 0.95;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tip-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tip-chong { background: #fca5a5; }
.tip-wen { background: #fcd34d; }
.tip-bao { background: #86efac; }

.btn-guide {
  background: white;
  color: #667eea;
  border: none;
  padding: 12px 32px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-guide:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* 底部 */
.footer {
  margin-top: 60px;
  padding: 30px 0;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

.footer-small {
  font-size: 12px;
  margin-top: 6px;
}

/* 详情页 */
.detail-header {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.detail-header h1 {
  font-size: 24px;
  margin-bottom: 12px;
  color: #1e293b;
}

.detail-info {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.detail-info-item {
  font-size: 14px;
  color: #64748b;
}

.detail-info-item strong {
  color: #334155;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #3b82f6;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 20px;
}

.back-link:hover {
  text-decoration: underline;
}

.major-category {
  margin-bottom: 30px;
}

.category-title {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 4px solid #3b82f6;
}

.major-cards {
  display: grid;
  gap: 16px;
}

.major-card {
  background: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

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

.major-name {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

.major-score {
  text-align: right;
}

.score-value {
  font-size: 22px;
  font-weight: 700;
  color: #dc2626;
}

.score-label {
  font-size: 12px;
  color: #94a3b8;
}

.major-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  font-size: 13px;
  color: #64748b;
}

.major-meta span strong {
  color: #475569;
}

.major-section {
  margin-bottom: 12px;
}

.major-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}

.major-section-content {
  font-size: 13px;
  color: #64748b;
  line-height: 1.7;
}

.major-section ul {
  padding-left: 20px;
}

.major-section li {
  margin-bottom: 4px;
}

/* 地域政策 */
.region-policy {
  margin-top: 16px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 14px 16px;
}

.region-policy-title {
  font-size: 14px;
  font-weight: 600;
  color: #0369a1;
  margin-bottom: 6px;
}

.region-policy-content {
  font-size: 13px;
  color: #0c4a6e;
  line-height: 1.7;
}

/* 分类元信息 */
.category-meta {
  background: #f8fafc;
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid #e2e8f0;
}

.category-meta-title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e2e8f0;
}

.meta-row {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.6;
}

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

.meta-label {
  flex-shrink: 0;
  font-weight: 600;
  color: #475569;
  min-width: 90px;
}

.meta-value {
  color: #334155;
  flex: 1;
}

.meta-conditions {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
  font-size: 13px;
  color: #475569;
}

.meta-conditions ul {
  padding-left: 20px;
  margin-top: 6px;
}

.meta-conditions li {
  margin-bottom: 5px;
  line-height: 1.6;
}

.meta-notes {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
  font-size: 13px;
  color: #64748b;
}

.meta-notes ul {
  padding-left: 20px;
  margin-top: 6px;
}

.meta-notes li {
  margin-bottom: 5px;
  line-height: 1.6;
}

/* 报考关键信息时效栏 */
.urgent-info {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 1px solid #fdba74;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 20px;
}

.urgent-title {
  font-size: 16px;
  font-weight: 700;
  color: #c2410c;
  margin-bottom: 14px;
}

.urgent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.urgent-item {
  background: white;
  border-radius: 8px;
  padding: 12px 14px;
}

.urgent-item-title {
  font-size: 12px;
  color: #9a3412;
  font-weight: 600;
  margin-bottom: 6px;
}

.urgent-item-text {
  font-size: 13px;
  color: #78350f;
  line-height: 1.5;
}

.urgent-footer {
  margin-top: 12px;
  font-size: 12px;
  color: #a16207;
  text-align: right;
}

/* 详情页院校专属报考关键信息 */
.school-urgent {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #93c5fd;
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 12px;
}

.school-urgent-title {
  font-size: 15px;
  font-weight: 700;
  color: #1e40af;
  margin-bottom: 12px;
}

.school-urgent-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.school-urgent-item {
  background: white;
  border-radius: 6px;
  padding: 10px 12px;
}

.school-urgent-label {
  font-size: 12px;
  color: #1d4ed8;
  font-weight: 600;
  margin-bottom: 4px;
}

.school-urgent-text {
  font-size: 12px;
  color: #1e3a8a;
  line-height: 1.5;
}

.school-urgent-footer {
  margin-top: 10px;
  font-size: 11px;
  color: #3b82f6;
  text-align: right;
}

/* 就业与发展板块 */
.job-section {
  background: #f0fdf4;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.job-section .major-section-title {
  color: #166534;
}

.job-row {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.6;
}

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

.job-label {
  flex-shrink: 0;
  font-weight: 600;
  color: #15803d;
  min-width: 72px;
}

.job-value {
  color: #166534;
  flex: 1;
}

/* 报考避坑指南 */
.pitfall-section {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  border: 1px solid #fca5a5;
  border-radius: 12px;
  padding: 20px 22px;
  margin-top: 10px;
}

.pitfall-title {
  font-size: 17px;
  font-weight: 700;
  color: #b91c1c;
  margin-bottom: 14px;
}

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

.pitfall-item {
  background: white;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  color: #991b1b;
  line-height: 1.6;
  display: flex;
  gap: 10px;
}

.pitfall-dot {
  color: #ef4444;
  font-weight: 700;
  flex-shrink: 0;
}

/* 志愿清单侧栏 */
.fav-mask {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.fav-mask.show {
  opacity: 1;
  visibility: visible;
}

.fav-drawer {
  position: fixed;
  top: 0;
  right: -400px;
  width: 380px;
  height: 100%;
  background: white;
  z-index: 1000;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.fav-drawer.open {
  right: 0;
}

.fav-drawer-header {
  padding: 20px 24px;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fav-drawer-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.fav-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #9ca3af;
  padding: 4px 8px;
}

.fav-close:hover {
  color: #374151;
}

.fav-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.fav-empty {
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
  padding: 60px 20px;
  line-height: 1.8;
}

.fav-item {
  padding: 14px 24px;
  border-bottom: 1px solid #f9fafb;
  cursor: pointer;
  position: relative;
  transition: background 0.2s;
}

.fav-item:hover {
  background: #f9fafb;
}

.fav-item-name {
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.fav-item-meta {
  font-size: 12px;
  color: #6b7280;
}

.fav-item-del {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #d1d5db;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
}

.fav-item-del:hover {
  color: #ef4444;
}

/* 响应式 */
@media (max-width: 768px) {
  .header {
    padding: 30px 0 40px;
  }
  
  .logo {
    font-size: 22px;
  }
  
  .search-row {
    flex-direction: column;
  }
  
  .search-item,
  .search-btn-wrap {
    width: 100%;
  }
  
  .subject-item {
    min-width: auto;
  }
  
  .subject-selects {
    flex-direction: row;
  }
  
  .school-header {
    flex-direction: column;
  }

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

  .header-right {
    width: 100%;
    flex-direction: column;
    align-items: stretch !important;
  }

  .header-search {
    width: 100%;
  }

  .fav-btn {
    padding: 8px 14px;
    font-size: 13px;
    text-align: center;
  }

  .fav-drawer {
    width: 85%;
    right: -85%;
  }
  
  .detail-header {
    padding: 20px;
  }
  
  .detail-header h1 {
    font-size: 20px;
  }
  
  /* 移动端时效栏 */
  .urgent-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .urgent-info {
    padding: 14px 16px;
  }
  
  .urgent-title {
    font-size: 15px;
  }
  
  .urgent-item-text {
    font-size: 13px;
  }
  
  /* 移动端就业板块 */
  .job-row {
    flex-direction: column;
    gap: 4px;
  }
  
  .job-label {
    min-width: auto;
  }
  
  /* 移动端避坑指南 */
  .pitfall-section {
    padding: 16px;
  }
  
  .pitfall-title {
    font-size: 15px;
  }
  
  .pitfall-item {
    font-size: 13px;
    padding: 8px 12px;
  }
  
  /* 移动端专业卡片 */
  .major-card {
    padding: 16px;
  }
  
  .major-card-header {
    flex-direction: column;
  }
  
  .major-score {
    text-align: left;
  }
  
  .major-meta {
    flex-direction: column;
    gap: 6px;
  }
  
  /* 移动端分类元信息 */
  .meta-row {
    flex-direction: column;
    gap: 4px;
  }
  
  .meta-label {
    min-width: auto;
  }
  
  /* 移动端详情页时效栏 */
  .school-urgent-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .school-urgent {
    padding: 12px 14px;
  }
  
  .school-urgent-title {
    font-size: 14px;
  }

  /* 移动端引导卡片 */
  .guide-card {
    padding: 32px 20px;
    margin-top: 16px;
  }

  .guide-icon {
    font-size: 44px;
  }

  .guide-title {
    font-size: 18px;
  }

  .guide-tip {
    font-size: 13px;
  }

  /* 移动端冲稳保分组 */
  .major-group-title {
    font-size: 12px;
  }
}
