/* ===== 基础变量 ===== */
:root {
  --primary: #0055A4;
  --primary-dark: #003d7a;
  --accent: #DCF4A2;
  --accent-dark: #c4e874;
  --text: #1a1a2e;
  --text-light: #4a4a6a;
  --bg: #ffffff;
  --bg-alt: #f5f9ff;
  --border: #e0e6f0;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 20px rgba(0,0,0,0.12);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--bg);
}

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

.hidden {
  display: none !important;
}

.text-center {
  text-align: center;
}

/* ===== 导航栏 ===== */
.navbar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a,
.nav-links button {
  color: var(--text-light);
  text-decoration: none;
  font-size: 15px;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links button:hover {
  color: var(--primary);
}

/* ===== 按钮 ===== */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

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

.btn-secondary {
  background: var(--bg);
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

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

.btn-block {
  width: 100%;
  padding: 12px;
}

.btn-link {
  color: var(--primary);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #003d7a 100%);
  color: #fff;
  padding: 80px 0 100px;
  text-align: center;
}

.hero h1 {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 20px;
  color: var(--accent);
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Section ===== */
.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 40px;
  color: var(--text);
}

/* ===== Services ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  transition: box-shadow 0.2s;
}

.service-card:hover {
  box-shadow: var(--shadow-hover);
}

.service-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.service-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.service-card p {
  color: var(--text-light);
  font-size: 14px;
}

/* ===== Stats ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  text-align: center;
}

.stat-number {
  font-size: 40px;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 15px;
  color: var(--text-light);
  margin-top: 4px;
}

/* ===== Cases Preview ===== */
.cases-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

/* ===== Cases Page ===== */
.cases-page {
  padding: 40px 0 64px;
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 8px;
}

.page-subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 32px;
}

.login-notice {
  background: var(--accent);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 24px;
  text-align: center;
}

.login-notice a {
  color: var(--primary);
  font-weight: 500;
}

.cases-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.case-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: box-shadow 0.2s;
}

.case-card:hover {
  box-shadow: var(--shadow-hover);
}

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

.case-title {
  font-size: 18px;
  font-weight: 600;
}

.case-lock {
  font-size: 13px;
  color: var(--primary);
  background: var(--bg-alt);
  padding: 2px 10px;
  border-radius: 12px;
}

.case-univ {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 4px;
}

.case-program {
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 12px;
}

.case-result {
  display: inline-block;
  background: var(--accent);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.case-desc {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.7;
}

.case-desc.locked {
  color: #999;
  font-style: italic;
}

.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.case-tag {
  font-size: 12px;
  color: var(--text-light);
  background: var(--bg-alt);
  padding: 3px 10px;
  border-radius: 12px;
}

/* ===== Auth Page ===== */
.auth-page {
  padding: 48px 0 80px;
  min-height: calc(100vh - 64px - 60px);
}

.auth-container {
  max-width: 420px;
  margin: 0 auto;
}

.auth-form {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}

.auth-form h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary);
}

.form-error {
  color: #d32f2f;
  font-size: 14px;
  margin-bottom: 14px;
  min-height: 20px;
}

.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
  color: var(--text-light);
}

.auth-switch a {
  color: var(--primary);
  font-weight: 500;
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  font-size: 14px;
  color: var(--text-light);
}

/* ===== 响应式 ===== */
@media (max-width: 640px) {
  .hero h1 {
    font-size: 28px;
  }
  .hero-subtitle {
    font-size: 16px;
  }
  .nav-container {
    padding: 0 16px;
  }
  .nav-links {
    gap: 14px;
  }
  .nav-links a {
    font-size: 14px;
  }
  .cases-list {
    grid-template-columns: 1fr;
  }
  .auth-form {
    padding: 24px;
  }
}
