/* =========================================================
   少年志 · 少年感电竞贴纸风
   ========================================================= */

:root {
  --bg: #16202e;
  --bg-deep: #05101e;
  --bg-header: rgba(7, 18, 33, 0.86);
  --card: #0b192a;
  --card-soft: #0d1a2b;
  --panel: #0f1e30;
  --input: #071221;
  --border: #213549;
  --border-soft: rgba(33, 53, 73, 0.62);
  --fg: #f0f4f8;
  --muted: #889ba9;
  --dim: #63798a;
  --primary: #00ccf9;
  --primary-fg: #001226;
  --primary-soft: rgba(0, 204, 249, 0.12);
  --primary-line: rgba(0, 204, 249, 0.4);
  --sky: #93d9f5;
  --sky-bg: #0c263a;
  --sunny: #f3821d;
  --sunny-text: #f5b75b;
  --sunny-soft: rgba(243, 130, 29, 0.15);
  --grape: #968dfd;
  --grape-soft: rgba(150, 141, 253, 0.14);
  --leaf: #00d091;
  --leaf-soft: rgba(0, 208, 145, 0.12);
  --danger: #ff7b7b;
  --danger-soft: rgba(255, 90, 90, 0.1);

  --font-display: "ZCOOL QingKe HuangYou", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  --radius: 4px;
  --wrap: 1152px;
  --header-h: 64px;

  --shadow-sticker: 0 0 0 1px #213d59, 0 10px 28px -10px rgba(0, 0, 0, 0.65);
  --shadow-lift: 0 0 0 1px rgba(0, 204, 249, 0.55), 0 0 24px rgba(0, 204, 249, 0.24), 0 18px 40px -12px rgba(0, 0, 0, 0.75);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::selection {
  background: var(--primary);
  color: var(--primary-fg);
}

img {
  max-width: 100%;
  display: block;
}

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

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 400;
  line-height: 1.25;
}

p {
  margin: 0;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

::placeholder {
  color: #5d7284;
  opacity: 1;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #244058 transparent;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: #244058;
  border-radius: 6px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-track {
  background: transparent;
}

.site-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 60% 40% at 50% -10%, rgba(0, 204, 249, 0.07), transparent 70%),
    linear-gradient(to right, rgba(13, 30, 47, 0.75) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(13, 30, 47, 0.75) 1px, transparent 1px);
  background-size: 100% 100%, 32px 32px, 32px 32px;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.display {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

.icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
  vertical-align: -0.13em;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.muted { color: var(--muted); }
.primary { color: var(--primary); }
.danger { color: var(--danger); }
.mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--fg);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn .icon { width: 16px; height: 16px; }

.btn-primary {
  background: var(--primary);
  color: var(--primary-fg);
  border-color: #9beaff;
  box-shadow: var(--shadow-sticker);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lift);
  background: #24d5ff;
}

.btn-outline {
  border-color: var(--primary-line);
  background: transparent;
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}

.btn-ghost {
  color: var(--muted);
}

.btn-ghost:hover {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.04);
}

.btn-danger {
  color: var(--danger);
  border-color: rgba(255, 123, 123, 0.35);
  background: transparent;
}

.btn-danger:hover {
  background: var(--danger-soft);
  border-color: var(--danger);
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  gap: 6px;
}

.btn-sm .icon { width: 14px; height: 14px; }

.btn-lg {
  height: 44px;
  padding: 0 26px;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.06em;
}

.btn:disabled,
.btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}

.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card-soft);
  color: var(--muted);
  transition: 0.18s ease;
}

.btn-icon:hover {
  color: var(--primary);
  border-color: var(--primary-line);
  background: var(--primary-soft);
}

.btn-icon .icon { width: 16px; height: 16px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
  transition: gap 0.18s ease, opacity 0.18s ease;
}

.link-arrow:hover { gap: 9px; opacity: 0.9; }
.link-arrow .icon { width: 15px; height: 15px; }

/* ---------- 贴纸卡片 ---------- */
.sticker {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.42));
  transition: transform 0.22s ease, border-color 0.22s ease, filter 0.22s ease;
}

.sticker:hover {
  transform: translateY(-4px);
  border-color: var(--primary-line);
  filter:
    drop-shadow(0 0 1px rgba(0, 204, 249, 0.55))
    drop-shadow(0 0 18px rgba(0, 204, 249, 0.14))
    drop-shadow(0 18px 24px rgba(0, 0, 0, 0.5));
}

.panel {
  background: rgba(11, 25, 42, 0.88);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: 0.03em;
}

.section-title .icon {
  width: 22px;
  height: 22px;
  color: var(--primary);
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-header);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(0, 204, 249, 0.25));
}

.brand-name {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  height: 19px;
  padding: 0 7px;
  border: 1px solid rgba(243, 130, 29, 0.4);
  border-radius: var(--radius);
  background: var(--sunny-soft);
  color: var(--sunny-text);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

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

.nav-link {
  position: relative;
  padding: 20px 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 14px;
  width: 100%;
  height: 3px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease;
  box-shadow: 0 0 8px rgba(0, 204, 249, 0.5);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--primary);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.nav-link.is-active { color: var(--primary); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.user-menu {
  position: relative;
}

.user-menu > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px 0 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-soft);
  color: var(--fg);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.18s ease;
}

.user-menu > summary::-webkit-details-marker { display: none; }

.user-menu > summary:hover { border-color: var(--primary-line); }

.user-avatar {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 3px;
  background: var(--primary);
  color: var(--primary-fg);
  font-size: 12px;
  font-weight: 700;
}

.user-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 168px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
  z-index: 30;
}

.user-menu-panel a,
.user-menu-panel button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  text-align: left;
  transition: 0.16s ease;
}

.user-menu-panel a:hover,
.user-menu-panel button:hover {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.05);
}

.user-menu-panel .icon { width: 15px; height: 15px; }

.mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--fg);
  border-radius: var(--radius);
}

.mobile-toggle:hover { background: rgba(255, 255, 255, 0.05); }
.mobile-toggle .icon { width: 20px; height: 20px; }

.mobile-nav {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: var(--header-h);
  padding: 12px 24px 18px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.45);
}

.mobile-nav.is-open { display: block; }

