/* ============================================================
   求学通 v4.0 全局重设计 — Premium Modern Design System
   覆盖所有页面，统一视觉风格
   ============================================================ */

/* === Design Tokens === */
:root {
  --pri-50: #EFF6FF;  --pri-100: #DBEAFE; --pri-200: #BFDBFE;
  --pri-500: #3B82F6; --pri-600: #2563EB; --pri-700: #1D4ED8; --pri-800: #1E40AF;
  --amber-50: #FFFBEB; --amber-500: #F59E0B; --amber-600: #D97706;
  --gray-50: #F9FAFB;  --gray-100: #F3F4F6; --gray-200: #E5E7EB;
  --gray-400: #9CA3AF; --gray-600: #4B5563; --gray-700: #374151;
  --gray-800: #1F2937; --gray-900: #111827;
  --radius-sm: 8px; --radius: 12px; --radius-lg: 16px; --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06),0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 4px 6px rgba(0,0,0,.04),0 2px 12px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.08),0 4px 10px rgba(0,0,0,.04);
  --shadow-xl: 0 20px 50px rgba(0,0,0,.12);
  --transition: all .25s cubic-bezier(.4,0,.2,1);
  --transition-fast: all .15s cubic-bezier(.4,0,.2,1);
}

/* === Global Reset & Base === */
body {
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Helvetica Neue",sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: #F8FAFC;
  color: #374151;
  line-height: 1.7;
  font-size: 15px;
}
a { color: #2563EB; text-decoration: none; transition: var(--transition-fast); }
a:hover { color: #1D4ED8; }
img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }

/* === Scrollbar === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

/* === Typography === */
h1 { font-size: 2.25rem; font-weight: 800; letter-spacing: -.5px; color: var(--gray-900); line-height: 1.2; margin-bottom: .5em; }
h2 { font-size: 1.75rem; font-weight: 700; color: var(--gray-900); line-height: 1.3; margin-bottom: .5em; }
h3 { font-size: 1.25rem; font-weight: 600; color: var(--gray-800); line-height: 1.4; }
h4 { font-size: 1.05rem; font-weight: 600; color: var(--gray-800); }
p { margin-bottom: 1em; }
.text-muted { color: var(--gray-400); }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .75rem; }

