/* 老博客：三栏布局 + 深色玻璃拟态（版式与装饰语言参考 halfcity.top） */
:root {
  --bg: #0e1016;
  --card: rgba(255, 255, 255, .045);
  --line: rgba(255, 255, 255, .09);
  --text: #e6e8ee;
  --dim: #9aa1b2;
  --primary: #8f7bff;
  --pink: #f472b6;
  --radius: 20px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* 顶栏：固定 + 毛玻璃 */
.topnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 13px 5vw;
  background: color-mix(in srgb, var(--bg) 68%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 800; font-size: 17px; color: var(--text); text-decoration: none; }
.navlinks a { color: var(--dim); text-decoration: none; font-size: 14px; margin-left: 22px; transition: color .25s; }
.navlinks a:hover { color: var(--primary); }

/* 横幅：Ken Burns 动态背景 + 打字机副标题 */
.banner {
  position: relative; height: 58vh; min-height: 420px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.banner-bg {
  position: absolute; inset: -10%;
  background: url('/图鉴/1787245577546.png') center / cover no-repeat;
  filter: brightness(.38) saturate(1.15);
  animation: kenburns 22s ease-in-out infinite alternate;
}
.banner::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(14, 16, 22, .3) 0%, rgba(14, 16, 22, .55) 55%, var(--bg) 100%);
}
@keyframes kenburns {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.14) translate(1.5%, -1.5%); }
}
.banner-inner { position: relative; z-index: 2; text-align: center; padding: 0 5vw; animation: fadeInUp .8s ease both; }
.banner-title {
  font-size: clamp(34px, 6vw, 56px); font-weight: 900; letter-spacing: 1px;
  background: linear-gradient(120deg, #ffffff, #c9b8ff 55%, var(--pink));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 26px rgba(143, 123, 255, .35));
}
.banner-sub { margin-top: 16px; font-size: 17px; color: var(--dim); min-height: 1.6em; }
.caret { color: var(--primary); animation: blink 1s steps(1) infinite; }
.banner-meta { margin-top: 10px; font-size: 13px; color: var(--dim); opacity: .85; }
.scroll-hint {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 2; color: var(--dim); font-size: 20px; animation: bob 2s ease-in-out infinite;
}
@keyframes fadeInUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* 三栏布局：左 280px / 中自适应 / 右 280px */
.layout {
  max-width: 1360px; margin: -56px auto 0; padding: 0 16px 60px;
  position: relative; z-index: 3;
  display: grid; gap: 18px;
  grid-template-columns: 280px minmax(0, 1fr) 280px;
  align-items: start;
}
.col-left, .col-right { position: sticky; top: 76px; }

/* 小部件卡片 */
.widget {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 16px; padding: 16px 16px 14px; margin-bottom: 16px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  animation: fadeInUp .7s ease both;
}
.col-right .widget:nth-child(1) { animation-delay: .15s; }
.col-right .widget:nth-child(2) { animation-delay: .22s; }
.col-right .widget:nth-child(3) { animation-delay: .29s; }
.widget-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; position: relative; }
.widget-head::before {
  content: ""; width: 3px; height: 16px; border-radius: 2px;
  background: linear-gradient(180deg, var(--primary), var(--pink));
}
.wicon { font-size: 15px; }
.widget-title { font-size: 15px; font-weight: 800; }
.widget-note { margin-top: 10px; font-size: 11.5px; color: var(--dim); text-align: center; }

/* 作者卡 */
.author-box { text-align: center; }
.author-avatar {
  width: 88px; height: 88px; border-radius: 50%; object-fit: cover;
  border: 2px solid color-mix(in srgb, var(--primary) 60%, transparent);
  box-shadow: 0 0 20px -6px color-mix(in srgb, var(--primary) 70%, transparent);
}
.author-name { margin-top: 10px; font-weight: 800; font-size: 17px; }
.author-bio { margin-top: 6px; color: var(--dim); font-size: 12.5px; line-height: 1.7; }
.author-links { margin-top: 12px; display: flex; gap: 8px; justify-content: center; }
.mini-btn {
  padding: 4px 12px; border-radius: 999px; font-size: 12px;
  color: var(--dim); border: 1px solid var(--line); text-decoration: none;
  transition: all .25s;
}
.mini-btn:hover { color: var(--primary); border-color: var(--primary); }