.mobile-nav a {
  display: block;
  padding: 11px 12px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.mobile-nav a.active,
.mobile-nav a:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.mobile-nav-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 64px;
  padding: 40px 0 34px;
  border-top: 1px solid var(--border-soft);
  background: linear-gradient(135deg, #0c263a 0%, #05101e 55%, #0b192a 100%);
  text-align: center;
}

.footer-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  margin: 0 auto 12px;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.04em;
}

.footer-tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--fg);
}

.footer-tagline .icon { width: 14px; height: 14px; color: var(--primary); }

.footer-text {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.footer-copy {
  margin-top: 14px;
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.03em;
}

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative;
  min-height: 575px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
  opacity: 0.72;
  transform: scale(1.015);
}

.hero-overlay {
  background:
    linear-gradient(180deg, rgba(5, 16, 30, 0.62) 0%, rgba(5, 16, 30, 0.5) 42%, rgba(22, 32, 46, 0.96) 100%),
    radial-gradient(ellipse 45% 55% at 50% 45%, rgba(0, 204, 249, 0.08), transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 64px 24px 96px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--primary-line);
  border-radius: var(--radius);
  background: rgba(11, 25, 42, 0.72);
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  box-shadow: 0 0 18px rgba(0, 204, 249, 0.08);
}

.hero-badge .icon { width: 13px; height: 13px; }

.hero-title {
  margin-top: 22px;
  font-family: var(--font-display);
  font-size: 72px;
  line-height: 1.12;
  letter-spacing: 0.025em;
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
}

.hero-accent-wrap {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

.hero-accent {
  color: var(--primary);
  text-shadow: 0 0 20px rgba(0, 204, 249, 0.42), 0 0 50px rgba(0, 204, 249, 0.18);
}

.hero-scribble {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -12px;
  width: 100%;
  height: 12px;
  overflow: visible;
  color: var(--sunny);
  opacity: 0.95;
}

.hero-scribble path {
  fill: none;
  stroke: currentColor;
  stroke-width: 5;
  stroke-linecap: round;
}

.hero-subtitle {
  max-width: 590px;
  margin: 26px auto 0;
  color: #a7b7c3;
  font-size: 17px;
  line-height: 1.9;
  letter-spacing: 0.01em;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.scroll-down {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-left: -20px;
  border: 1px solid var(--primary-line);
  border-radius: var(--radius);
  background: rgba(7, 18, 33, 0.55);
  color: var(--primary);
  transition: 0.2s ease;
}

.scroll-down:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}

.scroll-down .icon {
  width: 18px;
  height: 18px;
  animation: bounceY 1.3s ease-in-out infinite;
}

.hero-plane {
  position: absolute;
  top: 26%;
  left: 4%;
  width: 44px;
  height: 44px;
  color: var(--sky);
  opacity: 0;
  z-index: 1;
  animation: planeFly 9s linear infinite;
  filter: drop-shadow(0 0 10px rgba(0, 204, 249, 0.35));
}

.hero-dots {
  position: absolute;
  top: 56px;
  right: 7%;
  width: 120px;
  height: 120px;
  background-image: radial-gradient(rgba(0, 204, 249, 0.45) 1.5px, transparent 1.6px);
  background-size: 14px 14px;
  opacity: 0.45;
  z-index: 1;
  mask-image: radial-gradient(circle at center, #000 30%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at center, #000 30%, transparent 72%);
}

@keyframes planeFly {
  0%   { opacity: 0; transform: translate(-6vw, 10vh) rotate(8deg) scale(0.9); }
  12%  { opacity: 0.8; }
  55%  { opacity: 0.7; }
  85%  { opacity: 0.35; }
  100% { opacity: 0; transform: translate(86vw, -12vh) rotate(18deg) scale(1.15); }
}

@keyframes bounceY {
  0%, 100% { transform: translateY(-2px); }
  50% { transform: translateY(4px); }
}

/* ---------- 统计条 ---------- */
.stats-bar {
  position: relative;
  z-index: 3;
  margin-top: -40px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  padding: 12px 16px;
  background: rgba(11, 25, 42, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary);
}

.stat-icon .icon { width: 18px; height: 18px; }

.stat-number {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.1;
  color: var(--primary);
  font-variant-numeric: tabular-nums;
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
}

/* ---------- 首页主体 ---------- */
.home-main {
  margin-top: 48px;
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 36px;
  align-items: start;
}

.latest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

/* ---------- 文章卡片 ---------- */
.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.post-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.post-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border-soft);
  background: var(--card-soft);
}

.post-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

.post-card:hover .post-cover img { transform: scale(1.04); }

.post-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 16, 30, 0.08), transparent 45%, rgba(5, 16, 30, 0.25));
  pointer-events: none;
}

.cover-watermark {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 58px;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  opacity: 0.3;
  user-select: none;
}

