/* =========================================
   银狐防护官网样式
   浅色窗口式设计 + 沉浸式自定义光标
   ========================================= */

:root {
  /* 品牌色（两主题共用） */
  --brand-blue: #7db4ff;
  --brand-purple: #c8a6ff;
  --brand-gold: #ffc24d;
  --brand-gold-light: #fff5e8;
  --danger: #ff2d55;
  --danger-soft: rgba(255, 45, 85, 0.08);
  --radius: 22px;
  --cursor-color: #000000;

  /* 浅色主题（默认基准值） */
  --bg: #f3f6ff;
  --bg-mid: #ffffff;
  --panel: #ffffff;
  --text: #1a1d2b;
  --muted: #5c6278;
  --border: rgba(125, 180, 255, 0.22);
  --shadow: 0 20px 50px rgba(85, 110, 180, 0.13);
  --shadow-hover: 0 28px 70px rgba(85, 110, 180, 0.18);
  --header-bg: rgba(255, 255, 255, 0.82);
  --titlebar-bg: linear-gradient(180deg, #ffffff, #f6f8ff);
  --secondary-bg: #ffffff;
  --kicker-color: #4b6fb3;
  --kicker-bg: linear-gradient(135deg, rgba(125, 180, 255, 0.12), rgba(200, 166, 255, 0.12));
  --shield-bg: linear-gradient(135deg, #ffffff, #f4f7ff);
  --footer-bg: #ffffff;
  --code-bg: #eef3ff;
  --code-color: #3b4f8a;
  --hero-glow: radial-gradient(circle, rgba(125, 180, 255, 0.22) 0%, transparent 65%);
}

/* ===== 深色主题（默认启用） ===== */
[data-theme="dark"] {
  --bg: #0b0e16;
  --bg-mid: #141925;
  --panel: #161b27;
  --text: #e9edf6;
  --muted: #9aa3b8;
  --border: rgba(125, 180, 255, 0.18);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 28px 70px rgba(0, 0, 0, 0.6);
  --header-bg: rgba(16, 20, 30, 0.85);
  --titlebar-bg: linear-gradient(180deg, #1b2130, #151a26);
  --secondary-bg: #1e2433;
  --kicker-color: #9fc1ff;
  --kicker-bg: linear-gradient(135deg, rgba(125, 180, 255, 0.18), rgba(200, 166, 255, 0.16));
  --shield-bg: linear-gradient(135deg, #1d2433, #141a26);
  --footer-bg: #0e121b;
  --code-bg: #1c2333;
  --code-color: #b9c6e8;
  --hero-glow: radial-gradient(circle, rgba(125, 180, 255, 0.16) 0%, transparent 65%);
  --cursor-color: #ffffff;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(125, 180, 255, 0.18) 0%, transparent 38%),
    radial-gradient(circle at 90% 10%, rgba(200, 166, 255, 0.16) 0%, transparent 35%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-mid) 60%, var(--bg) 100%);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--brand-blue);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--brand-purple);
}

code {
  font-family: "SF Mono", Consolas, monospace;
  background: var(--code-bg);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.9em;
  color: var(--code-color);
}

/* ===== 自定义沉浸式光标 ===== */
.cursor-ring,
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 999999;
  border-radius: 50%;
  transform: translate3d(-100px, -100px, 0) translate(-50%, -50%) scale(0);
  opacity: 0;
  will-change: transform, opacity;
}

.cursor-ring {
  width: 34px;
  height: 34px;
  border: 2.5px solid var(--cursor-color);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.18);
  transition: width 0.18s ease, height 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  background: var(--cursor-color);
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.22);
  transition: width 0.15s ease, height 0.15s ease, background 0.15s ease;
}

/* 激活状态：鼠标进入窗口 */
html.custom-cursor-active .cursor-ring,
html.custom-cursor-active .cursor-dot {
  opacity: 1;
}

/* 悬停交互元素时放大 */
html.custom-cursor-active.cursor-hover .cursor-ring {
  width: 52px;
  height: 52px;
  background: var(--danger-soft);
}

html.custom-cursor-active.cursor-hover .cursor-dot {
  width: 8px;
  height: 8px;
}

/* 桌面精细指针：激活时隐藏系统光标，改由自定义光标接管 */
@media (pointer: fine) {
  html.custom-cursor-active,
  html.custom-cursor-active * {
    cursor: none !important;
  }
}

