/* ===== youweimiao.com 主页样式（二次元紫调） ===== */
:root {
  --bg: #171226;
  --bg2: #201a38;
  --card: #241d40;
  --line: #3a2f5e;
  --text: #ede8ff;
  --dim: #a99dd0;
  --accent: #8f7bff;
  --accent2: #5ee0c3;
  --gold: #ffc857;
  --pink: #f472b6;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background:
    radial-gradient(900px 460px at 88% -8%, rgba(143,123,255,.22), transparent),
    radial-gradient(760px 420px at -6% 108%, rgba(244,114,182,.13), transparent),
    radial-gradient(500px 300px at 50% 40%, rgba(94,224,195,.05), transparent),
    var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}
::selection { background: var(--accent); color: #fff; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* 星点背景 */
#stars { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
#readBar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 100;
  background: linear-gradient(90deg, var(--accent), var(--pink), var(--accent2));
  transition: width .1s;
}

/* 顶栏（复刻 xinghuisama 风格：小字粗体+大间距+活动点脉冲） */
.topnav {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center;
  justify-content: space-between; padding: 14px 28px;
  background: rgba(23,18,38,.75); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { color: var(--text); text-decoration: none; font-weight: 800; font-size: 16px; letter-spacing: 1px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  position: relative; padding: 3px 0; text-decoration: none;
  font-size: 13px; font-weight: 700; color: var(--dim);
  transition: color .18s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a.active { color: var(--accent); }
.nav-links a.active::after {
  content: ""; position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--accent); animation: dotPulse 1.6s ease-in-out infinite;
}
@keyframes dotPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 6px var(--accent); }
  50% { opacity: .45; box-shadow: 0 0 2px var(--accent); }
}
#themeBtn {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); font-size: 15px; cursor: pointer;
}