.cover-amber {
  background:
    radial-gradient(ellipse 70% 100% at 50% 0%, rgba(243, 130, 29, 0.22), transparent 65%),
    linear-gradient(150deg, #241b12 0%, #0b192a 62%, #0b192a 100%);
}
.cover-amber .cover-watermark { color: var(--sunny-text); }

.cover-grape {
  background:
    radial-gradient(ellipse 70% 100% at 50% 0%, rgba(150, 141, 253, 0.22), transparent 65%),
    linear-gradient(150deg, #1b1830 0%, #0b192a 62%, #0b192a 100%);
}
.cover-grape .cover-watermark { color: var(--grape); }

.cover-mint {
  background:
    radial-gradient(ellipse 70% 100% at 50% 0%, rgba(0, 208, 145, 0.18), transparent 65%),
    linear-gradient(150deg, #0d2420 0%, #0b192a 62%, #0b192a 100%);
}
.cover-mint .cover-watermark { color: var(--leaf); }

.cover-cyan {
  background:
    radial-gradient(ellipse 70% 100% at 50% 0%, rgba(0, 204, 249, 0.2), transparent 65%),
    linear-gradient(150deg, #0b2431 0%, #0b192a 62%, #0b192a 100%);
}
.cover-cyan .cover-watermark { color: var(--primary); }

.cover-campus {
  background:
    radial-gradient(ellipse 70% 100% at 50% 0%, rgba(243, 130, 29, 0.2), transparent 65%),
    linear-gradient(150deg, #241b12 0%, #0b192a 62%, #0b192a 100%);
}
.cover-campus .cover-watermark { color: var(--sunny-text); opacity: 0.34; }

.cover-hobby {
  background:
    radial-gradient(ellipse 70% 100% at 50% 0%, rgba(0, 204, 249, 0.2), transparent 65%),
    linear-gradient(150deg, #0b2431 0%, #0b192a 62%, #0b192a 100%);
}
.cover-hobby .cover-watermark { color: var(--primary); opacity: 0.34; }

.cover-tech {
  background:
    radial-gradient(ellipse 70% 100% at 50% 0%, rgba(150, 141, 253, 0.2), transparent 65%),
    linear-gradient(150deg, #1b1830 0%, #0b192a 62%, #0b192a 100%);
}
.cover-tech .cover-watermark { color: var(--grape); opacity: 0.34; }

.cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px 0 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cat-badge img {
  width: 15px;
  height: 15px;
  object-fit: contain;
}

.cat-campus { background: var(--sunny-soft); color: var(--sunny-text); border-color: rgba(243, 130, 29, 0.42); }
.cat-hobby { background: var(--primary-soft); color: var(--primary); border-color: var(--primary-line); }
.cat-tech { background: var(--grape-soft); color: var(--grape); border-color: rgba(150, 141, 253, 0.42); }

.post-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 15px 16px 14px;
}

.post-card-title {
  font-family: var(--font-display);
  font-size: 21px;
  line-height: 1.35;
  letter-spacing: 0.02em;
  transition: color 0.18s ease;
}

.post-card:hover .post-card-title { color: var(--primary); }

.post-card-summary {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  min-height: 44px;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.mini-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: rgba(38, 58, 79, 0.55);
  color: #a2b3c0;
  font-size: 11px;
  line-height: 1;
  transition: 0.16s ease;
}

a.mini-tag:hover {
  color: var(--primary);
  border-color: var(--primary-line);
  background: var(--primary-soft);
}

.post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.post-meta-counters {
  display: flex;
  align-items: center;
  gap: 11px;
}

.post-meta-counters span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #8aa7b6;
  letter-spacing: 0.02em;
}

.post-meta-counters .icon { width: 13px; height: 13px; }
.post-meta-counters .icon.heart { color: var(--primary); }
.post-meta-counters span:hover { color: var(--primary); }

/* ---------- 侧栏 ---------- */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.side-card {
  padding: 16px;
}

.side-card .sticker-inner { padding: 0; }

.side-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.04em;
}

.side-title .icon { width: 16px; height: 16px; color: var(--primary); }

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-cloud .tag-chip:nth-child(3n + 1) {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary-line);
}
.tag-cloud .tag-chip:nth-child(3n + 2) {
  background: rgba(147, 217, 245, 0.09);
  color: var(--sky);
  border-color: rgba(147, 217, 245, 0.3);
}
.tag-cloud .tag-chip:nth-child(3n) {
  background: var(--sunny-soft);
  color: var(--sunny-text);
  border-color: rgba(243, 130, 29, 0.32);
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: rgba(38, 58, 79, 0.5);
  color: #a2b3c0;
  font-size: 11px;
  line-height: 1;
  transition: 0.16s ease;
}

.tag-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.tag-count {
  opacity: 0.5;
  font-size: 10px;
}

.archive-list { display: flex; flex-direction: column; gap: 4px; }

.archive-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 2px;
  border-bottom: 1px dashed rgba(33, 53, 73, 0.45);
  color: #a2b3c0;
  font-size: 13px;
  transition: color 0.16s ease;
}

.archive-row:last-child { border-bottom: 0; }
.archive-row:hover { color: var(--primary); }

.archive-count {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 18px;
  padding: 0 6px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
  font-size: 10px;
}

.side-about {
  padding: 20px 16px;
  text-align: center;
}

.side-about-avatar {
  width: 98px;
  height: 98px;
  margin: 0 auto 12px;
  border: 3px solid var(--primary);
  border-radius: 2px;
  object-fit: cover;
  background: var(--card-soft);
  box-shadow: 0 0 20px rgba(0, 204, 249, 0.2);
  animation: floatAvatar 5s ease-in-out infinite;
}

.side-about-name {
  font-family: var(--font-display);
  font-size: 20px;
}

.side-about-interests {
  margin: 4px 0 14px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.7;
}

.side-about .btn { width: 100%; }

.side-tip {
  padding: 16px;
  background: linear-gradient(160deg, rgba(0, 204, 249, 0.06), var(--card) 60%);
}

.side-tip p {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.8;
}

@keyframes floatAvatar {
  0%, 100% { transform: translateY(0) rotate(-0.6deg); }
  50% { transform: translateY(-7px) rotate(0.6deg); }
}

/* ---------- 页面标题 ---------- */
.page {
  padding-top: 44px;
  padding-bottom: 8px;
}

.page-head {
  margin-bottom: 28px;
}

.page-title {
  font-family: var(--font-display);
  font-size: 38px;
  letter-spacing: 0.03em;
}

.page-subtitle {
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- 筛选条 ---------- */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(11, 25, 42, 0.82);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cat-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #172839;
  color: #a2b3c0;
  font-size: 12.5px;
  font-weight: 500;
  transition: 0.16s ease;
}

.filter-pill img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.filter-pill:hover {
  color: var(--fg);
  border-color: var(--primary-line);
}

.filter-pill.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-fg);
  font-weight: 700;
  box-shadow: 0 0 14px rgba(0, 204, 249, 0.25);
}

.filter-pill.is-active img { filter: brightness(0.2); }

.search-box {
  position: relative;
  flex: 1 1 260px;
  max-width: 340px;
  min-width: 190px;
}

.search-box .icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  height: 36px;
  padding: 0 34px 0 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--input);
  color: var(--fg);
  font-size: 13px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 204, 249, 0.12);
}

.search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
}

.search-clear:hover { color: var(--fg); background: rgba(255, 255, 255, 0.06); }
.search-clear .icon { width: 13px; height: 13px; }

.sort-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-soft);
  margin-left: auto;
  flex-shrink: 0;
}

.sort-toggle button {
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  transition: 0.16s ease;
}

.sort-toggle button:hover { color: var(--fg); }

.sort-toggle button.is-active {
  background: var(--primary);
  color: var(--primary-fg);
  font-weight: 600;
}

.active-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid var(--primary-line);
  border-radius: 3px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px;
}

.filter-chip button {
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
}

.filter-chip .icon { width: 11px; height: 11px; }

.list-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 32px;
  align-items: start;
  margin-top: 24px;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.posts-grid .post-card-title { font-size: 18px; }
