/* ============================================================
   wyq.lol 主页样式 · 豪华深色版
   氛围光 / 渐变材质 / 发光元素 / 微交互
   ============================================================ */

:root {
  --bg: #121212;            /* 页面底色 */
  --bg-top: #171717;        /* 顶部渐变色 */
  --bg-bottom: #0d0d0d;     /* 底部渐变色 */
  --surface-top: #212121;   /* 卡片渐变顶 */
  --surface-bottom: #121212;/* 卡片渐变底 */
  --surface-hover: #242424; /* 悬停表面 */
  --line: #2b2b2b;          /* 发丝线 */
  --text: #ffffff;          /* 主文字 */
  --text-dim: #b3b3b3;      /* 次要文字 */
  --text-faint: #7c7c7c;    /* 弱化文字 */
  --accent: #1ed760;        /* 强调色：绿 */
  --accent-light: #2bee73;  /* 强调色亮部 */
  --accent-deep: #1cb955;   /* 强调色暗部 */
  --accent-ink: #121212;    /* 强调色上的文字 */
  --warn: #ffa42b;          /* 检测中 */
  --down: #f3727f;          /* 异常 */
  --radius: 12px;           /* 卡片圆角 */
  --pill: 9999px;           /* 胶囊圆角 */
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* 多层背景：顶部氛围光 + 左下氛围光 + 纵向底色渐变 */
  background:
    radial-gradient(640px 340px at 50% 170px, rgba(30, 215, 96, 0.13), rgba(30, 215, 96, 0.04) 45%, transparent 72%),
    radial-gradient(560px 380px at 6% 88%, rgba(30, 215, 96, 0.07), transparent 70%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* 细腻噪点，增加材质感 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: rgba(30, 215, 96, 0.35);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-bottom);
}
::-webkit-scrollbar-thumb {
  background: #2b2b2b;
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: #3d3d3d;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- 视图切换 ---------- */
.view {
  display: none;
}
.view.active {
  display: block;
  animation: fade 0.3s ease;
}
@keyframes fade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 顶部导航（吸顶 + 毛玻璃 + 发丝线） ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 15, 15, 0.72);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  border-image: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14) 50%, transparent) 1;
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(30, 215, 96, 0.7);
}
.nav-links {
  display: flex;
  gap: 28px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.15s ease;
}
.nav-links a:hover {
  color: var(--text);
}
.nav-links a.active {
  color: var(--text);
  font-weight: 700;
}

/* ---------- 简介区 ---------- */
.profile {
  text-align: center;
  padding: 96px 0 64px;
}
.avatar {
  width: 96px;
  height: 96px;
  margin: 0 auto 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  /* 渐变描边环 */
  background:
    radial-gradient(circle at 30% 25%, #2c2c2c, #151515 72%) padding-box,
    linear-gradient(180deg, var(--accent-light), var(--accent-deep)) border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 0 1px rgba(30, 215, 96, 0.12),
    0 0 48px rgba(30, 215, 96, 0.22);
}
.profile h1 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  /* 渐变文字 */
  background: linear-gradient(180deg, #ffffff 35%, #b9f6cb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.profile p {
  color: var(--text-dim);
  font-size: 15px;
  max-width: 520px;
  margin: 0 auto;
}

/* ---------- 分区 ---------- */
.section {
  margin-bottom: 64px;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-head h2 {
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
/* 标题前的绿色发光短棒 */
.section-head h2::before {
  content: "";
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent-light), var(--accent-deep));
  box-shadow: 0 0 10px rgba(30, 215, 96, 0.55);
}
.section-meta {
  font-size: 13px;
  color: var(--text-dim);
}

/* ---------- 卡片网格 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--surface-top), var(--surface-bottom));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  transition:
    transform 0.2s var(--ease),
    border-color 0.2s ease,
    box-shadow 0.25s ease;
}
/* 聚光灯：跟随鼠标的柔光（--mx/--my 由 JS 写入） */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    260px circle at var(--mx, 50%) var(--my, 50%),
    rgba(30, 215, 96, 0.1),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(30, 215, 96, 0.35);
  box-shadow:
    0 18px 38px rgba(0, 0, 0, 0.55),
    0 0 28px rgba(30, 215, 96, 0.08);
}
.card:hover::before {
  opacity: 1;
}
/* 内容置于聚光灯之上 */
.card > * {
  position: relative;
  z-index: 1;
}
.card h3 {
  font-size: 16px;
  font-weight: 700;
}
.card p {
  font-size: 14px;
  color: var(--text-dim);
  flex-grow: 1;
}

/* 胶囊行动按钮 */
.go {
  align-self: flex-start;
  background: linear-gradient(180deg, var(--accent-light), var(--accent-deep));
  color: var(--accent-ink);
  font-size: 13px;
  font-weight: 700;
  padding: 9px 20px;
  border-radius: var(--pill);
  box-shadow:
    0 6px 16px rgba(30, 215, 96, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition:
    transform 0.15s ease,
    box-shadow 0.2s ease,
    filter 0.15s ease;
}
.go:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow:
    0 9px 22px rgba(30, 215, 96, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}
.go:active {
  transform: translateY(0);
}

/* ---------- 语音服务状态 ---------- */
.service-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-faint);
  flex-shrink: 0;
}
.status-dot.checking {
  background: var(--warn);
  box-shadow: 0 0 8px rgba(255, 164, 43, 0.7);
  animation: pulse 1.2s ease-in-out infinite;
}
.status-dot.ok {
  background: var(--accent);
  box-shadow: 0 0 10px rgba(30, 215, 96, 0.9);
}
.status-dot.down {
  background: var(--down);
  box-shadow: 0 0 8px rgba(243, 114, 127, 0.7);
}
@keyframes pulse {
  50% { opacity: 0.35; }
}

/* ---------- 工具视图页头 ---------- */
.head {
  padding: 56px 0 44px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(180deg, #242424, #1a1a1a);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: var(--pill);
  transition: color 0.15s ease, border-color 0.15s ease;
}
.back:hover {
  color: var(--text);
  border-color: rgba(30, 215, 96, 0.35);
}
.head h1 {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(180deg, #ffffff 35%, #b9f6cb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.head p {
  color: var(--text-dim);
  font-size: 15px;
}

/* ---------- 页脚（绿色发丝线） ---------- */
footer {
  position: relative;
  text-align: center;
  padding: 28px 0 48px;
  font-size: 13px;
  color: var(--text-dim);
}
footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(30, 215, 96, 0.4), transparent);
}

/* ---------- 入场动效（错峰浮现） ---------- */
.view.active .profile > *,
.view.active .card {
  animation: rise 0.55s var(--ease) both;
}
.view.active .profile > *:nth-child(2) { animation-delay: 0.08s; }
.view.active .profile > *:nth-child(3) { animation-delay: 0.16s; }
.view.active .card:nth-child(1) { animation-delay: 0.05s; }
.view.active .card:nth-child(2) { animation-delay: 0.11s; }
.view.active .card:nth-child(3) { animation-delay: 0.17s; }
.view.active .card:nth-child(4) { animation-delay: 0.23s; }
.view.active .card:nth-child(5) { animation-delay: 0.29s; }
@keyframes rise {
  from { opacity: 0; translate: 0 16px; }
  to   { opacity: 1; translate: 0 0; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .grid {
    grid-template-columns: 1fr;
  }
  .profile {
    padding: 64px 0 44px;
  }
  .profile h1,
  .head h1 {
    font-size: 32px;
  }
  .nav-links {
    gap: 20px;
  }
  .section {
    margin-bottom: 48px;
  }
}

/* ---------- 减少动态效果 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}
