/* ============================================
   状元高考 - 样式文件 v3
   精致学院风 · 蓝灰主色调
   ============================================ */

:root {
  --primary: #1e40af;
  --primary-light: #3b82f6;
  --primary-dark: #1e3a8a;
  --primary-bg: #eff6ff;
  --accent-red: #ef4444;
  --accent-orange: #f97316;
  --accent-green: #22c55e;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 40px -5px rgba(0,0,0,0.1), 0 10px 15px -6px rgba(0,0,0,0.06);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  background: #f0f4f9;
  color: var(--gray-800);
  min-height: 100vh;
  line-height: 1.6;
}

/* ===== Navigation ===== */
.navbar {
  background: linear-gradient(135deg, var(--primary) 0%, #1a37a0 50%, var(--primary-dark) 100%);
  color: white;
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  backdrop-filter: blur(8px);
}

.navbar .logo {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: white;
}

.navbar .logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-links a:hover, .nav-links a.active {
  background: rgba(255,255,255,0.15);
  color: white;
}

.nav-auth {
  display: flex;
  gap: 8px;
  align-items: center;
}

.nav-auth .btn {
  padding: 5px 18px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.nav-auth .btn-login {
  background: white;
  color: var(--primary);
}

.nav-auth .btn-login:hover { background: var(--gray-100); }

.nav-auth .btn-register {
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.5);
}

.nav-auth .btn-register:hover { background: rgba(255,255,255,0.12); }

.nav-user { display: flex; align-items: center; gap: 10px; }
.nav-user .user-name { font-size: 0.82rem; opacity: 0.9; }
.nav-user .btn-logout {
  background: rgba(255,255,255,0.12);
  color: white; border: none; padding: 3px 12px;
  border-radius: 16px; font-size: 0.78rem; cursor: pointer;
}
.nav-user .btn-logout:hover { background: rgba(255,255,255,0.25); }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1e4bc0 40%, var(--primary-light) 100%);
  color: white;
  padding: 3.5rem 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 10% 80%, rgba(255,255,255,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 500px 500px at 90% 20%, rgba(255,255,255,0.04) 0%, transparent 60%);
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  position: relative;
  letter-spacing: -0.5px;
}

.hero p {
  font-size: 1.05rem;
  opacity: 0.85;
  max-width: 540px;
  margin: 0 auto;
  position: relative;
  font-weight: 400;
}

/* ===== Form ===== */
.recommend-form {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem 2.5rem;
  max-width: 820px;
  margin: -1.8rem auto 2rem;
  position: relative;
  z-index: 10;
  box-shadow: var(--shadow-xl);
}

.recommend-form .form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: flex-end;
}

.recommend-form .form-group {
  flex: 1;
  min-width: 130px;
}

.recommend-form label {
  display: block;
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-bottom: 5px;
  font-weight: 500;
}

.rec-form-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 次选科目按钮组 */
.subject-btn-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.subject-btn {
  padding: 8px 18px;
  border: 2px solid var(--gray-200);
  border-radius: 8px;
  background: var(--gray-50);
  color: var(--gray-600);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.subject-btn:hover {
  border-color: var(--primary-light);
  background: var(--primary-bg);
  color: var(--primary);
}

.subject-btn.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
  box-shadow: 0 2px 8px rgba(30,64,175,0.25);
}

.subject-btn.subject-btn-disabled {
  border-color: var(--gray-100);
  background: var(--gray-50);
  color: var(--gray-300);
  cursor: not-allowed;
}

.subject-btn.subject-btn-disabled:hover {
  border-color: var(--gray-100);
  background: var(--gray-50);
  color: var(--gray-300);
}

.recommend-form select, .recommend-form input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.95rem;
  background: var(--gray-50);
  transition: all 0.2s;
  outline: none;
  color: var(--gray-700);
}

.recommend-form select:focus, .recommend-form input:focus {
  border-color: var(--primary-light);
  background: white;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  border: none;
  padding: 10px 32px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(30, 64, 175, 0.35);
}

.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 1.5px solid var(--primary-light);
  padding: 7px 18px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
}

.btn-secondary:hover { background: var(--primary-bg); }

/* ===== Results ===== */
.results-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (max-width: 900px) {
  .results-grid { grid-template-columns: 1fr; }
}

.strategy-column { min-height: 200px; }

.strategy-column h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.strategy-column .strategy-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.strategy-column .strategy-count {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-bottom: 1rem;
}