.posts-grid .post-card-summary { font-size: 12.5px; min-height: 42px; }
.posts-grid .post-cover { aspect-ratio: 16 / 10; }
.posts-grid .cover-watermark { font-size: 44px; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 34px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 34px;
  min-width: 34px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--muted);
  font-size: 12.5px;
  transition: 0.16s ease;
}

.page-btn:hover:not(:disabled) {
  color: var(--primary);
  border-color: var(--primary-line);
}

.page-btn:disabled,
.page-btn.is-disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }
.page-btn .icon { width: 14px; height: 14px; }

.tag-chip.is-active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.article-body figure {
  margin: 26px 0;
}

.article-body figcaption {
  margin-top: 8px;
  text-align: center;
  color: var(--dim);
  font-size: 12px;
}

.editor-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.block-tool:disabled {
  opacity: 0.18;
  cursor: not-allowed;
}

.cover-upload {
  padding: 0;
  width: 100%;
  font: inherit;
}

.admin-comment-post {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.admin-comment-post .icon { width: 12px; height: 12px; }

.admin-tabs {
  max-width: 100%;
  overflow-x: auto;
}

.page-indicator {
  color: var(--muted);
  font-size: 12.5px;
  font-family: var(--font-mono);
  padding: 0 4px;
}

.page-indicator strong { color: var(--primary); }

/* ---------- 文章详情 ---------- */
.article-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 38px 24px 28px;
}

.article-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
  font-size: 13px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 500;
  transition: color 0.16s ease;
}

.back-link:hover { color: var(--primary); }
.back-link .icon { width: 15px; height: 15px; }

.article-title {
  font-family: var(--font-display);
  font-size: 48px;
  line-height: 1.18;
  letter-spacing: 0.03em;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.article-meta .icon { width: 15px; height: 15px; }

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.article-cover {
  margin-top: 28px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  position: relative;
}

.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-cover .cover-watermark {
  font-size: 74px;
  letter-spacing: 0.1em;
}

.article-body {
  margin-top: 34px;
  color: #dbe5ed;
  font-size: 16px;
  line-height: 1.95;
}

.article-body p {
  margin: 0 0 20px;
}

.article-body h2 {
  position: relative;
  margin: 36px 0 16px;
  font-family: var(--font-display);
  font-size: 25px;
  line-height: 1.4;
  color: var(--fg);
}

.article-body h2::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 4px;
  bottom: 4px;
  width: 5px;
  border-radius: 2px;
  background: var(--primary);
  box-shadow: 0 0 12px rgba(0, 204, 249, 0.4);
}

.article-body blockquote {
  margin: 26px 0;
  padding: 14px 18px;
  border-left: 5px solid var(--primary);
  border-radius: 0 3px 3px 0;
  background: var(--sky-bg);
  color: var(--sky);
  font-size: 15px;
  line-height: 1.85;
}

.article-body pre {
  margin: 24px 0;
  padding: 16px 18px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #030915;
  color: #c7e5f4;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  tab-size: 2;
}

.article-body code {
  font-family: var(--font-mono);
}

.article-body p code,
.article-body blockquote code {
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(0, 204, 249, 0.1);
  color: var(--sky);
  font-size: 0.9em;
}

.article-body img {
  max-width: 100%;
  margin: 24px auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.article-body .image-caption {
  margin-top: -14px;
  text-align: center;
  color: var(--dim);
  font-size: 12px;
}

.article-like {
  display: flex;
  justify-content: center;
  margin: 44px 0 28px;
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 60px;
  padding: 0 30px;
  border: 1px solid #9beaff;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-fg);
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 0.05em;
  box-shadow: var(--shadow-sticker);
  transition: 0.2s ease;
}

.like-btn .icon { width: 20px; height: 20px; stroke-width: 2.2; }

.like-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lift);
}

.like-btn:active .icon { animation: heartPop 0.45s cubic-bezier(0.34, 1.56, 0.64, 1); }

.like-btn.is-liked,
.like-btn:disabled {
  background: #0c263a;
  border-color: rgba(147, 217, 245, 0.35);
  color: var(--sky);
  box-shadow: none;
  cursor: default;
  transform: none;
}

.like-btn.is-liked .icon { color: var(--sunny-text); fill: rgba(243, 130, 29, 0.18); }

@keyframes heartPop {
  0% { transform: scale(1) rotate(0); }
  40% { transform: scale(1.45) rotate(-8deg); }
  100% { transform: scale(1) rotate(0); }
}

.article-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.nav-post {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: 0.18s ease;
}

.nav-post:hover {
  border-color: var(--primary-line);
  background: var(--card-soft);
}

.nav-post.is-next { text-align: right; justify-content: flex-end; }

.nav-post .icon { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; }

.nav-post-label {
  display: block;
  color: var(--dim);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-post-title {
  display: block;
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 15.5px;
  line-height: 1.4;
}

.nav-post-empty {
  visibility: hidden;
}

/* ---------- 留言 ---------- */
.comments-card {
  margin-top: 36px;
  padding: 20px;
  background: rgba(11, 25, 42, 0.86);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.comments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.comments-title {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.03em;
}

.comments-title span { color: var(--primary); }

.comment-form {
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  gap: 12px;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--input);
  color: var(--fg);
  font-size: 13px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.comment-form input {
  height: 38px;
  padding: 0 12px;
}

.comment-form textarea {
  min-height: 84px;
  padding: 9px 12px;
  resize: vertical;
  line-height: 1.7;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 204, 249, 0.1);
}

.comment-form .input-row { align-self: start; }

.comment-form-foot {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -2px;
}

.char-count {
  color: var(--dim);
  font-size: 11px;
  font-family: var(--font-mono);
}

.char-count.is-over { color: var(--danger); }

.comment-error {
  color: var(--danger);
  font-size: 12px;
  min-height: 16px;
}

.comment-list {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-item {
  padding: 12px;
  border-radius: var(--radius);
  background: rgba(13, 26, 43, 0.62);
}

.comment-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.comment-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 3px;
  background: var(--primary-soft);
  color: var(--primary);
  font-family: var(--font-display);
  font-size: 15px;
  text-transform: uppercase;
}

.comment-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
}

.comment-date {
  margin-left: auto;
  color: var(--dim);
  font-size: 11px;
  font-family: var(--font-mono);
}

.comment-text {
  margin-top: 8px;
  color: #b8c7d2;
  font-size: 13.5px;
  line-height: 1.8;
  word-break: break-word;
}

