/* ============================================================
   我的工作台 · 静态个人站样式
   风格：卡片式 · 圆角 · 柔光 · 支持深色模式
   ============================================================ */

:root {
  --bg: #f4f6fb;
  --bg-soft: #eceef6;
  --card: #ffffff;
  --card-2: #fafbfe;
  --text: #2c3142;
  --text-2: #6b7280;
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --accent-soft: #eef0ff;
  --line: #e5e8f2;
  --shadow: 0 6px 24px rgba(60, 70, 120, 0.08);
  --shadow-lg: 0 14px 40px rgba(60, 70, 120, 0.14);
  --radius: 16px;
  --maxw: 1080px;
}

html.dark {
  --bg: #13151c;
  --bg-soft: #1a1d27;
  --card: #1e2230;
  --card-2: #232838;
  --text: #e6e9f2;
  --text-2: #a2a9bd;
  --accent: #818cf8;
  --accent-2: #a78bfa;
  --accent-soft: #262b40;
  --line: #2c3143;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 14px 40px rgba(0, 0, 0, 0.5);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
    "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  transition: background 0.3s, color 0.3s;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------------- 顶部轮播横幅（固定全屏背景） ---------------- */
.banner {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;          /* 铺满整个视口，卡片内容在它上面滑动 */
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

html.dark .banner {
  background: linear-gradient(135deg, #262b40, #8b5cf6);
}

/* 玻璃罩：减薄——只做轻模糊，半透明层让背景光透上来 */
body::before {
  content: "";
  position: fixed; inset: 0;
  z-index: 2;
  background: rgba(247, 248, 252, 0.30);   /* 从 0.55 减到 0.30，通透 */
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);               /* 模糊也从 10px 降到 6px */
  pointer-events: none;                     /* 不挡点击 */
}
html.dark body::before {
  background: rgba(17, 19, 27, 0.35);
}

/* 内容层浮在玻璃罩之上；导航栏 z-index 见 .site-bar 定义（50，钉顶时盖住内容） */
.container, footer { position: relative; z-index: 3; }

.banner::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.18), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,.12), transparent 45%);
  pointer-events: none;
}

.banner-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.banner-slide.active { opacity: 1; }
.banner-slide.placeholder {
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.85);
  font-size: 1.4rem;
  letter-spacing: 6px;
  font-weight: 600;
  text-shadow: 0 2px 10px rgba(0,0,0,.25);
}

.banner-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(255,255,255,.25);
  color: #fff; border: none; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  z-index: 5; backdrop-filter: blur(4px);
  transition: background .2s;
}
.banner-arrow:hover { background: rgba(255,255,255,.45); }
.banner-arrow.prev { left: 14px; }
.banner-arrow.next { right: 14px; }

.banner-dots {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 5;
}
.banner-dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.5);
  cursor: pointer; transition: all .25s;
}
.banner-dots span.active { background: #fff; width: 22px; border-radius: 6px; }

/* ---------------- 头像 + 站名 + 导航 ---------------- */
.site-bar {
  background: rgba(255, 255, 255, 0.42);    /* 导航调透：0.72 → 0.42 */
  -webkit-backdrop-filter: blur(16px) saturate(190%);
  backdrop-filter: blur(16px) saturate(190%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 12px rgba(60, 70, 120, 0.06);
  transition: background .3s;
}
html.dark .site-bar { background: rgba(23, 26, 38, 0.45); }

/* 滚动状态：导航栏下滑后变"实"，把滚过的内容遮住，避免文字重合 */
.site-bar.scrolled {
  background: rgba(255, 255, 255, 0.78);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.45),
    0 4px 20px rgba(60, 70, 120, 0.12);
}
html.dark .site-bar.scrolled { background: rgba(23, 26, 38, 0.85); }

.site-bar-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 12px 20px;
  display: flex; align-items: center; gap: 16px;
}

.avatar {
  width: 48px; height: 48px; border-radius: 50%;
  overflow: hidden; flex-shrink: 0;
  border: 2px solid var(--accent-soft);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.site-name { font-size: 19px; font-weight: 700; white-space: nowrap; }
.site-name small { display: block; font-size: 12px; font-weight: 400; color: var(--text-2); }

.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }

