/* ============================================================
   安徽云端 - 公共样式
   导航 / 页脚 / Loading / 按钮 / 通用动效
   ============================================================ */

:root {
  --primary: #0fa0f5;
  --primary-dark: #0b84cc;
  --primary-light: #eaf6fe;
  --ink: #2c3e50;
  --ink-light: #5d6d7e;
  --ink-faint: #95a5a6;
  --line: #e3e9ee;
  --bg: #ffffff;
  --bg-soft: #f7fafc;
  --footer-bg: #22313f;
  --radius: 8px;
  --shadow-card: 0 6px 24px rgba(15, 62, 96, .08);
  --shadow-hover: 0 14px 40px rgba(15, 62, 96, .16);
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  font-size: 15px;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; vertical-align: middle; }

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

/* ---------- Loading 遮罩 ---------- */
.loading-cover {
  position: fixed; inset: 0; z-index: 9999;
  background: #1b1b1b;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .6s ease, visibility .6s;
}
.loading-cover.done { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-cover .circle {
  width: 120px; height: 120px; border-radius: 50%;
  background: #ffd200;
  animation: beating 1.1s ease-in-out infinite;
}
@keyframes beating {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.15); }
  50% { transform: scale(.92); }
}

/* ---------- 导航栏 ---------- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 5%;
  height: 72px;
  transition: background .35s ease, box-shadow .35s ease, height .35s ease;
}
.navbar.transparent { background: transparent; box-shadow: none; }
.navbar.solid {
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 16px rgba(15, 62, 96, .08);
  height: 60px;
}
.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  font-size: 20px; font-weight: 700; color: var(--ink); letter-spacing: .5px;
}
.navbar-brand:hover { color: var(--ink); }
.navbar-brand .logo-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--primary) 0%, #35c3ff 100%);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(15, 160, 245, .35);
}
.navbar-brand .logo-mark svg { width: 20px; height: 20px; }

/* 代码括号风格菜单 */
.navbar-menu { display: flex; align-items: center; gap: 4px; font-family: var(--font-mono); }
.navbar-menu .brace {
  color: var(--ink-faint); font-size: 18px; padding: 0 6px; user-select: none;
  transition: transform .3s;
}
.navbar-menu:hover .brace { color: var(--primary); }
.navbar-menu ul { display: flex; list-style: none; align-items: center; }
.navbar-menu li { display: flex; align-items: center; }
.navbar-menu li a {
  color: var(--ink-light); font-size: 14px; padding: 6px 8px; position: relative;
}
.navbar-menu li a::after {
  content: ""; position: absolute; left: 8px; right: 8px; bottom: 0;
  height: 2px; background: var(--primary); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.navbar-menu li a:hover::after,
.navbar-menu li a.active::after { transform: scaleX(1); }
.navbar-menu li a.active { color: var(--primary); }
.navbar-menu .comma { color: var(--ink-faint); user-select: none; }

.navbar-actions { display: flex; align-items: center; gap: 12px; }

/* 汉堡按钮（移动端） */
.nav-toggle {
  display: none; border: 0; background: none; cursor: pointer;
  width: 40px; height: 40px; position: relative;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; margin: 5px auto;
  background: var(--ink); border-radius: 2px; transition: .3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 22px; border-radius: 6px; font-size: 14px; cursor: pointer;
  border: 1px solid transparent; transition: all .25s ease; white-space: nowrap;
}
.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 4px 14px rgba(15, 160, 245, .35);
}
.btn-primary:hover {
  background: var(--primary-dark); color: #fff; transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 160, 245, .45);
}
.btn-ghost { background: transparent; color: var(--ink-light); border-color: var(--line); }
.btn-ghost:hover { color: var(--primary); border-color: var(--primary); }
.btn-lg { padding: 13px 36px; font-size: 16px; border-radius: 8px; }

/* ---------- 页脚 ---------- */
.footer {
  background: var(--footer-bg); color: #8fa3b3;
  padding: 56px 5% 28px; font-size: 13px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  max-width: 1200px; margin: 0 auto 40px;
}
.footer-brand { color: #fff; font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.footer-desc { max-width: 320px; line-height: 1.9; }
.footer h4 { color: #d7e3ec; font-size: 14px; margin-bottom: 14px; font-weight: 600; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 8px; }
.footer li a { color: #8fa3b3; }
.footer li a:hover { color: #fff; }
.footer-bottom {
  max-width: 1200px; margin: 0 auto; padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.footer-bottom a { color: #6b7f8f; }

/* ---------- 滚动淡入 ---------- */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .12s; }
.reveal-delay-2 { transition-delay: .24s; }
.reveal-delay-3 { transition-delay: .36s; }

/* ---------- 页面公共容器 ---------- */
.page-head {
  padding: 150px 5% 70px; text-align: center;
  background: linear-gradient(180deg, var(--primary-light) 0%, #fff 100%);
}
.page-head h1 { font-size: 36px; margin-bottom: 14px; }
.page-head p { color: var(--ink-light); max-width: 640px; margin: 0 auto; }

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

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .navbar { padding: 0 4%; }
  .nav-toggle { display: block; }
  .navbar-menu {
    position: fixed; top: 60px; left: 0; right: 0;
    background: #fff; flex-direction: column; padding: 18px 0 24px;
    box-shadow: 0 12px 24px rgba(15, 62, 96, .1);
    transform: translateY(-12px); opacity: 0; visibility: hidden;
    transition: .3s;
  }
  .navbar-menu.open { transform: none; opacity: 1; visibility: visible; }
  .navbar-menu ul { flex-direction: column; gap: 4px; }
  .navbar-menu .comma, .navbar-menu .brace { display: none; }
  .navbar-actions .btn-ghost { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .page-head h1 { font-size: 28px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}