.comment-reply {
  margin-top: 10px;
  padding: 9px 12px;
  border-left: 3px solid var(--primary);
  border-radius: 0 3px 3px 0;
  background: var(--sky-bg);
  color: var(--sky);
  font-size: 12.5px;
  line-height: 1.8;
}

.comment-reply strong {
  color: var(--primary);
  font-weight: 600;
}

.comment-empty {
  padding: 26px 0 10px;
  text-align: center;
  color: var(--dim);
  font-size: 13px;
}

.article-side-tags {
  margin-top: 36px;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ---------- 关于我 ---------- */
.about-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 48px 24px 12px;
}

.about-card {
  position: relative;
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  gap: 32px;
  padding: 40px;
  overflow: hidden;
  background: var(--card);
}

.about-poster {
  position: absolute;
  right: -34px;
  top: -42px;
  width: 240px;
  height: 240px;
  object-fit: cover;
  transform: rotate(6deg);
  opacity: 0.22;
  filter: saturate(1.2);
  pointer-events: none;
  mask-image: radial-gradient(circle at 55% 55%, #000 20%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 55% 55%, #000 20%, transparent 72%);
}

.about-avatar {
  width: 144px;
  height: 144px;
  object-fit: cover;
  border: 4px solid var(--primary);
  border-radius: 2px;
  background: var(--card-soft);
  box-shadow: 0 0 24px rgba(0, 204, 249, 0.24), 0 14px 28px rgba(0, 0, 0, 0.45);
  animation: floatAvatar 5s ease-in-out infinite;
}

.about-body { position: relative; z-index: 1; }

.about-title {
  font-family: var(--font-display);
  font-size: 38px;
  letter-spacing: 0.04em;
}

.about-identity {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13.5px;
}

.about-intro {
  margin-top: 14px;
  color: #bdcbd5;
  font-size: 14px;
  line-height: 1.9;
}

.interest-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.interest-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--card-soft);
  color: #a9bac6;
  font-size: 12px;
  transition: 0.16s ease;
}

.interest-chip:hover {
  transform: translateY(-2px);
  border-color: var(--primary-line);
  color: var(--primary);
}

.interest-chip .icon { width: 12px; height: 12px; color: var(--sunny-text); }

.about-timeline-section {
  max-width: 848px;
  margin: 52px auto 0;
}

.timeline {
  position: relative;
  margin-top: 26px;
  padding-left: 52px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 6px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--sunny), rgba(243, 130, 29, 0.15));
}

.timeline-item {
  position: relative;
  padding-bottom: 26px;
}

.timeline-num {
  position: absolute;
  left: -52px;
  top: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: var(--primary-fg);
  font-family: var(--font-display);
  font-size: 15px;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  box-shadow: 0 0 12px rgba(0, 204, 249, 0.3);
}

.timeline-date {
  color: var(--sunny-text);
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
}

.timeline-title {
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.02em;
}

.timeline-desc {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.about-cta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 52px;
}

.about-cta {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(12, 38, 58, 0.9), var(--card));
  position: relative;
  overflow: hidden;
}

.about-cta.is-amber {
  background: linear-gradient(150deg, rgba(80, 48, 18, 0.55), var(--card) 75%);
}

.about-cta h3 {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: 0.02em;
}

.about-cta p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.about-cta .btn { margin-top: 18px; }

.cta-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary);
}

.about-cta.is-amber .cta-icon { background: var(--sunny-soft); color: var(--sunny-text); }
.cta-icon .icon { width: 18px; height: 18px; }

/* ---------- 留言板 ---------- */
.guestbook-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 44px 24px 20px;
}

.guestbook-head {
  text-align: center;
  margin-bottom: 26px;
}

.guestbook-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin: 0 auto 14px;
  filter: drop-shadow(0 0 18px rgba(0, 204, 249, 0.35));
}

.guestbook-title {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 38px;
  letter-spacing: 0.04em;
}

.guestbook-title .icon { width: 28px; height: 28px; color: var(--primary); }

.guestbook-sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.guestbook-card {
  padding: 24px;
  background: rgba(11, 25, 42, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.guestbook-card .comments-title {
  font-size: 18px;
  margin-bottom: 16px;
}

.guestbook-card .comment-form {
  grid-template-columns: 208px minmax(0, 1fr);
}

.guestbook-list {
  margin-top: 20px;
  padding-top: 8px;
}

/* ---------- 登录 / 注册 ---------- */
.auth-page {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  padding: 52px 16px;
  overflow: hidden;
}

.auth-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.auth-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.auth-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 16, 30, 0.72), var(--bg) 88%);
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: 32px;
  background: rgba(11, 25, 42, 0.96);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px rgba(0, 204, 249, 0.08), 0 24px 60px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-bottom: 22px;
}

.auth-brand img { width: 40px; height: 40px; object-fit: contain; }
.auth-brand span {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.05em;
}

.auth-title {
  text-align: center;
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: 0.03em;
}

.auth-sub {
  margin: 6px 0 22px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.form-field { margin-bottom: 14px; }

.form-field label {
  display: block;
  margin-bottom: 6px;
  color: #c3d1db;
  font-size: 12.5px;
  font-weight: 500;
}

.form-field input,
.form-field textarea,
.form-field select {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--input);
  color: var(--fg);
  font-size: 14px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.form-field textarea {
  height: auto;
  min-height: 96px;
  padding: 10px 12px;
  line-height: 1.75;
  resize: vertical;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  border-color: var(--primary);
  background: #081625;
  box-shadow: 0 0 0 3px rgba(0, 204, 249, 0.1);
}

.form-field .hint {
  margin-top: 5px;
  color: var(--dim);
  font-size: 11.5px;
}

.auth-submit {
  width: 100%;
  height: 44px;
  margin-top: 6px;
  font-size: 14px;
}

.auth-alt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12.5px;
}

.auth-alt a { color: var(--primary); }
.auth-alt a:hover { text-decoration: underline; }

.auth-alt.center { justify-content: center; }

.auth-divider {
  height: 1px;
  margin: 18px 0;
  background: var(--border-soft);
}

.auth-error {
  display: none;
  margin-bottom: 14px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 123, 123, 0.4);
  border-radius: var(--radius);
  background: var(--danger-soft);
  color: #ffb3b3;
  font-size: 12.5px;
  line-height: 1.7;
}

.auth-error.is-visible { display: block; }