.chong .strategy-badge { background: #fef2f2; color: var(--accent-red); }
.wen .strategy-badge { background: #fff7ed; color: var(--accent-orange); }
.bao .strategy-badge { background: #f0fdf4; color: var(--accent-green); }

/* ===== Card ===== */
.card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  margin-bottom: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--gray-100);
  position: relative;
  overflow: hidden;
}

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

.card .card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.card .school-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center; justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  background-size: cover !important;
  background-position: center !important;
  overflow: hidden;
}

.card .school-avatar-img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 3px;
}

.card .school-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--gray-900);
}

.card .school-badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.card .badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 500;
}

.badge-province { background: var(--primary-bg); color: var(--primary); }
.badge-type { background: #f0fdf4; color: #16a34a; }
.badge-ownership { background: #fefce8; color: #a16207; }
.badge-tag { background: #f5f3ff; color: #7c3aed; }
.badge-level { background: #fff7ed; color: var(--accent-orange); }

.card .major-name {
  font-size: 0.87rem;
  color: var(--gray-600);
  margin-bottom: 4px;
}

.card .card-stats {
  display: flex;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--gray-500);
}

.card .card-stats span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.card .card-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.card .card-actions .btn-sm {
  padding: 3px 10px;
  font-size: 0.72rem;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}

.card .btn-add-plan {
  background: var(--primary-bg);
  color: var(--primary);
  font-weight: 500;
}

.card .btn-add-plan:hover { background: var(--primary); color: white; }

.score-range-label {
  font-size: 0.72rem;
  color: var(--gray-400);
  display: block;
  margin-bottom: 6px;
}

/* ===== Modal ===== */
/* Modal Content - must have position:relative for close button */
.modal-content {
  background: white;
  border-radius: var(--radius-lg);
  width: 95%;
  max-width: 1000px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0,0,0,0.25);
  animation: modalUp 0.25s ease;
  position: relative;
}

.modal-content-wide {
  max-width: 1200px;
}

.school-detail-modal {
  background: white;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(0,0,0,0.2);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  color: white;
  cursor: pointer;
  z-index: 20;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.modal-close:hover {
  background: rgba(0,0,0,0.4);
}

.header-content {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.school-badge-lg {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 3px solid rgba(255,255,255,0.5);
  background: #1e40af;
  overflow: hidden;
}

.school-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 2px;
}

.school-subtitle {
  font-size: 0.78rem;
  opacity: 0.85;
  line-height: 1.4;
}

.rankings-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.ranking-item {
  padding: 4px 10px;
  border-radius: var(--radius);
  font-size: 0.72rem;
  white-space: nowrap;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.info-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 0.82rem;
  text-align: center;
}

.info-item strong {
  display: block;
  font-size: 0.7rem;
  color: #64748b;
  margin-bottom: 2px;
}

.modal-section {
  margin-top: 12px;
}

.modal-section h4 {
  font-size: 0.9rem;
  color: var(--gray-800);
  margin-bottom: 10px;
  font-weight: 600;
}

.section-icon {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  margin-right: 4px;
  font-size: 0.8rem;
}

/* Modal table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  background: white;
}

.data-table th {
  background: #f1f5f9;
  padding: 8px 6px;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #cbd5e1;
  white-space: nowrap;
}

.data-table td {
  padding: 7px 6px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.data-table tr:hover {
  background: #f8fafc;
}

.modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(15,23,42,0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 1000px;
  width: 95%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0,0,0,0.25);
  animation: modalUp 0.25s ease;
}

@keyframes modalUp {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ===== Modal School Header (Banner) ===== */
.modal-school-header {
  position: relative;
  background: linear-gradient(135deg, var(--primary) 0%, #1e4bc0 50%, #2563eb 100%);
  padding: 2rem 2rem 1.5rem;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  color: white;
  overflow: hidden;
  min-height: 130px;
}

.modal-school-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 500px 300px at 0% 100%, rgba(255,255,255,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 300px 400px at 100% 0%, rgba(255,255,255,0.05) 0%, transparent 60%);
  pointer-events: none;
}

.modal-school-header .header-content {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.modal-school-header .school-badge-lg {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center; justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1.8rem;
  flex-shrink: 0;
  background-size: cover !important;
  background-position: center !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  overflow: hidden;
}

.modal-school-header .school-badge-lg img {
  width: 100%; height: 100%;
  object-fit: cover;
  padding: 0;
}

.modal-school-header .school-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.modal-school-header .school-subtitle {
  font-size: 0.82rem;
  opacity: 0.8;
  margin-top: 2px;
}

.modal-close {
  position: absolute;
  top: 12px; right: 14px;
  background: rgba(255,255,255,0.15);
  border: none;
  color: white;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center; justify-content: center;
  transition: all 0.15s;
  z-index: 2;
}

.modal-close:hover { background: rgba(255,255,255,0.3); }

/* ===== Modal Body ===== */
.modal-body {
  padding: 1.5rem 2rem;
}

/* Section */
.modal-section {
  margin-bottom: 1.25rem;
  background: white;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow);
}

.modal-section h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-section h4 .section-icon {
  width: 26px; height: 26px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

/* Info Grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 6px;
}

.info-item {
  font-size: 0.82rem;
  color: var(--gray-600);
  padding: 6px 10px;
  background: var(--gray-50);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
}

.info-item strong {
  font-size: 0.68rem;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 1px;
}

/* ===== Tag Badges (硕士/博士点 etc) ===== */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.2;
  background: var(--gray-50);
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
}

.tagline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.school-badge-lg-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
}

.school-badge-lg {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center; justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1.8rem;
  flex-shrink: 0;
  background-size: cover !important;
  background-position: center !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  overflow: hidden;
}

@media (max-width: 768px) {
  .school-badge-lg { width: 48px; height: 48px; font-size: 1.3rem; }
}

.tag-master { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.tag-phd { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.tag-school-level { background: #fefce8; color: #a16207; border-color: #fde68a; }
.tag-rank { background: #f5f3ff; color: #7c3aed; border-color: #ddd6fe; }
.tag-subject { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.tag-green { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.tag-blue { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.tag-orange { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.tag-red { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.tag-gray { background: var(--gray-100); color: var(--gray-600); border-color: var(--gray-200); }

/* ===== Info Card (转专业, 招生章程, 更名合并) ===== */
.info-card {
  padding: 0.75rem 1rem;
  background: var(--gray-50);
  border-radius: 8px;
  border-left: 3px solid var(--primary-light);
  font-size: 0.82rem;
  color: var(--gray-600);
  line-height: 1.65;
}

.info-card-blue { border-left-color: var(--primary-light); }
.info-card-green { border-left-color: var(--accent-green); }
.info-card-orange { border-left-color: var(--accent-orange); }

.info-card .info-card-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-500);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== School History Tagline ===== */
.history-tagline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #f0f4ff, #eff6ff);
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  font-size: 0.78rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

/* ===== Data Table ===== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.data-table th {
  background: var(--gray-50);
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--gray-500);
  border-bottom: 1.5px solid var(--gray-200);
  white-space: nowrap;
  font-size: 0.75rem;
}

.data-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
  color: var(--gray-600);
}

.data-table tbody tr { transition: background 0.12s; }
.data-table tbody tr:hover td { background: var(--primary-bg); }

/* ===== Search Page ===== */
.page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.page-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 1rem;
}

.search-bar input {
  flex: 1;
  padding: 10px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s;
  background: white;
}

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

.search-bar .search-btn {
  padding: 10px 20px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s;
}

.search-bar .search-btn:hover { background: var(--primary-dark); }

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.filter-bar select {
  padding: 7px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.82rem;
  background: white;
  min-width: 110px;
  cursor: pointer;
  outline: none;
  color: var(--gray-600);
}

.filter-bar select:focus { border-color: var(--primary-light); }

/* ===== School Card List ===== */
.school-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 2rem;
}

.pagination button {
  padding: 6px 14px;
  border: 1px solid var(--gray-200);
  background: white;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--gray-600);
  transition: all 0.15s;
  font-weight: 500;
}

.pagination button:hover { border-color: var(--primary-light); color: var(--primary); }
.pagination button.active { background: var(--primary); color: white; border-color: var(--primary); }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== Loading ===== */
.loading {
  text-align: center;
  padding: 3rem;
  color: var(--gray-400);
}

.loading .spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary-light);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 0.75rem;
}

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

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--gray-400);
}

.empty-state i { font-size: 2.5rem; margin-bottom: 0.75rem; opacity: 0.5; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 74px;
  right: 20px;
  padding: 10px 20px;
  border-radius: var(--radius);
  color: white;
  font-size: 0.85rem;
  z-index: 9999;
  animation: slideIn 0.25s ease;
  box-shadow: var(--shadow-lg);
  font-weight: 500;
}

.toast-success { background: var(--accent-green); }
.toast-error { background: var(--accent-red); }
.toast-info { background: var(--primary); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ===== Auth Modal ===== */
.auth-modal .modal { max-width: 400px; }
.auth-modal .auth-form { padding: 2rem 1.5rem; }
.auth-modal .auth-form h2 { text-align: center; margin-bottom: 1.5rem; color: var(--gray-800); }
.auth-form .form-group { margin-bottom: 1rem; }
.auth-form .form-group label { display: block; font-size: 0.82rem; color: var(--gray-500); margin-bottom: 4px; }
.auth-form .form-group input {
  width: 100%;
  padding: 9px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s;
}
.auth-form .form-group input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}
.auth-form .btn-primary { width: 100%; margin-top: 0.5rem; }
.auth-form .auth-switch {
  text-align: center; margin-top: 1rem;
  font-size: 0.82rem; color: var(--gray-500);
}
.auth-form .auth-switch a { color: var(--primary); cursor: pointer; text-decoration: underline; }

/* ===== Plan ===== */
.plan-list { display: grid; gap: 1rem; }
.plan-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  border: 1px solid var(--gray-100);
  transition: box-shadow 0.2s;
}
.plan-card:hover { box-shadow: var(--shadow-md); }
.plan-card .plan-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.75rem;
}
.plan-card .plan-name { font-size: 1rem; font-weight: 600; }
.plan-card .plan-meta { font-size: 0.78rem; color: var(--gray-400); }
.plan-card .btn-delete {
  background: #fef2f2; color: var(--accent-red);
  border: none; padding: 4px 12px; border-radius: 4px; cursor: pointer; font-size: 0.78rem;
}
.plan-card .btn-delete:hover { background: var(--accent-red); color: white; }
.plan-items { display: flex; flex-wrap: wrap; gap: 6px; }
.plan-item-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; background: var(--primary-bg);
  color: var(--primary); border-radius: 16px; font-size: 0.78rem;
}
.plan-detail-items { display: flex; flex-direction: column; gap: 8px; }
.plan-detail-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; background: var(--gray-50); border-radius: var(--radius); font-size: 0.82rem;
}

