:root {
  --text: #f5f7fb;
  --muted: rgba(245, 247, 251, 0.68);
  --muted-2: rgba(245, 247, 251, 0.42);
  --glass: rgba(255, 255, 255, 0.07);
  --glass-strong: rgba(255, 255, 255, 0.10);
  --border: rgba(255, 255, 255, 0.28);
  --border-strong: rgba(255, 255, 255, 0.45);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 28px;
  --accent: #7cc6ff;
  --accent-2: #c89bff;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --bg: #0d0f1a;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
    Lato, Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 24px calc(24px + var(--safe-bottom));
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  overscroll-behavior-y: none;
}

/* 静态背景 —— 随机图片 API，cover 铺满 */
.bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image: url("https://uapis.cn/api/v1/random/image?category=acg&type=mb");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #0d0f1a;
  filter: brightness(0.72) saturate(1.05);
}

/* 电脑端用横版背景 */
@media (min-width: 621px) {
  .bg {
    background-image: url("https://uapis.cn/api/v1/random/image?category=acg&type=pc");
  }
}

/* 背景光斑 —— 静态 radial-gradient，不带动画，不重绘 */
.bg-blob {
  position: fixed;
  width: 50vmax;
  height: 50vmax;
  border-radius: 50%;
  opacity: 0.35;
  z-index: -2;
  filter: blur(40px);
}
.bg-blob--a {
  top: -15vmax;
  left: -10vmax;
  background: radial-gradient(circle, #6a4cff 0%, transparent 70%);
}
.bg-blob--b {
  bottom: -20vmax;
  right: -10vmax;
  background: radial-gradient(circle, #00c2ff 0%, transparent 70%);
}

/* 通用卡片 —— 液态玻璃（Liquid Glass 复刻手法）
 * 借鉴「contrast 对比增强 + 对角成对边缘光 + 内缘暗圈 + 斜向光带」：
 *  - 背景不透明度 ~0.05 + 1px 模糊，内容完整透出
 *  - inset 对角亮边（左上/右下）模拟光在玻璃边缘的折射聚光
 *  - inset 暗圈模拟玻璃厚度
 *  - ::before 斜向白色光带（45°）+ 顶部微光，模拟环境光反射
 *  - 外层 contrast 温和增强，放大边缘光晕（lensing 感）
 * 会变色：边缘光/高光跟随封面主色（--glass-rgb，见 glass.js）
 */
.card {
  position: relative;
  padding: 24px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(var(--glass-rgb), 0.30);
  backdrop-filter: blur(1px) saturate(170%) brightness(1.08);
  -webkit-backdrop-filter: blur(1px) saturate(170%) brightness(1.08);
  filter: contrast(1.08) saturate(1.05);
  box-shadow:
    inset 2px -2px 1px -1px rgba(255, 255, 255, 0.6),
    inset -2px 2px 1px -1px rgba(255, 255, 255, 0.6),
    inset 6px -6px 1px -6px rgba(255, 255, 255, 0.35),
    inset -6px 6px 1px -6px rgba(255, 255, 255, 0.35),
    inset 0 0 2px rgba(0, 0, 0, 0.55),
    0 18px 44px rgba(0, 0, 0, 0.26);
  overflow: hidden;
}
/* 玻璃表面：45° 斜向光带（环境光反射）+ 顶部聚光 */
.card::before {
  content: "";
  position: absolute;
  inset: -8px;
  background:
    linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.16) 0%,
      transparent 22%,
      transparent 68%,
      rgba(255, 255, 255, 0.16) 100%
    ),
    radial-gradient(130% 80% at 50% -14%, rgba(255, 255, 255, 0.22), transparent 58%);
  filter: blur(5px);
  pointer-events: none;
  z-index: 0;
}
.card > * { position: relative; z-index: 1; }

/* 文字可读性：深色投影垫底，字从亮背景中跳出（不加大模糊） */
.card h1, .card h2, .card h3, .card p, .card li,
.card .name, .card .bio,
.card .track-name, .card .track-artist,
.card .state, .card .lyrics-hint, .card .time,
.card .h-head, .card .h-text, .card .h-foot,
.card .search-item b, .card .search-item span,
.card .search-add, .card .error-tip {
  text-shadow: 0 1px 3px rgba(8, 10, 18, 0.55), 0 0 12px rgba(8, 10, 18, 0.35);
}

/* Footer */
.footer {
  text-align: center;
  padding: 20px 0 10px;
  font-size: 12px;
  color: var(--muted-2);
}
.footer a {
  color: var(--muted-2);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer a:hover {
  color: var(--text);
}

/* 个人资料 */
.profile { text-align: center; }
.avatar-ring {
  width: 104px;
  height: 104px;
  margin: 4px auto 14px;
  padding: 4px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--accent), var(--accent-2), var(--accent));
}
.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(20, 20, 40, 0.9);
  display: block;
}
.name {
  margin: 4px 0 4px;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.bio {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}
.socials {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.socials a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text);
  text-decoration: none;
  background: var(--glass-strong);
  border: 1px solid var(--border);
  transition: background 0.22s ease;
}
.socials a:hover { background: rgba(255, 255, 255, 0.26); }

/* 关于 / 链接 */
.about h3, .links h3, .sites h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.5px;
}
.about p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}
.links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.links li {
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--glass-strong);
  border: 1px solid var(--border);
}

/* 其他站点 */
.sites ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.sites li {
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--glass-strong);
  border: 1px solid var(--border);
  transition: background 0.2s ease;
}
.sites li a {
  color: var(--text);
  text-decoration: none;
  display: block;
  text-align: center;
}
.sites li:not(.placeholder):hover {
  background: rgba(255, 255, 255, 0.22);
}
.sites li.placeholder {
  color: var(--muted-2);
  text-align: center;
}
  text-align: center;
  opacity: 0.6;
}