.auth-dev {
  margin: 14px 0;
  padding: 10px 12px;
  border: 1px dashed var(--primary-line);
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--sky);
  font-size: 12px;
  line-height: 1.7;
  word-break: break-all;
}

.auth-dev strong {
  display: block;
  margin-bottom: 2px;
  color: var(--primary);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.code-input {
  text-align: center;
  font-family: var(--font-display) !important;
  font-size: 26px !important;
  letter-spacing: 0.35em;
  text-indent: 0.35em;
}

.auth-success {
  padding: 14px;
  margin: 10px 0;
  border: 1px solid rgba(0, 208, 145, 0.4);
  border-radius: var(--radius);
  background: var(--leaf-soft);
  color: #8ff0c8;
  font-size: 13px;
  line-height: 1.8;
}

/* ---------- 后台 ---------- */
.admin-page {
  max-width: 1152px;
  margin: 0 auto;
  padding: 40px 24px 12px;
}

.admin-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.admin-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.admin-back:hover { color: var(--primary); }
.admin-back .icon { width: 13px; height: 13px; }

.admin-title {
  font-family: var(--font-display);
  font-size: 38px;
  letter-spacing: 0.04em;
}

.admin-greeting {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}

.admin-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.admin-stat-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary);
}

.admin-stat:nth-child(2) .admin-stat-icon { background: var(--sunny-soft); color: var(--sunny-text); }
.admin-stat:nth-child(3) .admin-stat-icon { background: var(--grape-soft); color: var(--grape); }
.admin-stat:nth-child(4) .admin-stat-icon { background: var(--leaf-soft); color: var(--leaf); }

.admin-stat-icon .icon { width: 17px; height: 17px; }

.admin-stat-num {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
  color: var(--fg);
  font-variant-numeric: tabular-nums;
}

.admin-stat-label {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
}

.admin-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--card-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.admin-tab {
  height: 34px;
  padding: 0 16px;
  border-radius: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  transition: 0.16s ease;
}

.admin-tab:hover { color: var(--fg); }

.admin-tab.is-active {
  background: var(--primary);
  color: var(--primary-fg);
  font-weight: 600;
}

.admin-panel {
  margin-top: 20px;
  padding: 20px;
  background: rgba(11, 25, 42, 0.88);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.admin-panel-title {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.03em;
}

.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-toolbar .search-box { max-width: 240px; flex: 1 1 180px; }
.admin-toolbar .search-box input { height: 34px; }

.status-filter {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-soft);
}

.status-filter a,
.status-filter button {
  height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
}

.status-filter .is-active {
  background: var(--primary);
  color: var(--primary-fg);
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
}

.data-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th {
  padding: 10px 12px;
  background: rgba(13, 26, 43, 0.85);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 12px;
  border-top: 1px solid var(--border-soft);
  vertical-align: middle;
}

.data-table tr:hover td { background: rgba(255, 255, 255, 0.015); }

.table-title {
  display: block;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 15.5px;
  letter-spacing: 0.02em;
}

.table-title:hover { color: var(--primary); }

.table-sub {
  margin-top: 2px;
  color: var(--dim);
  font-size: 11px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.status-published {
  color: var(--leaf);
  background: var(--leaf-soft);
  border-color: rgba(0, 208, 145, 0.35);
}

.status-draft {
  color: var(--sunny-text);
  background: var(--sunny-soft);
  border-color: rgba(243, 130, 29, 0.32);
}

.table-numbers {
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.table-numbers span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.table-numbers .icon { width: 12px; height: 12px; }

.table-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.action-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 27px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--card-soft);
  color: var(--muted);
  font-size: 11px;
  transition: 0.16s ease;
}

.action-link:hover { color: var(--primary); border-color: var(--primary-line); }
.action-link.is-danger:hover { color: var(--danger); border-color: rgba(255, 123, 123, 0.5); }
.action-link .icon { width: 12px; height: 12px; }

.admin-comment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-comment {
  padding: 14px;
  background: var(--card-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.admin-comment-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-comment-post {
  margin-left: auto;
  color: var(--dim);
  font-size: 11px;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-comment-post:hover { color: var(--primary); }

.admin-comment-text {
  margin-top: 8px;
  color: #b8c7d2;
  font-size: 13px;
  line-height: 1.8;
}

.admin-reply-box {
  margin-top: 10px;
  padding: 9px 12px;
  border-left: 3px solid var(--primary);
  background: var(--sky-bg);
  color: var(--sky);
  font-size: 12.5px;
}

.admin-reply-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.admin-reply-form input {
  flex: 1;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--input);
  font-size: 12px;
  outline: none;
}

.admin-reply-form input:focus { border-color: var(--primary); }

.settings-form {
  max-width: 820px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
}

.settings-grid .span-2 { grid-column: 1 / -1; }

.settings-section {
  margin: 26px 0 14px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
}

.settings-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 19px;
}

.settings-section h3 .icon { width: 16px; height: 16px; color: var(--primary); }
.settings-section p { margin-top: 4px; color: var(--dim); font-size: 12px; }

.avatar-upload-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

.avatar-preview {
  width: 78px;
  height: 78px;
  border: 2px solid var(--primary);
  border-radius: 2px;
  object-fit: cover;
  background: var(--card-soft);
}

.timeline-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 110px 1fr 1.5fr 34px;
  gap: 8px;
  align-items: center;
}

.timeline-row input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--input);
  font-size: 12px;
  outline: none;
}

.timeline-row input:focus { border-color: var(--primary); }

.settings-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
}

/* ---------- 编辑器 ---------- */
.editor-page {
  max-width: 1152px;
  margin: 0 auto;
  padding: 38px 24px 12px;
}

.editor-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.editor-title {
  font-family: var(--font-display);
  font-size: 38px;
  letter-spacing: 0.03em;
}

.editor-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

.editor-main { min-width: 0; }

.editor-side {
  position: sticky;
  top: calc(var(--header-h) + 20px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.editor-section {
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 18px;
}

.editor-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.03em;
}

.title-input {
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--input);
  color: var(--fg);
  font-family: var(--font-display) !important;
  font-size: 20px;
  outline: none;
}

.title-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 204, 249, 0.1); }

.editor-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 18px;
}

.editor-label {
  display: block;
  margin-bottom: 6px;
  color: #c3d1db;
  font-size: 12.5px;
  font-weight: 500;
}

.editor-hint {
  margin-top: 4px;
  color: var(--dim);
  font-size: 11px;
}