/* 触摸设备 / 无悬停能力：不启用自定义光标 */
@media (pointer: coarse), (hover: none) {
  .cursor-ring, .cursor-dot {
    display: none !important;
  }
}

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 28px;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 24px rgba(90, 115, 180, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.brand:hover {
  color: var(--text);
}

.brand-icon {
  width: 42px;
  height: 42px;
  filter: drop-shadow(0 4px 8px rgba(125, 180, 255, 0.35));
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-text strong {
  font-size: 1.15rem;
  font-weight: 700;
}

.brand-text span {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.3px;
}

.top-nav {
  display: flex;
  gap: 6px;
  align-items: center;
}

.top-nav a {
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.top-nav a:hover {
  color: var(--text);
  background: rgba(125, 180, 255, 0.1);
}

.version-pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-gold-light), #fff7e6);
  color: #b07c1f;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid rgba(255, 194, 77, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* 深浅色切换按钮 */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--secondary-bg);
  color: var(--text);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.theme-toggle:hover {
  border-color: rgba(125, 180, 255, 0.5);
  transform: translateY(-1px);
}
.theme-toggle:active {
  transform: scale(0.94);
}
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ===== 通用窗口组件 ===== */
.window {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}

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

.window-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  background: var(--titlebar-bg);
  border-bottom: 1px solid var(--border);
  user-select: none;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.dot.r { background: #ff5f57; }
.dot.y { background: #ffbd2e; }
.dot.g { background: #28c840; }

.window-title {
  margin-left: 6px;
  font-size: 0.82rem;
  color: var(--muted);
  font-family: "SF Mono", Consolas, monospace;
}

.window-body {
  padding: 28px 32px;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 64px 24px 44px;
  display: flex;
  justify-content: center;
}

.hero-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 720px;
  height: 420px;
  background: var(--hero-glow);
  pointer-events: none;
}

.hero-window {
  width: 100%;
  max-width: 1080px;
  position: relative;
  z-index: 1;
}

.hero-body {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 44px 48px 50px;
}

.hero-kicker {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--kicker-bg);
  color: var(--kicker-color);
  font-size: 0.86rem;
  font-weight: 700;
  margin-bottom: 18px;
  border: 1px solid rgba(125, 180, 255, 0.18);
}

.hero-title {
  font-size: 3.1rem;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 10px;
  letter-spacing: -0.8px;
}

.hero-title .hero-en {
  font-size: 0.58em;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
}

.hero-desc {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 520px;
  margin: 0 0 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 14px;
  font-size: 1.05rem;
  font-weight: 700;
  border: none;
  outline: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-purple));
  color: #fff;
  box-shadow: 0 10px 28px rgba(125, 180, 255, 0.42);
}

.btn-primary:hover {
  color: #fff;
  box-shadow: 0 14px 36px rgba(125, 180, 255, 0.55);
}

.btn-secondary {
  background: var(--secondary-bg);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px rgba(90, 115, 180, 0.08);
}

.btn-secondary:hover {
  color: var(--brand-blue);
  border-color: rgba(125, 180, 255, 0.5);
  box-shadow: 0 8px 22px rgba(90, 115, 180, 0.12);
}

.hero-meta {
  color: #8c92a8;
  font-size: 0.88rem;
  margin: 0;
}

/* Hero 右侧盾牌视觉 */
.hero-right {
  display: flex;
  align-items: center;
  justify-content: center;
}

.shield-preview {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shield-ring {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 2px dashed rgba(125, 180, 255, 0.35);
  animation: spin 24s linear infinite;
}

.shield-core {
  width: 130px;
  height: 130px;
  border-radius: 30%;
  background: var(--shield-bg);
  box-shadow: 0 16px 42px rgba(125, 180, 255, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
}

.shield-core img {
  width: 86px;
  height: 86px;
  filter: drop-shadow(0 4px 12px rgba(125, 180, 255, 0.3));
}

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

/* ===== 功能区域 ===== */
.features {
  padding: 40px 24px 70px;
}

.section-title {
  text-align: center;
  font-size: 2.1rem;
  font-weight: 800;
  margin: 0 0 38px;
  letter-spacing: -0.5px;
}

.section-title.left {
  text-align: left;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1120px;
  margin: 0 auto;
}

.feature-window .window-title {
  color: #9aa4be;
}

.feature-window h3 {
  font-size: 1.15rem;
  margin: 0 0 10px;
  font-weight: 700;
}

.feature-window p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.7;
}

/* ===== 安装说明 ===== */
.install {
  padding: 0 24px 64px;
}

.install-window {
  max-width: 880px;
  margin: 0 auto;
}

.install-body {
  padding: 36px 42px 44px;
}

.install-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  counter-reset: step;
}

.install-steps li {
  display: flex;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(125, 180, 255, 0.14);
}

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

.step-num {
  flex: 0 0 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-gold-light), #fff1d6);
  color: #b07c1f;
  font-weight: 800;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.install-steps strong {
  display: block;
  font-size: 1.08rem;
  margin-bottom: 6px;
}

.install-steps p {
  margin: 0;
  color: var(--muted);
}

.install-tip {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(125, 180, 255, 0.08), rgba(200, 166, 255, 0.06));
  border: 1px solid rgba(125, 180, 255, 0.15);
}

.tip-icon {
  font-size: 1.2rem;
}

.install-tip p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ===== 隐私 ===== */
.privacy {
  padding: 0 24px 70px;
}

.privacy-window {
  max-width: 880px;
  margin: 0 auto;
}

.privacy .window-body {
  padding: 36px 42px;
}

.privacy p {
  color: var(--muted);
  margin: 0;
}

/* ===== 页脚 ===== */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--footer-bg);
  padding: 32px 24px;
}

.footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-inner a {
  color: var(--muted);
}

.footer-inner a:hover {
  color: var(--brand-blue);
}

.footer-inner .sep {
  margin: 0 6px;
  color: #bfc6d8;
}

/* ===== 响应式 ===== */
@media (max-width: 980px) {
  .hero-body {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .site-header {
    flex-wrap: wrap;
    padding: 12px 18px;
  }
  .top-nav {
    order: 3;
    width: 100%;
    justify-content: center;
    padding-top: 8px;
  }
  .hero {
    padding-top: 30px;
  }
  .hero-body {
    padding: 28px 22px 34px;
  }
  .hero-title {
    font-size: 2.1rem;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .section-title {
    font-size: 1.6rem;
  }
  .install-body, .privacy .window-body {
    padding: 26px 22px;
  }
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}