.nav a, .nav .nav-item {
  padding: 8px 13px; border-radius: 10px;
  font-size: 14.5px; color: var(--text-2);
  transition: all .2s;
}
.nav a:hover, .nav .nav-item:hover { color: var(--accent); background: var(--accent-soft); }
.nav a.active { color: var(--accent); background: var(--accent-soft); font-weight: 600; }

.nav .dropdown { position: relative; }
.nav .dropdown-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 150px;
  background: linear-gradient(135deg, rgba(255,255,255,.82), rgba(255,255,255,.60));
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(60,70,120,.18), inset 0 1px 0 rgba(255,255,255,.8);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  padding: 6px; display: none; z-index: 60;
}
html.dark .nav .dropdown-menu {
  background: linear-gradient(135deg, rgba(35,40,56,.92), rgba(23,26,38,.78));
  border-color: rgba(255,255,255,.14);
}
.nav .dropdown:hover .dropdown-menu { display: block; }
.nav .dropdown-menu a { display: block; white-space: nowrap; }

.dark-toggle {
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card-2);
  color: var(--text-2); font-size: 17px;
  display: flex; align-items: center; justify-content: center;
  margin-left: 6px; transition: all .2s;
}
.dark-toggle:hover { color: var(--accent); border-color: var(--accent); }

/* ---------------- 主内容 ---------------- */
/* 只给内容区一个最小高度（约一屏减掉导航和页脚），
   让文章短时页脚也能贴住屏幕底部；
   不动 body / footer / 卡片布局 */
main {
  padding: 28px 0 50px;
  min-height: calc(100vh - 180px);
}

.page-title {
  font-size: 24px; font-weight: 700; margin: 26px 0 6px;
  display: flex; align-items: center; gap: 10px;
}
.page-title::before {
  content: ""; width: 5px; height: 24px; border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}
.page-sub { color: var(--text-2); font-size: 14px; margin-bottom: 22px; }

/* ⬅ 返回上一页：嵌在标题行内最左侧，随时可见 */
.back-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 15px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
  color: var(--accent);
  background: linear-gradient(135deg, rgba(255,255,255,.55), rgba(255,255,255,.25));
  border: 1px solid rgba(255,255,255,.6);
  -webkit-backdrop-filter: blur(12px) saturate(170%);
  backdrop-filter: blur(12px) saturate(170%);
  box-shadow: 0 4px 14px rgba(60,70,120,.12), inset 0 1px 0 rgba(255,255,255,.8);
  transition: all .2s;
}
.back-link:hover {
  background: linear-gradient(135deg, rgba(129,140,248,.9), rgba(139,92,246,.9));
  color: #fff;
  transform: translateY(-1px);
}
html.dark .back-link { color: #a5b4fc; border-color: rgba(255,255,255,.2); }
html.dark .back-link:hover { color: #fff; }

/* ============================================================
   卡片：iOS 26 液态玻璃材质（Liquid Glass）
   半透明 + 背景模糊 + 饱和度增强 + 顶部高光边 + 玻璃反光
   ============================================================ */
.card {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.32),     /* 更透：从 0.55 降到 0.32 */
    rgba(255, 255, 255, 0.10)      /* 更透：从 0.28 降到 0.10 */
  );
  border: 1px solid rgba(255, 255, 255, 0.72);  /* 玻璃边更亮 */
  border-radius: 22px;
  box-shadow:
    0 10px 30px rgba(60, 70, 120, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.95),      /* 顶部高光边拉满 */
    inset 0 -1px 0 rgba(255, 255, 255, 0.35),     /* 底部也发光 */
    inset 0 0 24px rgba(255, 255, 255, 0.12);     /* 内侧整体辉光 */
  -webkit-backdrop-filter: blur(14px) saturate(200%);
  backdrop-filter: blur(14px) saturate(200%);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: transform .25s cubic-bezier(.2,.8,.3,1.3), box-shadow .25s, background .3s;
}
/* 镜面高光：更强更宽的对角反光条 */
.card::before {
  content: "";
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.55) 0%,     /* 从 0.35 提到 0.55 */
    rgba(255, 255, 255, 0.14) 28%,
    transparent 55%
  );
  pointer-events: none;
}
/* 点光源：玻璃右上角的小光斑，模拟环境反射 */
.card::after {
  content: "";
  position: absolute; top: 8px; right: 14px;
  width: 34px; height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  filter: blur(8px);
  transform: rotate(-28deg);
  pointer-events: none;
}
.card:hover {
  transform: translateY(-4px) scale(1.006);
  box-shadow:
    0 16px 44px rgba(60, 70, 120, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -1px 0 rgba(255, 255, 255, 0.45),
    inset 0 0 30px rgba(255, 255, 255, 0.18);
}
/* 深色模式：玻璃变深但保持透光与光感 */
html.dark .card {
  background: linear-gradient(
    135deg,
    rgba(38, 43, 64, 0.42),     /* 更透的深色玻璃 */
    rgba(23, 26, 38, 0.22)
  );
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.40),
    inset 0 1px 0 rgba(255, 255, 255, 0.30),
    inset 0 -1px 0 rgba(255, 255, 255, 0.12),
    inset 0 0 24px rgba(255, 255, 255, 0.05);
}
html.dark .card::before {
  background: linear-gradient(
    115deg,
    rgba(255, 255, 255, 0.16) 0%,
    rgba(255, 255, 255, 0.05) 28%,
    transparent 55%
  );
}
html.dark .card::after {
  background: rgba(255, 255, 255, 0.22);
}