/* Hero */
.hero {
  position: relative; z-index: 1; text-align: center;
  padding: 96px 20px 70px;
}
.badge {
  display: inline-block; padding: 4px 16px; border-radius: 999px;
  background: rgba(244,114,182,.12); color: var(--pink);
  border: 1px solid rgba(244,114,182,.35); font-size: 14px; margin-bottom: 18px;
}
.hero h1 {
  font-size: 62px; letter-spacing: 3px; margin-bottom: 14px;
  background: linear-gradient(90deg, #8fa8ff, #43d9a3, #f472b6, #8fa8ff);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: gradFlow 8s linear infinite;
}
@keyframes gradFlow { 0% { background-position: 0% 0; } 100% { background-position: 300% 0; } }
.hero .sub { font-size: 22px; color: var(--text); margin-bottom: 8px; min-height: 36px; }
.hero .sub span#typewriter { color: var(--accent2); font-weight: 600; }
.caret { color: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hint { color: var(--dim); font-size: 14px; margin-bottom: 30px; }
.cta {
  display: inline-block; padding: 13px 38px; border-radius: 12px;
  background: linear-gradient(90deg, var(--accent), #4a7dff);
  color: #fff; text-decoration: none; font-size: 16px; font-weight: 600;
  box-shadow: 0 8px 26px rgba(76,125,255,.35); transition: transform .15s;
}
.cta:hover { transform: translateY(-2px); }

/* 主体 */
main { position: relative; z-index: 1; max-width: 960px; margin: 0 auto; padding: 20px 16px 60px; }
section { margin-bottom: 56px; }
.sec-title { font-size: 26px; margin-bottom: 6px; }
.sec-sub { color: var(--dim); margin-bottom: 22px; }

/* 门户卡片 */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.pcard {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px; text-decoration: none; color: var(--text);
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.pcard:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 14px 34px rgba(0,0,0,.35); }
.picon { font-size: 36px; }
.pcard h3 { font-size: 19px; }
.pcard p { color: var(--dim); font-size: 14px; flex: 1; }
.pcard .go { color: var(--accent2); font-size: 14px; font-weight: 600; }

/* 访客卡片：玻璃拟态 + 主色辉光（设计语言参考 halfcity） */
.vcard {
  position: relative; overflow: hidden;
  margin: 26px auto 0; max-width: 560px; padding: 34px 24px 24px;
  border-radius: 20px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--card) 72%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 24px -14px color-mix(in srgb, var(--accent) 55%, transparent);
}
.vcard::before {  /* 顶部主色光带，缓慢呼吸 */
  content: ""; position: absolute; top: 0; left: 8%; right: 8%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--pink), transparent);
  border-radius: 2px; animation: vglow 3s ease-in-out infinite;
}
@keyframes vglow { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }
.vbig-row { display: flex; align-items: baseline; justify-content: center; gap: 10px; }
.vlive { font-size: 12px; color: #4ade80; animation: vblink 1.6s ease-in-out infinite; }
@keyframes vblink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.vbig {
  font-size: 88px; font-weight: 900; line-height: 1;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(120deg, var(--accent), #a78bfa 45%, var(--pink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 18px color-mix(in srgb, var(--accent) 45%, transparent));
}
.vbig.pop { animation: vpop .35s cubic-bezier(.4, 0, .2, 1); }
@keyframes vpop { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
.vbig-unit { font-size: 20px; color: var(--dim); }
.vsub { text-align: center; color: var(--dim); margin-top: 12px; font-size: 14px; }
.vsub b { color: var(--accent2); }
.vchips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.vchip {
  padding: 6px 12px; border-radius: 999px; font-size: 12.5px; color: var(--dim);
  border: 1px solid var(--line); background: color-mix(in srgb, var(--bg2) 60%, transparent);
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
}
.vchip b { color: var(--accent2); }
.vchip:hover {
  border-color: var(--accent); color: var(--accent2);
  box-shadow: 0 0 12px -4px color-mix(in srgb, var(--accent) 60%, transparent);
}
.vnote { text-align: center; color: var(--dim); font-size: 12px; margin-top: 16px; }
@media (max-width: 720px) {
  .vbig { font-size: 64px; }
}

/* 关于 */
.about-box {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 24px 26px; display: flex; gap: 20px; align-items: flex-start;
}
.avatar {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--accent); flex: 0 0 96px;
}
.about-box p { color: var(--dim); margin-bottom: 8px; }
.about-box b { color: var(--text); }
@media (max-width: 720px) { .about-box { flex-direction: column; align-items: center; text-align: center; } }

/* 页脚 */
footer {
  position: relative; z-index: 1; text-align: center; color: var(--dim);
  font-size: 13px; padding: 34px 16px 50px; border-top: 1px solid var(--line);
}
.flink { color: var(--accent); text-decoration: none; margin: 0 4px; }
.flink:hover { color: var(--accent2); }

#toTop {
  position: fixed; right: 22px; bottom: 26px; width: 44px; height: 44px;
  border-radius: 50%; border: 1px solid var(--line); background: var(--card);
  color: var(--text); font-size: 18px; cursor: pointer; display: none;
  box-shadow: 0 6px 18px rgba(0,0,0,.4); z-index: 60;
}
#toTop:hover { border-color: var(--accent); }

/* 白天模式 */
body.light {
  --bg: #f6f7fb; --bg2: #ffffff; --card: #ffffff; --line: #d9deec;
  --text: #1d2333; --dim: #5a6480;
}
body.light .topnav { background: rgba(246,247,251,.9); }
body.light .hero h1 { background: linear-gradient(90deg, #3f66e0, #12a374, #d14c8f, #3f66e0); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; }

/* 手机 */
@media (max-width: 720px) {
  .hero h1 { font-size: 38px; }
  .hero .sub { font-size: 18px; }
  .cards { grid-template-columns: 1fr; }
  .nav-links a:not(:last-of-type) { display: none; }
}

/* 滚动浮现 */
.pre-reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.revealed { opacity: 1; transform: none; }

/* ===== 二次元化增补 ===== */
/* 光斑装饰 */
.orb {
  position: fixed; border-radius: 50%; pointer-events: none; z-index: 0;
  filter: blur(60px); opacity: .5;
}
.orb-a { width: 340px; height: 340px; left: -120px; top: 18%; background: rgba(143,123,255,.35); animation: orbFloat 14s ease-in-out infinite; }
.orb-b { width: 260px; height: 260px; right: -80px; top: 55%; background: rgba(244,114,182,.28); animation: orbFloat 18s ease-in-out infinite reverse; }
.orb-c { width: 200px; height: 200px; left: 30%; bottom: -60px; background: rgba(94,224,195,.22); animation: orbFloat 16s ease-in-out infinite; }
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(24px, -18px); }
  66% { transform: translate(-16px, 14px); }
}

/* 英雄区吉祥物 */
.mascot {
  position: absolute; right: 6%; bottom: -8px; width: 220px; z-index: 2;
  animation: mascotBob 4s ease-in-out infinite;
  filter: drop-shadow(0 0 26px rgba(143,123,255,.45));
}
@keyframes mascotBob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}
/* 昼夜两版吉祥物：白天=黑字原版，夜晚=浅字版，随主题类切换 */
.mascot-day { display: none; }
body.light .mascot-day { display: block; }
body.light .mascot-night { display: none; }
.hero { position: relative; overflow: hidden; }
@media (max-width: 720px) { .mascot { width: 120px; right: 2%; opacity: .9; } }

/* 卡片头像 */
.pavatar {
  width: 54px; height: 54px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--accent); margin-bottom: 4px;
}
.pcard:hover .pavatar { border-color: var(--pink); box-shadow: 0 0 18px rgba(244,114,182,.5); }

/* 卡片微光边框 */
.pcard { position: relative; overflow: hidden; }
.pcard::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(320px 120px at 20% 0%, rgba(143,123,255,.18), transparent);
  opacity: 0; transition: opacity .25s;
}
.pcard:hover::after { opacity: 1; }

/* 白天模式适配紫调 */
body.light {
  --bg: #f4f2fb; --bg2: #ffffff; --card: #ffffff; --line: #ddd6f2;
  --text: #2b2344; --dim: #6f6592;
}
body.light .topnav { background: rgba(244,242,251,.92); }
body.light .orb { opacity: .35; }

/* ===== 图鉴墙 ===== */
.gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.gitem {
  position: relative; margin: 0; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); background: var(--card);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.gitem img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.gitem figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 10px 8px;
  text-align: center; font-size: 13px; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
  opacity: 0; transition: opacity .2s;
}
.gitem:hover { transform: translateY(-5px); border-color: var(--pink); box-shadow: 0 14px 30px rgba(244,114,182,.25); }
.gitem:hover figcaption { opacity: 1; }