/* 公告卡 */
.notice-list { list-style: none; }
.notice-list li {
  padding: 7px 4px; color: var(--dim); font-size: 13px; line-height: 1.6;
  border-bottom: 1px dashed var(--line);
}
.notice-list li:last-child { border-bottom: none; }

/* 分类胶囊 */
.cat-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.category-pill {
  padding: 5px 14px; border-radius: 12px; font-size: 13px; cursor: pointer;
  color: var(--dim); background: transparent; border: 1px solid var(--line);
  transition: all .25s; font-family: inherit;
}
.category-pill:hover { color: var(--primary); border-color: var(--primary); }
.category-pill.active {
  background: linear-gradient(120deg, var(--primary), #a78bfa);
  border-color: transparent; color: #fff;
}

/* 文章卡片流 */
.col-center { display: grid; gap: 18px; }
.post-card {
  display: flex; border-radius: var(--radius); overflow: hidden;
  background: var(--card); border: 1px solid var(--line);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: transform .3s cubic-bezier(.4, 0, .2, 1), border-color .3s, box-shadow .3s, opacity .3s;
  animation: fadeInUp .7s ease both;
}
.post-card:nth-child(1) { animation-delay: .05s; }
.post-card:nth-child(2) { animation-delay: .12s; }
.post-card:nth-child(3) { animation-delay: .19s; }
.post-card:nth-child(4) { animation-delay: .26s; }
.post-card:nth-child(5) { animation-delay: .33s; }
.post-card:nth-child(6) { animation-delay: .40s; }
.post-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--primary) 55%, transparent);
  box-shadow: 0 14px 44px -18px color-mix(in srgb, var(--primary) 50%, transparent);
}
.post-card.hidden { display: none; }
.cover { flex: 0 0 280px; width: 280px; aspect-ratio: 2 / 1.15; object-fit: cover; }
.content { flex: 1; padding: 22px 26px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12.5px; color: var(--dim); }
.tag {
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--dim); font-size: 12px; transition: all .25s; cursor: default;
}
.tag:hover { border-color: var(--primary); color: var(--primary); }
.title { font-size: 22px; font-weight: 800; line-height: 1.4; }
.title a { color: var(--text); text-decoration: none; transition: color .25s; }
.title a:hover { color: var(--primary); }
.excerpt { color: var(--dim); font-size: 14px; line-height: 1.75; }
.enter {
  margin-top: auto; align-self: flex-end;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); color: var(--text); text-decoration: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; transition: all .3s cubic-bezier(.4, 0, .2, 1);
}
.enter:hover { background: var(--primary); border-color: var(--primary); color: #fff; transform: translateX(3px); }

/* 统计卡 */
.stat-rows { display: flex; flex-direction: column; gap: 4px; }
.stat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 6px; border-radius: 10px; font-size: 13.5px; color: var(--dim);
}
.stat-row:nth-child(odd) { background: rgba(255, 255, 255, .03); }
.stat-row b { color: var(--text); font-size: 16px; font-variant-numeric: tabular-nums; }
.stat-row b.hot { color: #4ade80; }
.stat-row b.uptime { font-size: 13.5px; letter-spacing: .5px; }

/* 时间日历卡：大字等宽时钟 + 时段背景交叉淡入 + 问候语 */
.clock-box {
  position: relative; overflow: hidden; border-radius: 12px;
  padding: 16px 10px 14px; text-align: center; margin-bottom: 12px;
  background: #14161d;
}
.clock-bg { position: absolute; inset: 0; }
.clock-bg span {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1s ease; filter: brightness(.5) saturate(1.1);
}
.clock-box.morning .bg-morning { opacity: 1; }
.clock-box.noon .bg-noon { opacity: 1; }
.clock-box.evening .bg-evening { opacity: 1; }
.clock-box.night .bg-night { opacity: 1; }
.clock {
  position: relative; font-family: Consolas, "Courier New", monospace;
  font-size: 27px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 1px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .9);
}
.clock-date { position: relative; margin-top: 5px; font-size: 12.5px; color: rgba(255, 255, 255, .88); text-shadow: 0 1px 6px rgba(0, 0, 0, .9); }
.clock-greet { position: relative; margin-top: 7px; font-size: 13.5px; font-weight: 600; text-shadow: 0 1px 6px rgba(0, 0, 0, .9); }

