/* ============ 基础 ============ */
:root {
  --bg: #ffffff;
  --bg-alt: #f6f8fa;
  --text: #1f2328;
  --muted: #656d76;
  --border: #d0d7de;
  --accent: #2563eb;
  --accent-weak: #eff4ff;
  --radius: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  background: linear-gradient(135deg, #eef3ff 0%, #fdf7f1 50%, #eefaf4 100%);
  background-attachment: fixed;
}

/* 液态玻璃背景光斑 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px 420px at 12% 18%, rgba(99, 102, 241, 0.16), transparent 65%),
    radial-gradient(520px 360px at 88% 12%, rgba(16, 185, 129, 0.14), transparent 65%),
    radial-gradient(620px 420px at 72% 88%, rgba(245, 158, 11, 0.14), transparent 65%),
    radial-gradient(420px 320px at 18% 82%, rgba(37, 99, 235, 0.12), transparent 65%);
}

/* 通用玻璃面板 */
.glass {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 8px 24px rgba(31, 35, 40, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ============ 顶栏 ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 1px 12px rgba(31, 35, 40, 0.04);
}

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

.brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 24px;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* ============ 主区 ============ */
.hero {
  padding: 96px 0 72px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.65);
  background: linear-gradient(180deg, rgba(251, 253, 255, 0.5) 0%, rgba(255, 255, 255, 0.25) 100%);
}

.hero h1 {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.accent {
  color: var(--accent);
}

.tagline {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.intro {
  max-width: 560px;
  margin: 0 auto 28px;
  color: var(--muted);
}

.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  transition: background 0.2s;
}

.btn:hover {
  background: #1d4ed8;
  text-decoration: none;
}

/* 禁用态：灰色 + 不可点击 */
.btn:disabled,
.btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  filter: grayscale(0.6);
}

.btn:disabled:hover {
  background: var(--accent);
}

.btn-group {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--accent);
  border: 1px solid rgba(37, 99, 235, 0.4);
}

.btn-outline:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent);
}

/* ============ 返回按钮（工具页） ============ */
.back-link {
  display: inline-block;
  margin-top: 24px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.75);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(31, 35, 40, 0.05);
  transition: border-color 0.2s, color 0.2s;
}

.back-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

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

.section-alt {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}

.section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.section > .container > p {
  margin-bottom: 16px;
}

.muted {
  color: var(--muted);
}

.facts {
  list-style: none;
  margin-top: 16px;
}

.facts li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}

.facts li:last-child {
  border-bottom: none;
}

/* ============ 项目卡片 ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 8px;
}

.card {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 8px 24px rgba(31, 35, 40, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: 0 14px 36px rgba(31, 35, 40, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

.card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.card p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.badge {
  display: inline-block;
  font-size: 0.78rem;
  padding: 2px 12px;
  border-radius: 999px;
  background: var(--accent-weak);
  color: var(--accent);
  font-weight: 600;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.card-link {
  font-size: 0.92rem;
  font-weight: 600;
}

/* ============ 联系 ============ */
.contact-list {
  list-style: none;
}

.contact-list li {
  padding: 6px 0;
  color: var(--muted);
}

/* ============ 页脚 ============ */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.6);
  padding: 24px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ============ 移动端 ============ */
@media (max-width: 640px) {
  .hero {
    padding: 64px 0 48px;
  }

  .hero h1 {
    font-size: 1.9rem;
  }

  .nav-links {
    gap: 16px;
  }

  .section {
    padding: 48px 0;
  }
}

/* ============ 页面切换过渡（View Transitions） ============ */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: vt-fade-out 0.22s ease both;
}

::view-transition-new(root) {
  animation: vt-fade-in 0.35s ease both;
}

@keyframes vt-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes vt-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