.editor-input,
.editor-textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--input);
  color: var(--fg);
  font-size: 13px;
  outline: none;
  transition: border-color 0.16s ease;
}

.editor-input {
  height: 38px;
  padding: 0 10px;
}

.editor-textarea {
  min-height: 64px;
  padding: 9px 10px;
  line-height: 1.7;
  resize: vertical;
}

.editor-input:focus,
.editor-textarea:focus { border-color: var(--primary); }

.category-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #172839;
  color: #a2b3c0;
  font-size: 12px;
  transition: 0.16s ease;
}

.category-option img { width: 15px; height: 15px; object-fit: contain; }

.category-option.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-fg);
  font-weight: 600;
}

.category-option.is-active img { filter: brightness(0.2); }

.cover-upload {
  position: relative;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--input);
  cursor: pointer;
  transition: 0.18s ease;
}

.cover-upload:hover { border-color: var(--primary); }

.cover-upload img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-upload-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.cover-upload-empty .icon { width: 22px; height: 22px; }

.cover-upload-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.block-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.block-card {
  position: relative;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-soft);
}

.block-card.is-code { background: #071221; }
.block-card.is-quote { background: rgba(12, 38, 58, 0.6); }

.block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.block-type {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.block-tools {
  display: flex;
  gap: 2px;
  opacity: 0.3;
  transition: opacity 0.16s ease;
}

.block-card:hover .block-tools { opacity: 1; }

.block-tool {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
}

.block-tool:hover { background: rgba(255, 255, 255, 0.07); color: var(--primary); }
.block-tool.is-danger:hover { color: var(--danger); }
.block-tool .icon { width: 12px; height: 12px; }

.block-textarea {
  width: 100%;
  min-height: 44px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--fg);
  font-size: 14px;
  line-height: 1.8;
  outline: none;
  resize: vertical;
}

.block-card.is-code .block-textarea {
  color: #c7e5f4;
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: #030915;
  padding: 10px;
  border-radius: 3px;
}

.block-card.is-quote .block-textarea { color: var(--sky); }
.block-card.is-image { background: var(--card-soft); }

.block-image-upload {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 110px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--input);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

.block-image-upload:hover { border-color: var(--primary); color: var(--primary); }
.block-image-upload .icon { width: 20px; height: 20px; }

.block-image-preview {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 3px;
  background: #030915;
}

.block-image-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.add-block-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.add-block-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--dim);
  font-size: 11px;
}

.add-block-label .icon { width: 13px; height: 13px; }

.add-block-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  transition: 0.16s ease;
}

.add-block-btn:hover { color: var(--primary); border-color: var(--primary-line); background: var(--primary-soft); }
.add-block-btn .icon { width: 13px; height: 13px; }

.editor-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 0 8px;
}

.editor-actions .spacer { flex: 1; }

/* ---------- 空态 / 加载 / 错误 ---------- */
.empty-state {
  padding: 46px 24px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: rgba(11, 25, 42, 0.5);
}

.empty-state img {
  width: 170px;
  max-width: 60%;
  margin: 0 auto 14px;
  opacity: 0.8;
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.03em;
}

.empty-state p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.empty-state .btn { margin-top: 16px; }

.loading-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.skeleton-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

.skeleton {
  background: linear-gradient(100deg, #0d1d2e 20%, #16293c 42%, #0d1d2e 64%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

.skeleton-cover { aspect-ratio: 16 / 9; }
.skeleton-line { height: 11px; margin: 12px 16px 0; border-radius: 2px; }
.skeleton-line.w-70 { width: 70%; }
.skeleton-line.w-50 { width: 50%; }
.skeleton-line:last-child { margin-bottom: 16px; }

@keyframes shimmer {
  0% { background-position: 120% 0; }
  100% { background-position: -20% 0; }
}

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 204, 249, 0.25);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-lg {
  width: 30px;
  height: 30px;
  border-width: 3px;
}

.center-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 260px;
  color: var(--muted);
  font-size: 13px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error-box {
  max-width: 560px;
  margin: 40px auto;
  padding: 24px;
  border: 1px solid rgba(255, 123, 123, 0.35);
  border-radius: var(--radius);
  background: var(--danger-soft);
  text-align: center;
}

.error-box h2 { font-family: var(--font-display); font-size: 24px; }
.error-box p { margin-top: 8px; color: #ffb3b3; font-size: 13px; }
.error-box .btn { margin-top: 16px; }
.error-box .btn + .btn { margin-left: 8px; }

.error-tips {
  margin: 14px auto 0;
  max-width: 420px;
  text-align: left;
  font-size: 13px;
  line-height: 1.8;
  color: #ffd7d7;
}

.error-tips li {
  position: relative;
  padding-left: 16px;
}

.error-tips li::before {
  content: "·";
  position: absolute;
  left: 4px;
  color: var(--danger);
}

.error-tips code {
  padding: 1px 5px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.28);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* ---------- Toast ---------- */
.toast-root {
  position: fixed;
  top: 78px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: min(92vw, 420px);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(11, 25, 42, 0.98);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  color: var(--fg);
  font-size: 13px;
  line-height: 1.6;
  pointer-events: auto;
  animation: toastIn 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.toast .icon { width: 16px; height: 16px; margin-top: 2px; flex-shrink: 0; }
.toast.is-success { border-color: rgba(0, 208, 145, 0.4); }
.toast.is-success .icon { color: var(--leaf); }
.toast.is-error { border-color: rgba(255, 123, 123, 0.45); }
.toast.is-error .icon { color: var(--danger); }
.toast.is-info .icon { color: var(--primary); }
.toast.is-out { animation: toastOut 0.24s ease forwards; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(-8px) scale(0.98); }
}

/* ---------- 确认弹窗 ---------- */
.confirm-dialog {
  width: min(92vw, 400px);
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--fg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
}

.confirm-dialog::backdrop {
  background: rgba(2, 8, 16, 0.72);
  backdrop-filter: blur(3px);
}

.confirm-dialog h3 {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.03em;
}

.confirm-dialog p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

/* ---------- 启动屏 ---------- */
.boot-splash {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bg);
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.boot-splash.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.boot-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(0, 204, 249, 0.4));
  animation: floatAvatar 3.2s ease-in-out infinite;
}

.boot-brand {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 0.08em;
}

.boot-loader {
  display: flex;
  gap: 5px;
  margin-top: 4px;
}