/* ===== 推荐卡片双列统计 ===== */
.card-stats-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem 0.75rem;
  padding: 0.5rem 0.75rem;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-100);
  font-size: 0.74rem;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-label {
  color: var(--gray-400);
  font-size: 0.68rem;
}

.stat-value {
  color: var(--gray-600);
  font-weight: 600;
  font-size: 0.74rem;
}

.diff-up { color: var(--accent-red); }
.diff-down { color: var(--accent-green); }

.strategy-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr !important;
  gap: 0.75rem;
}

@media (max-width: 768px) {
  .strategy-card-grid { grid-template-columns: 1fr !important; }
}

/* ===== Strategy Section Header ===== */
.strategy-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0 0.25rem;
}

.strategy-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.strategy-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.strategy-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--gray-800);
  letter-spacing: -0.3px;
}

.strategy-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
}

.strategy-section-meta {
  font-size: 0.8rem;
}

.strategy-count {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .navbar { padding: 0 1rem; }
  .nav-links a { padding: 5px 9px; font-size: 0.78rem; }
  .hero h1 { font-size: 1.5rem; }
  .hero p { font-size: 0.88rem; }
  .recommend-form { margin: -1.2rem 0.75rem 1.5rem; padding: 1.25rem 1rem; }
  .recommend-form .form-row { flex-direction: column; }
  .results-grid { grid-template-columns: 1fr; }
  .school-card-list { grid-template-columns: 1fr; }
  .modal { margin: 0.5rem; max-height: 95vh; }
  .modal-body { padding: 1rem 1rem; }
  .modal-school-header { padding: 1.5rem 1rem; min-height: 100px; }
  .modal-school-header .school-title { font-size: 1.1rem; }
  .modal-school-header .school-badge-lg { width: 48px; height: 48px; font-size: 1.3rem; }
  .info-grid { grid-template-columns: 1fr 1fr; }
  .filter-bar { flex-direction: column; }
  .filter-bar select { width: 100%; }
}