/* 文章正文：独立减光处理 + 长文专用文字底膜（Vibrancy 效果） */
.article-body {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.52),     /* 比普通卡片略实，护住长文 */
    rgba(255, 255, 255, 0.34)
  );
}
html.dark .article-body {
  background: linear-gradient(
    135deg,
    rgba(35, 40, 56, 0.66),
    rgba(23, 26, 38, 0.50)
  );
}
.article-body::before {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.14) 0%,   /* 顶部一条极淡的光 */
    rgba(255, 255, 255, 0.05) 24%,
    transparent 45%                  /* 之后完全透光，不碰文字 */
  );
}
.article-body::after {
  top: 8px; right: 14px;
  width: 26px; height: 14px;
  background: rgba(255, 255, 255, 0.45);
  filter: blur(7px);
}
html.dark .article-body::before {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.03) 20%,
    transparent 40%
  );
}

/* 快捷入口卡片 */
.grid-cards {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.grid-cards .card { cursor: pointer; }
.link-title { font-size: 17px; font-weight: 600; margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.link-desc { font-size: 13.5px; color: var(--text-2); }

.emoji-badge {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-bottom: 10px;
  background: var(--accent-soft);
}

/* 文章列表 */
.article-list { display: flex; flex-direction: column; gap: 14px; }
.post-item { padding: 20px 22px; }
.post-item h3 { font-size: 17.5px; font-weight: 600; margin-bottom: 6px; }
.post-item h3:hover { color: var(--accent); }
.post-meta { font-size: 12.5px; color: var(--text-2); display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.tag {
  display: inline-block; padding: 1px 10px; border-radius: 20px;
  font-size: 12px; background: var(--accent-soft); color: var(--accent);
}
.excerpt { font-size: 14px; color: var(--text-2); }

/* 说说时间线 */
.timeline { position: relative; padding-left: 24px; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px;
  width: 2px; background: var(--line); border-radius: 2px;
}
.diary-item { position: relative; padding: 14px 0 20px; }
.diary-item::before {
  content: ""; position: absolute; left: -24px; top: 22px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--card); border: 3px solid var(--accent);
}
.diary-time { font-size: 12.5px; color: var(--text-2); margin-bottom: 4px; }
.diary-text { font-size: 15px; }

/* 追番网格 */
.anime-grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

/* ---------------- 视频封面墙 ---------------- */
@keyframes music-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.video-wall {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.video-card {
  padding: 0; overflow: hidden; cursor: pointer;
  background: linear-gradient(135deg, rgba(255,255,255,.32), rgba(255,255,255,.10));
}
.video-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(145deg, var(--accent-soft), var(--bg-soft));
  overflow: hidden;
}
.video-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.video-card:hover .video-cover img { transform: scale(1.06); }
.video-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(20, 24, 40, 0);
  transition: background .25s;
}
.video-play::before {
  content: "▶";
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.85);
  color: var(--accent);
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  padding-left: 4px;
  opacity: 0; transform: scale(.8);
  transition: opacity .25s, transform .25s;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.video-card:hover .video-play { background: rgba(15, 18, 34, .28); }
.video-card:hover .video-play::before { opacity: 1; transform: scale(1); }
.video-info { padding: 12px 14px; }
.video-info h4 {
  font-size: 14px; font-weight: 600; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; min-height: 42px;
}
.video-card.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.video-now {
  font-size: 12.5px; color: var(--accent); font-weight: 700;
  margin-top: 8px; display: none;
}
.video-card.active .video-now { display: block; }

@media (max-width: 600px) {
  .video-wall { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
}
.anime-card { overflow: hidden; padding: 0; cursor: pointer; }
.anime-cover {
  aspect-ratio: 3 / 4;
  background: linear-gradient(145deg, var(--accent-soft), var(--bg-soft));
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; color: var(--accent);
}
.anime-info { padding: 12px 14px; }
.anime-info h4 { font-size: 14.5px; font-weight: 600; margin-bottom: 4px; }
.anime-info p { font-size: 12.5px; color: var(--text-2); }

/* 归档 */
.archive-group { margin-bottom: 26px; }
.archive-year {
  font-size: 18px; font-weight: 700; margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.archive-year::before {
  content: ""; width: 4px; height: 18px; border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}
.archive-month { font-size: 14px; font-weight: 600; color: var(--text-2); margin: 12px 0 6px; }
.archive-list { list-style: none; }
.archive-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; border-radius: 10px; font-size: 14.5px;
}
.archive-list li:hover { background: var(--accent-soft); }
.archive-list .date { color: var(--text-2); font-size: 12.5px; flex-shrink: 0; }

/* 单篇文章 */
.article-body { line-height: 2; font-size: 15.5px; }
.article-body h2 { margin: 26px 0 10px; font-size: 21px; }
.article-body p { margin-bottom: 14px; }
.article-body code {
  background: var(--accent-soft); color: var(--accent);
  padding: 2px 7px; border-radius: 6px; font-size: 13.5px;
}
.article-body blockquote {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft); padding: 10px 16px;
  border-radius: 0 10px 10px 0; margin: 16px 0; color: var(--text-2);
}
.article-body pre {
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 16px; margin: 14px 0;
  overflow-x: auto;
}
.article-body ul { padding-left: 22px; margin-bottom: 14px; }
.article-body li { margin-bottom: 6px; }

/* 关于页社交链接 */
.socials { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.socials a {
  padding: 10px 18px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 14px; font-weight: 600; transition: all .2s;
}
.socials a:hover { background: var(--accent); color: #fff; }

/* ---------------- 页脚 ---------------- */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.30);
  background: rgba(255, 255, 255, 0.22);     /* 页脚更透 */
  -webkit-backdrop-filter: blur(14px) saturate(170%);
  backdrop-filter: blur(14px) saturate(170%);
  padding: 26px 0 34px;
  color: var(--text-2); font-size: 13px;
  transition: background .3s;
}
html.dark footer {
  border-top-color: rgba(255, 255, 255, 0.10);
  background: rgba(23, 26, 38, 0.30);
}
.footer-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
}
.footer-heart { color: #f472b6; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 768px) {
  .site-name { font-size: 16px; }
  .nav a, .nav .nav-item { padding: 7px 9px; font-size: 13.5px; }
  .site-bar-inner { gap: 10px; }
  .grid-cards { grid-template-columns: 1fr 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .grid-cards { grid-template-columns: 1fr; }
  .banner-arrow { display: none; }
}