/* === Container === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* === Breadcrumb === */
.breadcrumb {
  padding: 16px 0;
  font-size: .85rem;
  color: var(--gray-400);
  display: flex; align-items: center; gap: 6px;
}
.breadcrumb a { color: #6B7280; }
.breadcrumb a:hover { color: #2563EB; }
.breadcrumb span { color: #D1D5DB; }

/* === Page Title Section === */
.page-title-section {
  background: linear-gradient(135deg, #1E40AF 0%, #3B82F6 50%, #60A5FA 100%);
  padding: 48px 0 44px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
}
.page-title-section::before {
  content: ''; position: absolute; top: -50%; right: -10%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,.1) 0%, transparent 70%);
  border-radius: 50%;
}
.page-title-section h1 {
  color: #fff !important;
  font-size: 2rem !important;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}
.page-title-section p {
  color: rgba(255,255,255,.75);
  font-size: 1rem;
  position: relative;
  z-index: 1;
  margin: 0;
}

/* === Cards === */
.card, .form-card, .login-card, [class*="card"] {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
  border: 1px solid #F1F5F9;
  transition: var(--transition);
}
.card:hover, [class*="card"]:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* === Stat Cards === */
.stat-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid #F1F5F9;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #3B82F6, #60A5FA);
  opacity: 0;
  transition: var(--transition);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-card:hover::before { opacity: 1; }
.stat-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: #2563EB;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label { font-size: .875rem; color: #6B7280; }

/* === Buttons === */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; padding: 10px 24px;
  border-radius: 10px; font-size: .9rem; font-weight: 600;
  cursor: pointer; border: none;
  transition: var(--transition);
  letter-spacing: .01em;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, #2563EB, #1D4ED8);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37,99,235,.3);
}
.btn-primary:hover { box-shadow: 0 4px 16px rgba(37,99,235,.4); }
.btn-cta {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(245,158,11,.3);
  padding: 12px 28px; font-size: 1rem;
}
.btn-cta:hover { box-shadow: 0 4px 16px rgba(245,158,11,.4); }
.btn-outline {
  border: 1.5px solid #D1D5DB;
  background: #fff;
  color: #374151;
}
.btn-outline:hover { border-color: #2563EB; color: #2563EB; background: #EFF6FF; }
.btn-sm { padding: 6px 14px; font-size: .8rem; border-radius: 8px; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }

/* === Forms === */
input[type="text"], input[type="email"], input[type="password"],
input[type="tel"], input[type="number"], input[type="search"],
select, textarea {
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid #E2E8F0;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  color: #374151;
  background: #fff;
  transition: var(--transition-fast);
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
select { -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
textarea { min-height: 100px; resize: vertical; }

/* === Tables === */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius);
  overflow: hidden;
}
thead th {
  background: #F8FAFC;
  padding: 14px 16px;
  text-align: left;
  font-size: .8rem;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 2px solid #E2E8F0;
}
tbody td {
  padding: 14px 16px;
  font-size: .9rem;
  border-bottom: 1px solid #F1F5F9;
  color: #374151;
}
tbody tr { transition: var(--transition-fast); }
tbody tr:hover { background: #F8FAFC; }
tbody tr:last-child td { border-bottom: none; }

/* === Tags / Badges === */
.tag, .badge, [class*="-badge"], [class*="-tag"] {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.tag-primary, .tag-rec {
  background: #EFF6FF; color: #1D4ED8;
}
.tag-success { background: #ECFDF5; color: #059669; }
.tag-warning { background: #FFFBEB; color: #D97706; }
.tag-danger { background: #FEF2F2; color: #DC2626; }
.tag-normal { background: #F3F4F6; color: #6B7280; }

/* === Alerts / Messages === */
.msg-success {
  background: #ECFDF5; color: #065F46;
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: .9rem; border-left: 3px solid #10B981;
}
.msg-error {
  background: #FEF2F2; color: #991B1B;
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: .9rem; border-left: 3px solid #EF4444;
}
.msg-info {
  background: #EFF6FF; color: #1E40AF;
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: .9rem; border-left: 3px solid #3B82F6;
}

/* === Grid Layouts === */
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
@media (max-width: 768px) {
  .grid-2,.grid-3,.grid-4 { grid-template-columns: 1fr; }
}

/* === Section Spacing === */
.section { padding: 48px 0; }
.section-sm { padding: 32px 0; }
.section-lg { padding: 64px 0; }

/* === Hero Banner === */
.hero-banner {
  background: linear-gradient(135deg, #1E3A8A 0%, #2563EB 50%, #3B82F6 100%);
  padding: 80px 0 64px;
  position: relative;
  overflow: hidden;
  text-align: center;
  color: #fff;
}
.hero-banner::after {
  content: '';
  position: absolute; bottom: -1px; left: 0; right: 0;
  height: 60px;
  background: #F8FAFC;
  clip-path: ellipse(60% 100% at 50% 100%);
}
.hero-banner h1 { color: #fff !important; font-size: 2.75rem !important; }
.hero-banner p { color: rgba(255,255,255,.8); font-size: 1.15rem; max-width: 600px; margin: 0 auto; }

/* === Filter Bars === */
.filter-bar {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  border: 1px solid #F1F5F9;
}
.filter-bar label { font-size: .85rem; font-weight: 600; color: #64748B; white-space: nowrap; }
.filter-bar select { width: auto; min-width: 120px; }
.filter-bar input { width: auto; min-width: 200px; }

/* === School/Major Cards (精修) === */
.school-card, .major-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  border: 1px solid #F1F5F9;
}
.school-card:hover, .major-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}
.school-card-img {
  width: 100%; height: 160px;
  background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
  overflow: hidden;
  position: relative;
}
.school-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: var(--transition);
}
.school-card:hover .school-card-img img { transform: scale(1.05); }
.school-card-body { padding: 16px; }
.school-card-body h3 { font-size: 1rem; margin-bottom: 4px; }
.school-card-body .meta {
  font-size: .8rem; color: #9CA3AF;
  display: flex; align-items: center; gap: 8px;
}
.school-card-badge {
  position: absolute; top: 10px; right: 10px;
  background: #EF4444; color: #fff;
  padding: 3px 10px; border-radius: 20px;
  font-size: .7rem; font-weight: 700;
}

/* === Pagination === */
.pagination {
  display: flex; justify-content: center; gap: 8px;
  padding: 32px 0;
}
.pagination a, .pagination span {
  min-width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  font-size: .9rem; font-weight: 500;
  background: #fff;
  color: #374151;
  border: 1px solid #E5E7EB;
  transition: var(--transition-fast);
}
.pagination a:hover { border-color: #3B82F6; color: #2563EB; }
.pagination .current {
  background: #2563EB; color: #fff; border-color: #2563EB;
  font-weight: 700;
}

/* === Sidebar Layout === */
.content-layout {
  display: flex; gap: 28px;
  align-items: flex-start;
}
.sidebar { width: 240px; flex-shrink: 0; }
.main-content { flex: 1; min-width: 0; }
@media (max-width: 900px) {
  .content-layout { flex-direction: column; }
  .sidebar { width: 100%; }
}

/* === Sidebar Box === */
.sidebar-box {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
  border: 1px solid #F1F5F9;
}
.sidebar-box h4 {
  font-size: .95rem; font-weight: 700;
  color: var(--gray-800);
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1.5px solid #F1F5F9;
}
.sidebar-nav a {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  font-size: .88rem; color: #64748B;
  border-radius: var(--radius-sm);
  margin-bottom: 2px;
  transition: var(--transition-fast);
}
.sidebar-nav a:hover, .sidebar-nav a.active {
  background: #EFF6FF; color: #2563EB; font-weight: 600;
}

/* === Tabs === */
.tabs {
  display: flex; gap: 0;
  border-bottom: 2px solid #E2E8F0;
  margin-bottom: 24px;
}
.tab {
  padding: 12px 24px;
  font-size: .9rem; font-weight: 500;
  color: #64748B;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition-fast);
}
.tab:hover { color: #2563EB; }
.tab.active {
  color: #2563EB; font-weight: 700;
  border-bottom-color: #2563EB;
}

/* === Section Headers === */
.section-header {
  text-align: center;
  margin-bottom: 36px;
  padding-top: 16px;
}
.section-header h2 {
  font-size: 1.75rem; font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 8px;
  position: relative; display: inline-block;
}
.section-header h2::after {
  content: '';
  position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  width: 40px; height: 3px;
  background: linear-gradient(90deg, #3B82F6, #60A5FA);
  border-radius: 2px;
}
.section-header p { color: #9CA3AF; font-size: .95rem; }

/* === Footer Premium === */
.ft-premium {
  background: #0F172A;
  color: #94A3B8;
  padding: 48px 0 0;
  font-size: .88rem;
}
.ft-premium .ft-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 36px;
}
.ft-premium .ft-brand-name {
  font-size: 1.25rem; font-weight: 800;
  color: #fff; margin-bottom: 12px;
}
.ft-premium .ft-desc {
  color: #64748B; line-height: 1.7; font-size: .85rem;
}
.ft-premium h4 {
  font-size: .85rem; font-weight: 700;
  color: #E2E8F0;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 14px;
}
.ft-premium a, .ft-premium .ft-link-item {
  display: block; padding: 4px 0;
  color: #94A3B8; font-size: .85rem;
  transition: var(--transition-fast);
}
.ft-premium a:hover { color: #fff; padding-left: 4px; }
.ft-premium .ft-bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 20px 0;
  display: flex; align-items: center; justify-content: space-between;
  font-size: .8rem; color: #475569;
}
@media (max-width: 768px) {
  .ft-premium .ft-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .ft-premium .ft-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* === Animations === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.anim-up {
  animation: fadeInUp .5s ease forwards;
  opacity: 0;
}
.anim-up:nth-child(1) { animation-delay: .05s; }
.anim-up:nth-child(2) { animation-delay: .1s; }
.anim-up:nth-child(3) { animation-delay: .15s; }
.anim-up:nth-child(4) { animation-delay: .2s; }
.anim-up:nth-child(5) { animation-delay: .25s; }
.anim-up:nth-child(6) { animation-delay: .3s; }

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(37,99,235,.4); }
  70% { box-shadow: 0 0 0 12px rgba(37,99,235,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,99,235,0); }
}

/* === Utility === */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-4 { margin-bottom: 16px; } .mb-8 { margin-bottom: 32px; }
.p-0 { padding: 0; } .p-4 { padding: 16px; } .p-6 { padding: 24px; }
.rounded { border-radius: var(--radius); }
.bg-white { background: #fff; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.flex { display: flex; } .flex-center { display: flex; align-items: center; justify-content: center; }

/* === Responsive === */
@media (max-width: 768px) {
  .container { padding: 0 16px; }
  h1 { font-size: 1.75rem !important; }
  h2 { font-size: 1.35rem !important; }
  h3 { font-size: 1.1rem !important; }
  .section { padding: 32px 0; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar select, .filter-bar input { width: 100% !important; min-width: 0 !important; }
  .hero-banner { padding: 48px 0 40px; }
  .hero-banner h1 { font-size: 1.75rem !important; }
  .hero-banner p { font-size: .95rem; }
}