/* 音乐卡：旋转黑胶 + 均衡器 */
.music-box { display: flex; align-items: center; gap: 12px; }
.vinyl {
  width: 96px; height: 96px; flex-shrink: 0; border-radius: 50%;
  position: relative; overflow: hidden;
  border: 3px solid rgba(255, 255, 255, .12);
  box-shadow: 0 0 24px -8px color-mix(in srgb, var(--primary) 65%, transparent);
}
.vinyl img { width: 100%; height: 100%; object-fit: cover; animation: spin 12s linear infinite; animation-play-state: paused; }
.vinyl::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 22px; height: 22px;
  border-radius: 50%; background: var(--bg); border: 3px solid rgba(255, 255, 255, .25);
}
.vinyl.playing img { animation-play-state: running; }
@keyframes spin { to { transform: rotate(360deg); } }
.music-info { flex: 1; min-width: 0; }
.music-title { font-weight: 800; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.music-artist { color: var(--dim); font-size: 12px; margin-top: 4px; }
.eq { display: flex; gap: 3px; align-items: flex-end; height: 20px; margin-top: 8px; }
.eq span {
  width: 4px; border-radius: 2px; height: 6px;
  background: linear-gradient(180deg, var(--primary), var(--pink));
  animation: eqbounce 1s ease-in-out infinite; animation-play-state: paused;
}
.eq.playing span { animation-play-state: running; }
.eq span:nth-child(2) { animation-delay: .15s; }
.eq span:nth-child(3) { animation-delay: .3s; }
.eq span:nth-child(4) { animation-delay: .45s; }
.eq span:nth-child(5) { animation-delay: .6s; }
@keyframes eqbounce { 0%, 100% { height: 6px; } 50% { height: 20px; } }
.play-btn {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--text);
  cursor: pointer; font-size: 14px; transition: all .25s; font-family: inherit;
}
.play-btn:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.music-ctrl { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 12px; }
.ctrl-btn {
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--dim);
  cursor: pointer; font-size: 12px; transition: all .25s; font-family: inherit;
}
.ctrl-btn:hover { color: var(--primary); border-color: var(--primary); }
.music-list { list-style: none; margin-top: 12px; border-top: 1px dashed var(--line); }
.music-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 8px 6px; font-size: 13px; cursor: pointer; border-radius: 8px;
  color: var(--dim); transition: all .2s;
}
.music-list li span { font-size: 11.5px; opacity: .8; }
.music-list li:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.music-list li.active { color: var(--primary); }
.music-list li.active::before { content: "♪ "; }
.music-tip { margin-top: 10px; font-size: 11.5px; color: var(--dim); text-align: center; line-height: 1.6; }

/* 日历卡 */
.cal-head { text-align: center; font-weight: 800; font-size: 14px; margin-bottom: 8px; }
.weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; margin-bottom: 4px; }
.weekdays span { text-align: center; font-size: 11px; color: var(--dim); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.calendar-grid div {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 12px; border-radius: 8px; color: var(--dim);
}
.calendar-grid div.blank { visibility: hidden; }
.calendar-grid div.today {
  background: linear-gradient(120deg, var(--primary), #a78bfa);
  color: #fff; font-weight: 800;
  box-shadow: 0 0 14px -4px color-mix(in srgb, var(--primary) 80%, transparent);
}

/* 页脚 */
footer {
  border-top: 1px solid var(--line); padding: 26px 5vw 34px;
  text-align: center; color: var(--dim); font-size: 13px; line-height: 2.2;
}
footer a { color: var(--primary); text-decoration: none; }

/* 响应式：中屏去掉右栏改横排，小屏全部单列 */
@media (max-width: 1150px) {
  .layout { grid-template-columns: 250px minmax(0, 1fr); }
  .col-right {
    grid-column: 1 / -1; position: static;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  }
  .col-right .widget { margin-bottom: 0; }
}
@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .col-left, .col-right { position: static; }
  .col-left { order: 2; }
  .col-center { order: 1; }
  .col-right { order: 3; grid-template-columns: 1fr; }
  .post-card { flex-direction: column; }
  .cover { flex: none; width: 100%; aspect-ratio: 16 / 8; }
  .content { padding: 18px 20px 20px; }
  .title { font-size: 20px; }
}