.boot-loader span {
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--primary);
  animation: bootPulse 1s ease-in-out infinite;
}

.boot-loader span:nth-child(2) { animation-delay: 0.15s; }
.boot-loader span:nth-child(3) { animation-delay: 0.3s; }

@keyframes bootPulse {
  0%, 100% { opacity: 0.2; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); }
}

/* ---------- 入场动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

.page-enter {
  animation: pageIn 0.36s ease;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.site-main { min-height: calc(100vh - var(--header-h) - 260px); }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .home-layout,
  .list-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-layout .sidebar,
  .list-layout .sidebar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 20px;
  }

  .posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .editor-layout { grid-template-columns: minmax(0, 1fr) 300px; }
}

@media (max-width: 860px) {
  :root { --header-h: 60px; }

  .main-nav,
  .header-actions .desktop-only { display: none; }

  .mobile-toggle { display: grid; }

  .brand-badge { display: none; }

  .hero { min-height: 540px; }
  .hero-title { font-size: 56px; }
  .hero-subtitle { font-size: 16px; }

  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .editor-layout { grid-template-columns: minmax(0, 1fr); }
  .editor-side { position: static; order: 2; }
  .editor-row { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .wrap { padding: 0 18px; }

  .hero { min-height: 500px; }
  .hero-content { padding: 52px 18px 90px; }
  .hero-title { font-size: 45px; }
  .hero-subtitle { font-size: 15px; line-height: 1.85; }
  .hero-badge { font-size: 11.5px; padding: 0 10px; height: 31px; }
  .hero-plane { display: none; }
  .hero-dots { width: 80px; height: 80px; right: 4%; }

  .stats-grid { gap: 10px; }
  .stat-card { padding: 10px 12px; gap: 9px; min-height: 62px; }
  .stat-icon { width: 32px; height: 32px; }
  .stat-icon .icon { width: 15px; height: 15px; }
  .stat-number { font-size: 21px; }
  .stat-label { font-size: 10.5px; }

  .section-title { font-size: 26px; }
  .page-title { font-size: 32px; }
  .page { padding-top: 32px; }
  .filter-bar { flex-wrap: wrap; gap: 10px; }
  .cat-pills { width: 100%; }
  .search-box { max-width: none; flex: 1 1 100%; order: 3; }
  .sort-toggle { order: 2; margin-left: 0; }

  .home-layout .sidebar,
  .list-layout .sidebar { grid-template-columns: 1fr; }
  .latest-grid { grid-template-columns: 1fr; gap: 18px; }
  .posts-grid { grid-template-columns: 1fr; gap: 18px; }

  .article-page { padding: 28px 18px; }
  .article-title { font-size: 33px; }
  .article-cover .cover-watermark { font-size: 46px; }
  .article-body { font-size: 15.5px; }
  .article-body h2 { font-size: 22px; }
  .article-body h2::before { left: -10px; }
  .article-nav { grid-template-columns: 1fr; }
  .nav-post-empty { display: none; }

  .comment-form,
  .guestbook-card .comment-form { grid-template-columns: 1fr; }

  .about-page { padding: 32px 18px 12px; }
  .about-card { grid-template-columns: 1fr; padding: 28px 24px; text-align: center; }
  .about-avatar { margin: 0 auto; width: 120px; height: 120px; }
  .interest-list { justify-content: center; }
  .about-poster { opacity: 0.13; }
  .about-timeline-section { margin-top: 38px; }
  .about-cta-grid { grid-template-columns: 1fr; gap: 16px; }
  .timeline { padding-left: 44px; }
  .timeline-num { left: -44px; }
  .timeline::before { left: 13px; }

  .guestbook-page { padding: 32px 18px 12px; }
  .guestbook-title { font-size: 32px; }
  .guestbook-card { padding: 18px; }

  .admin-page { padding: 28px 18px 12px; }
  .admin-title { font-size: 32px; }
  .admin-panel { padding: 14px; }
  .admin-head { align-items: flex-start; }
  .settings-grid { grid-template-columns: 1fr; }
  .timeline-row { grid-template-columns: 1fr; padding: 8px; border: 1px solid var(--border); border-radius: 3px; }

  .editor-page { padding: 28px 18px 12px; }
  .editor-title { font-size: 32px; }
  .editor-section { padding: 14px; }
  .title-input { height: 46px; font-size: 18px; }

  .auth-card { padding: 24px 20px; }
  .auth-title { font-size: 26px; }

  .footer-brand { font-size: 21px; }
}

@media (max-width: 460px) {
  .hero-title { font-size: 38px; }
  .hero-accent-wrap { display: block; }
  .hero-scribble { bottom: -8px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-card { min-height: 56px; }
  .brand-name { font-size: 22px; }
  .brand-logo { width: 32px; height: 32px; }
  .page-title { font-size: 28px; }
  .admin-stats { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal { opacity: 1; transform: none; }
}

/* 移动端后台表格：以卡片形式呈现，避免横向滚动 */
@media (max-width: 720px) {
  .admin-tabs {
    display: flex;
    width: 100%;
  }

  .admin-tab {
    flex: 1;
    justify-content: center;
    padding: 0 8px;
    white-space: nowrap;
  }

  .table-wrap {
    overflow: visible;
    border: 0;
  }

  .data-table {
    display: block;
    min-width: 0;
  }

  .data-table thead {
    display: none;
  }

  .data-table tbody {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .data-table tr {
    display: block;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card-soft);
  }

  .data-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 0;
    border: 0;
  }

  .data-table td:nth-child(1) {
    display: block;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-soft);
  }

  .data-table td:nth-child(2),
  .data-table td:nth-child(5),
  .data-table th:nth-child(2),
  .data-table th:nth-child(5) {
    display: none;
  }

  .data-table td:nth-child(3)::before {
    content: "状态";
    color: var(--dim);
    font-size: 11px;
  }

  .data-table td:nth-child(4)::before {
    content: "数据";
    color: var(--dim);
    font-size: 11px;
  }

  .data-table td:nth-child(6) {
    justify-content: flex-start;
    gap: 6px;
    margin-top: 6px;
    padding-top: 9px;
    border-top: 1px solid var(--border-soft);
  }

  .table-title {
    max-width: none;
    white-space: normal;
  }

  .table-actions {
    gap: 6px;
  }

  .action-link {
    padding: 0 8px;
  }

  .timeline-row .btn-icon {
    width: 34px;
    justify-self: end;
  }
}