@media (max-width: 480px) {
  .nav-links { gap: 2px; }
  .nav-links a { padding: 4px 7px; font-size: 0.72rem; }
  .info-grid { grid-template-columns: 1fr; }
}

/* ===== 学校标签条带 (985/211/双一流/软科) ===== */
.tag-level,
.tag-level,
.tag-level-985,
.tag-level-211,
.tag-level-double,
.tag-level-key,
.tag-level-rank,
.tag-level-baoyan {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.4;
  color: white;
  letter-spacing: 0.3px;
}

.tag-level { background: linear-gradient(135deg, #4b5563, #6b7280); }
.tag-level-985 { background: linear-gradient(135deg, #b91c1c, #ef4444); }
.tag-level-211 { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.tag-level-double { background: linear-gradient(135deg, #0369a1, #0ea5e9); }
.tag-level-key { background: linear-gradient(135deg, #15803d, #22c55e); }
.tag-level-rank { background: linear-gradient(135deg, #92400e, #f59e0b); }
.tag-level-baoyan { background: linear-gradient(135deg, #6b21a8, #d946ef); }

/* ===== 推荐卡片新版 ===== */
.rec-card {
  display: flex;
  background: white;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 100px;
}

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

/* 校徽侧边柱（固定正方形，不受内容高度影响） */
.rec-card-badge-side {
  width: 80px;
  min-width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  flex-shrink: 0;
  align-self: stretch;
  justify-content: center;
  position: relative;
  border-right: 1px solid var(--gray-200);
}
.rec-badge-logo {
  margin-bottom: 12px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover !important;
  background-position: center !important;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.rec-badge-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.rec-card-badge-text {
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
}
/* 录取概率徽章 - 盾牌/五边形，只显示数字 */
.rec-badge-prob {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 30px;
  position: relative;
  color: #fff;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: linear-gradient(135deg, #dc2626, #b91c1c);
}
.rec-badge-prob .prob-val {
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}
/* 录取率文字在徽章下方 */
.rec-prob-text {
  font-size: 0.65rem;
  font-weight: 700;
  color: #666;
  line-height: 1;
  margin-top: 3px;
}
/* 移除旧的pendant/伪元素 */
.rec-card-badge-side::before,
.rec-card-badge-side::after {
  display: none;
  content: none;
}




.rec-card-badge-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rec-card-badge-text {
  color: white;
  font-size: 1.5rem;
  font-weight: 800;
}

.rec-card-badge-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  padding: 0;
}

/* 主体区域 */
.rec-card-body {
  flex: 1;
  padding: 0.6rem 0.65rem 0.5rem;
  min-width: 0;
}

.rec-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.rec-card-school-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--gray-900);
}

.rec-card-meta {
  font-size: 0.68rem;
  color: var(--gray-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rec-card-tags-row {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 3px;
}

.rec-card-major-name {
  font-size: 0.76rem;
  color: var(--gray-600);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rec-card-stats {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.rec-stat-item {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--gray-50);
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 0.7rem;
}

.rec-stat-label {
  color: var(--gray-400);
}

.rec-stat-val {
  font-weight: 700;
  color: var(--gray-700);
  font-size: 0.74rem;
}

.rec-stat-val.diff-up { color: var(--accent-red); }
.rec-stat-val.diff-down { color: var(--accent-green); }

/* 概率进度条 */
.rec-prob-bar-wrap {
  position: relative;
  height: 16px;
  background: var(--gray-100);
  border-radius: 8px;
  margin-top: 4px;
  overflow: hidden;
}

.rec-prob-bar-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 0.5s ease;
  opacity: 0.25;
}

.rec-prob-bar-text {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* 右侧概率圆环 */
.rec-card-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.5rem 0.4rem;
  min-width: 68px;
  border-left: 1px solid var(--gray-100);
  background: var(--gray-50);
  gap: 4px;
}

.rec-prob-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.rec-prob-value {
  font-weight: 800;
  font-size: 0.88rem;
  line-height: 1;
}

.rec-prob-label {
  font-size: 0.5rem;
  color: var(--gray-400);
  line-height: 1;
  margin-top: 1px;
}

.rec-add-plan {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: var(--primary-bg);
  color: var(--primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  transition: all 0.15s;
}

.rec-add-plan:hover {
  background: var(--primary);
  color: white;
}

/* 等效分/参考信息标签 */
.equiv-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 14px;
  background: var(--primary-bg);
  color: var(--primary);
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--primary-light);
}

/* ===== 冲稳保 Tab 导航 ===== */
.tier-tabs {
  display: flex;
  gap: 0;
  margin: 1rem 0 1.5rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.tier-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}
.tier-tab:hover {
  background: #f8f9fa;
}
.tier-tab-icon {
  font-size: 1.1rem;
}
.tier-tab-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: #333;
}
.tier-tab-count {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 10px;
  margin-left: 2px;
}

/* 策略区段头部加粗 */
.strategy-section-header {
  border-left: 6px solid;
  background: linear-gradient(90deg, rgba(0,0,0,0.04), #fff);
  padding: 12px 16px;
  margin: 0;
}

/* ===== Quick Search Bar ===== */
.quick-search-bar {
  max-width: 900px;
  margin: -1rem auto 1.5rem;
  position: relative;
  z-index: 10;
}

.qs-inner {
  display: flex;
  gap: 10px;
  align-items: center;
  background: white;
  border-radius: var(--radius-lg);
  padding: 0.6rem 1rem;
  box-shadow: var(--shadow-xl);
}

.qs-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--gray-50);
  border-radius: 8px;
  padding: 4px 10px;
  border: 1.5px solid var(--gray-200);
  transition: border-color 0.2s;
}

.qs-search:focus-within {
  border-color: var(--primary-light);
  background: white;
}

.qs-search input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 6px 0;
  font-size: 0.88rem;
  outline: none;
  color: var(--gray-700);
}

.qs-search input::placeholder { color: var(--gray-400); }

.qs-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 4px 14px;
  height: 30px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  transition: background 0.15s;
}

.qs-btn:hover { background: var(--primary-dark); }

.qs-province {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--gray-50);
  border-radius: 8px;
  border: 1.5px solid var(--gray-200);
}

.qs-province select {
  border: none;
  background: transparent;
  font-size: 0.88rem;
  color: var(--gray-600);
  outline: none;
  font-weight: 500;
  cursor: pointer;
  height: 32px;
  display: flex;
  align-items: center;
}

.qs-province {
  height: 38px;
}

@media (max-width: 768px) {
  .quick-search-bar { margin: -0.75rem 0.75rem 1rem; }
  .qs-inner { flex-direction: column; align-items: stretch; }
  .qs-province { justify-content: center; }
  
  .rec-badge-logo { width: 36px; height: 36px; }
  .rec-card-badge-text { font-size: 1rem; }
  .rec-card-side { min-width: 56px; padding: 0.4rem 0.3rem; }
  .rec-prob-circle { width: 40px; height: 40px; }
  .rec-prob-value { font-size: 0.75rem; }
}

@media (max-width: 480px) {
  .strategy-card-grid { grid-template-columns: 1fr !important; }
  .rec-card-stats { gap: 2px; }
  .rec-stat-item { padding: 1px 5px; font-size: 0.65rem; }
}

/* ===== 校徽锦旗样式 ===== */



/* ===== 集成加入志愿按钮 ===== */
.rec-plan-footer {
  text-align: right;
  padding-top: 4px;
  border-top: 1px solid var(--gray-200);
  margin-top: 6px;
}
.rec-add-plan-integrated {
  background: none;
  border: 1px solid var(--primary-light);
  color: var(--primary);
  font-size: 0.72rem;
  padding: 3px 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.rec-add-plan-integrated:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ===== 卡片底部行（概率条 + 按钮） ===== */
.rec-footer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px solid var(--gray-200);
}
.rec-footer-row .rec-prob-bar-wrap {
  flex: 1;
}
.rec-footer-row .rec-add-plan-integrated {
  white-space: nowrap;
  flex-shrink: 0;
  background: none;
  border: 1px solid var(--primary-light);
  color: var(--primary);
  font-size: 0.72rem;
  padding: 3px 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.rec-footer-row .rec-add-plan-integrated:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ===== 筛选条件 ===== */
.filter-section {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 16px 8px;
  width: 100%;
}
.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr auto;
  gap: 8px;
  align-items: end;
}
.filter-group {
  min-width: 0;
}
.filter-actions-group {
  min-width: auto;
}
.filter-group label {
  display: block;
  font-size: 0.72rem;
  color: var(--gray-500);
  margin-bottom: 4px;
  font-weight: 500;
}
.filter-group select {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.82rem;
  background: white;
  color: var(--gray-700);
  outline: none;
  transition: border 0.15s;
}
.filter-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}
.filter-actions-group {
  flex: 0 0 auto;
  min-width: auto;
}
.filter-clear-btn {
  background: none;
  border: 1px solid #d1d5db;
  color: var(--gray-500);
  font-size: 0.75rem;
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  line-height: 1.4;
}
.filter-clear-btn:hover {
  background: #f3f4f6;
  color: var(--gray-700);
  border-color: #9ca3af;
}
.filter-active-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  min-height: 6px;
}
.active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: var(--primary);
  font-size: 0.72rem;
  padding: 2px 10px;
  border-radius: 14px;
  font-weight: 500;
}
.active-filter-tag .filter-tag-label {
  color: var(--gray-400);
  font-weight: 400;
}
