* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #f8f9fa;
  --card: #fff;
  --text: #333;
  --text2: #666;
  --accent: #4f46e5;
  --accent2: #6366f1;
  --border: #e5e7eb;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  background: #05070f;
  overflow: hidden;
  padding: 0 20px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at 50% 45%, rgba(109,94,252,0.18), transparent 60%),
    radial-gradient(ellipse at 15% 85%, rgba(34,211,238,0.12), transparent 55%),
    radial-gradient(ellipse at 85% 15%, rgba(244,114,182,0.12), transparent 55%),
    rgba(0,0,0,0.25);
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .45;
  pointer-events: none;
  z-index: 0;
}
.orb-1 { width: 320px; height: 320px; background: #6d5efc; top: 18%; left: 12%; animation: heroOrbFloat 16s ease-in-out infinite; }
.orb-2 { width: 260px; height: 260px; background: #22d3ee; bottom: 22%; right: 12%; animation: heroOrbFloat 20s ease-in-out infinite reverse; }
.orb-3 { width: 220px; height: 220px; background: #f472b6; top: 55%; left: 45%; animation: heroOrbFloat 24s ease-in-out infinite; }
#showcase-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  display: block;
  pointer-events: none;
}
#showcase-canvas.showcase-active {
  filter: saturate(1.07) contrast(1.05);
}
#hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}
.hero-grade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 44%, transparent 52%, rgba(2, 6, 18, 0.55) 100%),
    linear-gradient(to bottom, rgba(8, 14, 32, 0.22), rgba(0, 0, 0, 0) 32%, rgba(0, 0, 0, 0) 68%, rgba(3, 6, 16, 0.38)),
    radial-gradient(ellipse at 18% 20%, rgba(110, 170, 255, 0.10), transparent 46%),
    radial-gradient(ellipse at 84% 76%, rgba(255, 150, 70, 0.08), transparent 48%);
}
.hero.showcase-active #hero-canvas {
  display: none;
}

@keyframes heroOrbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.1); }
  66% { transform: translate(-30px, 25px) scale(.95); }
}
@keyframes heroTextShine {
  to { background-position: 300% center; }
}

#navbar {
  position: fixed !important; top: 0; left: 0; right: 0; z-index: 100;
  background: transparent;
  transition: background 0.3s, box-shadow 0.3s;
}
#navbar.dark {
  background: rgba(15,23,42,.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 1px 8px rgba(0,0,0,.12);
}
#navbar.dark::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, rgba(10,15,30,.55), rgba(10,15,30,0));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 45%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 0%, black 45%, transparent 100%);
  pointer-events: none;
  z-index: 0;
  display: none;
}
#navbar.dark .nav-inner {
  position: relative;
  z-index: 1;
}
#navbar.dark .brand { color: #fff; text-shadow: none; }
#navbar.dark .nav-item { color: rgba(255,255,255,0.75); text-shadow: none; }
#navbar.dark .nav-item:hover { background: rgba(255,255,255,0.1); color: #fff; }
#navbar.dark .nav-item.active { background: rgba(255,255,255,0.15); color: #fff; }
#navbar.dark .user-name { color: rgba(255,255,255,0.85); text-shadow: none; }
#navbar.dark .btn-outline.btn-sm { color: rgba(255,255,255,0.85); border-color: rgba(255,255,255,0.4); text-shadow: none; }
#navbar.dark .btn-outline.btn-sm:hover { background: rgba(255,255,255,0.1); }
/* 主页时导航栏完全透明，只保留文字 */
#navbar.dark {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: none;
  box-shadow: none;
}
#navbar.dark::before {
  display: none;
}
#navbar.dark .brand,
#navbar.dark .nav-item,
#navbar.dark .user-name {
  background: transparent;
  text-shadow: 0 1px 6px rgba(0,0,0,0.55);
}
#navbar.dark .nav-item { color: rgba(255,255,255,0.82); }
#navbar.dark .nav-item:hover,
#navbar.dark .user-menu:hover {
  background: transparent;
  color: #fff;
  text-shadow: 0 0 12px rgba(255,255,255,0.9);
}
#navbar.dark .nav-item.active {
  background: transparent;
  color: #fff;
  font-weight: 700;
  text-shadow: 0 0 14px rgba(165,180,252,0.95);
}
#navbar.dark .nav-item.active::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, #a5b4fc, #67e8f9, transparent);
  box-shadow: 0 0 10px rgba(165,180,252,0.9);
}
#navbar.dark .nav-item { position: relative; }
#navbar.dark .btn-outline.btn-sm {
  background: transparent;
  color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.35);
  text-shadow: 0 1px 6px rgba(0,0,0,0.55);
}
#navbar.dark .btn-outline.btn-sm:hover { background: transparent; border-color: rgba(255,255,255,0.75); }
#navbar.dark .user-avatar {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
}
#navbar.scrolled {
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  box-shadow: 0 1px 6px rgba(0,0,0,0.1);
}
#navbar.scrolled .brand { color: var(--accent); }
#navbar.scrolled .nav-item { color: var(--text2); }
#navbar.scrolled .nav-item:hover { background: #f3f4f6; color: var(--text); }

.nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; height: 56px; }
.brand { font-size: 18px; font-weight: 700; color: #fff; text-decoration: none; margin-right: 24px; margin-left: 120px; text-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.nav-links { display: flex; gap: 2px; align-items: center; margin-left: auto; }
.nav-item { padding: 6px 14px; border-radius: var(--radius); text-decoration: none; color: rgba(255,255,255,0.85); font-size: 14px; transition: all .15s; text-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.nav-item:hover { background: rgba(255,255,255,0.15); color: #fff; }
.nav-item.active { background: rgba(255,255,255,0.2); color: #fff; font-weight: 600; }

.user-menu { position: relative; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 8px; border-radius: var(--radius); }
.user-menu:hover { background: #f3f4f6; }
.user-menu:hover .user-dropdown { display: block; }
.user-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }
.user-name { font-size: 13px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.2); }
#navbar.scrolled .user-name { color: var(--text); text-shadow: none; }
#navbar .btn-outline.btn-sm { color: #fff; border-color: rgba(255,255,255,0.5); text-shadow: 0 1px 2px rgba(0,0,0,0.2); }
#navbar.scrolled .btn-outline.btn-sm { color: var(--accent); border-color: var(--accent); text-shadow: none; }
.user-dropdown { display: none; position: absolute; top: 100%; right: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 4px 12px rgba(0,0,0,.1); min-width: 140px; padding: 4px 0; z-index: 200; }
.user-dropdown a { display: block; padding: 8px 16px; font-size: 13px; color: var(--text); text-decoration: none; }
.user-dropdown a:hover { background: #f3f4f6; }
.user-dropdown hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

main { flex: 1; max-width: 1100px; margin: 0 auto; padding: 96px 20px 30px; width: 100%; min-height: 50vh; }

#home-content { position: relative; z-index: 1; }
footer { text-align: center; padding: 20px; color: var(--text2); font-size: 13px; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 20px; border-radius: var(--radius); border: none; font-size: 14px; cursor: pointer; transition: all .15s; text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent2); }
.btn-outline { background: var(--card); color: var(--accent); border: 1px solid var(--accent); }
.btn-outline:hover { background: #f3f4f6; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-sm { padding: 4px 12px; font-size: 13px; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 20px; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 4px; font-size: 13px; color: var(--text2); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; outline: none; transition: border-color .15s; font-family: inherit;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 100px; font-family: 'SF Mono', 'Consolas', monospace; }
.form-row-small { display: flex; gap: 8px; margin-bottom: 14px; }

.auth-page { max-width: 440px; margin: 40px auto; }

.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  background: #05070f;
  overflow: hidden;
  padding: 0 20px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,168,80,0.12), transparent 24%),
    radial-gradient(ellipse at 50% 42%, rgba(59,91,219,0.16), transparent 58%),
    radial-gradient(ellipse at 15% 85%, rgba(34,211,238,0.10), transparent 52%),
    radial-gradient(ellipse at 85% 15%, rgba(244,114,182,0.10), transparent 52%),
    rgba(0,0,0,0.30);
}
.hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  pointer-events: none;
  padding-top: 56px;
}
.hero h1 {
  position: relative;
  z-index: 3;
  font-size: clamp(34px, 7vw, 58px);
  margin: 0;
  color: #fff;
  background: none;
  -webkit-text-fill-color: #fff;
  text-shadow:
    0 3px 0 rgba(70, 130, 190, 0.55),
    0 6px 18px rgba(30, 60, 110, 0.5);
  letter-spacing: -0.02em;
  animation: heroTitleBob 3.4s ease-in-out infinite;
}
.hero p {
  position: relative;
  z-index: 3;
  font-size: clamp(14px, 2.4vw, 18px);
  opacity: 0.92;
  text-shadow: 0 1px 8px rgba(0,0,0,0.6);
  letter-spacing: 0.06em;
}
.hero-hint {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.55);
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
  animation: hintPulse 3.2s ease-in-out infinite;
}
.showcase-fallback {
  font-size: 13px;
  color: #ffd7a8;
  background: rgba(120, 60, 20, 0.35);
  border: 1px solid rgba(255, 200, 130, 0.35);
  border-radius: 999px;
  padding: 6px 16px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.mode-switch {
  margin-top: 4px;
  pointer-events: auto;
}
.mode-btn {
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(10, 20, 40, 0.5);
  color: #fff;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  letter-spacing: 0.08em;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s;
}
.mode-btn:hover {
  background: rgba(40, 80, 160, 0.55);
  border-color: rgba(180, 220, 255, 0.8);
  transform: translateY(-1px);
}
.fp-hint {
  position: absolute;
  bottom: 68px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  font-size: 12px;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 6px rgba(0,0,0,0.7);
  pointer-events: none;
}
/* 第一人称沉浸模式：隐藏文字 UI，只保留导航栏 */
body.fp-mode .hero-content {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
body.fp-mode .hero-arrow {
  opacity: 0;
  pointer-events: none;
}
body.fp-mode .fp-hint {
  bottom: 26px;
  padding: 8px 18px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  background: rgba(8,14,32,0.58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: auto;
  cursor: pointer;
  animation: none;
}
body.fp-mode .fp-hint:hover {
  border-color: rgba(180,220,255,0.65);
  color: #fff;
}

/* 实时数据 HUD */
.showcase-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 6px;
}
.hud-item {
  min-width: 78px;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  animation: hudFloat 4s ease-in-out infinite;
}
.hud-item:nth-child(2) { animation-delay: -1s; }
.hud-item:nth-child(3) { animation-delay: -2s; }
.hud-item:nth-child(4) { animation-delay: -3s; }
.hud-item:nth-child(5) { animation-delay: -4s; }
.hud-item:nth-child(6) { animation-delay: -5s; }
.hud-item span {
  font-family: 'SF Mono', 'Cascadia Code', Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 10px rgba(129,140,248,0.9);
}
.hud-item em {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.55);
}
.hud-item .live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 12px #34d399;
  animation: liveBlink 1.1s ease-in-out infinite;
}
@keyframes hudFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes liveBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
@keyframes hintPulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.85; }
}
@keyframes heroTitleBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* ============ 银河系中心黑洞首页 ============ */
.hero {
  touch-action: none;
}
.hero .hero-tagline {
  position: relative;
  z-index: 3;
  display: block;
  margin: -2px 0 0;
  font-size: clamp(12px, 2.2vw, 16px);
  letter-spacing: 0.14em;
  color: rgba(219,232,255,0.82);
  text-shadow: 0 0 18px rgba(124,164,255,0.35), 0 1px 8px rgba(0,0,0,0.65);
}
.mode-switch {
  margin-top: 6px;
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.mode-btn:active { transform: translateY(1px) scale(0.98); }
.mode-btn:nth-of-type(1) {
  border-color: rgba(255,190,120,0.55);
  background: rgba(90,40,20,0.42);
  text-shadow: 0 0 12px rgba(255,170,90,0.55);
}
.mode-btn:nth-of-type(1):hover {
  background: rgba(180,70,30,0.55);
  border-color: rgba(255,215,160,0.9);
  box-shadow: 0 0 18px rgba(255,150,70,0.28);
}
.mode-btn:nth-of-type(4) {
  border-color: rgba(170,210,255,0.55);
  background: rgba(24,48,96,0.46);
  text-shadow: 0 0 12px rgba(140,190,255,0.6);
}
.mode-btn:nth-of-type(4):hover {
  background: rgba(50,90,170,0.58);
  border-color: rgba(200,230,255,0.9);
  box-shadow: 0 0 18px rgba(110,170,255,0.3);
}
.mode-btn:nth-of-type(4).pulse-active {
  border-color: rgba(255,235,190,0.95);
  background: rgba(210,120,40,0.55);
  animation: pulseBtnFlash 0.7s ease-out;
}
.mode-btn:nth-of-type(5) {
  border-color: rgba(140,255,225,0.5);
  background: rgba(14,70,66,0.46);
  text-shadow: 0 0 12px rgba(120,255,215,0.55);
}
.mode-btn:nth-of-type(5):hover {
  background: rgba(24,110,102,0.58);
  border-color: rgba(190,255,238,0.9);
  box-shadow: 0 0 18px rgba(70,240,200,0.28);
}
@keyframes pulseBtnFlash {
  0% { transform: scale(1); }
  35% { transform: scale(1.12); }
  100% { transform: scale(1); }
}
#showcase-canvas.showcase-active {
  filter: saturate(1.12) contrast(1.07);
}
.hero.warping #showcase-canvas {
  filter: saturate(1.65) contrast(1.18);
}
.hero.warping .hero-content {
  opacity: 0.12;
  transition: opacity 0.35s;
}
.hero.warping .fp-hint {
  opacity: 0;
  transition: opacity 0.25s;
}

/* 曲率跃迁：旋转时空条纹 + 出口白闪 */
.warp-overlay {
  position: absolute;
  inset: -18%;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  background:
    radial-gradient(circle at 50% 50%, transparent 0%, rgba(88,140,255,0.10) 38%, transparent 72%),
    repeating-conic-gradient(from 0deg, rgba(150,195,255,0.16) 0deg 1.1deg, transparent 1.1deg 6.5deg);
  transition: opacity 0.3s;
}
.hero.warping .warp-overlay {
  opacity: 1;
  animation: warpSpin 0.65s linear infinite;
}
.warp-flash {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.98), rgba(170,210,255,0.55) 32%, transparent 72%);
}
.hero.warp-end .warp-flash {
  animation: warpFlash 0.9s ease-out forwards;
}
@keyframes warpSpin {
  to { transform: rotate(360deg); }
}
@keyframes warpFlash {
  0% { opacity: 0; }
  8% { opacity: 1; }
  100% { opacity: 0; }
}

.hero-arrow { position: absolute; bottom: 26px; left: 50%; z-index: 3; transform: translateX(-50%); animation: bounce 2s infinite; cursor: pointer; color: rgba(255,255,255,0.7); font-size: 30px; pointer-events: auto; background: none; border: none; font-family: inherit; line-height: 1; padding: 4px 12px; }
.hero-arrow:hover { color: #fff; }
.hero-arrow:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 8px; }

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-18px); }
  60% { transform: translateX(-50%) translateY(-8px); }
}

/* ============ 首页炫技项目介绍面板（hero 下方） ============ */
.showcase-panel {
  padding: 34px 0 10px;
}
.showcase-head {
  text-align: center;
  margin-bottom: 22px;
}
.showcase-head h2 {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #6d8dff, #22d3ee, #f472b6, #6d8dff);
  background-size: 260% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: heroTextShine 4s linear infinite;
}
.showcase-head p {
  color: var(--text2);
  font-size: 14px;
  max-width: 640px;
  margin: 0 auto;
}
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.showcase-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 18px 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: cardFloat 5s ease-in-out infinite;
}
.showcase-card:nth-child(2) { animation-delay: -1.2s; }
.showcase-card:nth-child(3) { animation-delay: -2.4s; }
.showcase-card:nth-child(4) { animation-delay: -3.6s; }
.showcase-card .sc-icon {
  font-size: 26px;
  display: inline-block;
  animation: iconWiggle 3s ease-in-out infinite;
}
.showcase-card h3 { font-size: 16px; margin: 8px 0 6px; }
.showcase-card p { font-size: 13px; color: var(--text2); line-height: 1.65; min-height: 42px; }
.sc-bar {
  height: 4px;
  margin-top: 12px;
  border-radius: 4px;
  background: var(--border);
  overflow: hidden;
}
.sc-bar span {
  display: block;
  height: 100%;
  width: 60%;
  border-radius: 4px;
  background: linear-gradient(90deg, #6d8dff, #22d3ee, #f472b6);
  background-size: 200% 100%;
  animation: barSlide 1.8s ease-in-out infinite, heroTextShine 2.4s linear infinite;
}
.showcase-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
@keyframes cardFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@keyframes iconWiggle {
  0%, 100% { transform: rotate(-4deg) scale(1); }
  50% { transform: rotate(4deg) scale(1.1); }
}
@keyframes barSlide {
  0%, 100% { margin-left: -25%; }
  50% { margin-left: 65%; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-orb,
  .hero h1,
  .hero .hero-tagline,
  .hero-hint,
  .showcase-hud .hud-item,
  .showcase-hud .live-dot,
  .hero-arrow,
  .hero.warping .warp-overlay,
  .showcase-card,
  .showcase-card .sc-icon,
  .sc-bar span,
  .mode-btn.pulse-active {
    animation: none !important;
  }
}

.post-item { cursor: pointer; transition: transform .1s; }
.post-item:hover { transform: translateY(-1px); }
.post-item h3 { margin-bottom: 6px; }
.post-item .meta { font-size: 13px; color: var(--text2); }

.post-detail h1 { margin-bottom: 8px; font-size: 24px; }
.post-detail .meta { font-size: 13px; color: var(--text2); margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.post-actions { display: flex; gap: 8px; margin-bottom: 16px; }
.post-content { line-height: 1.8; }
.post-content img { max-width: 100%; border-radius: var(--radius); }
.post-content pre { background: #1e1e2e; color: #cdd6f4; padding: 16px; border-radius: var(--radius); overflow-x: auto; font-size: 13px; }
.post-content code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.post-content pre code { background: none; padding: 0; }

.blog-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.blog-header h2 { margin: 0; }

/* 优雅博客列表 */
@keyframes beFadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.be-header,
.be-search,
.be-list,
.blog-filter-info {
  opacity: 0;
  animation: beFadeInUp .45s ease forwards;
}
.be-search { animation-delay: .05s; }
.blog-filter-info { animation-delay: .05s; }
.be-list { animation-delay: .1s; }
@media (prefers-reduced-motion: reduce) {
  .be-header, .be-search, .be-list, .blog-filter-info { opacity: 1; animation: none; }
}
.be-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.be-header h2 { font-size: 30px; font-weight: 500; letter-spacing: -.02em; margin: 0; color: hsl(240 10% 3.9%); }
.be-hash { color: hsl(200 29% 45%); }
.be-subtitle { margin: 6px 0 0; color: hsl(240 3.8% 28.1%); font-size: 14px; }
.be-search { margin-bottom: 16px; }
.be-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.be-card {
  list-style: none;
  padding: 12px 20px 14px;
  border: 1px solid hsl(240 5.9% 88%);
  border-radius: 16px;
  background: hsl(210 33% 99%);
  transition: background .2s ease;
}
.be-card:hover { background: hsl(240 4.8% 95%); }
.be-card-link { display: block; text-decoration: none; color: inherit; }
.be-date {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: hsl(240 3.8% 28.1%);
  padding: 4px 0;
}
.be-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 6px 0 2px;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  color: hsl(240 10% 3.9%);
}
.be-title { transition: color .15s ease; }
.be-card-link:hover .be-title { color: hsl(200 29% 45%); }
.be-arrow {
  opacity: 0;
  transform: translateX(-4px);
  color: hsl(200 29% 45%);
  font-size: 16px;
  transition: all .2s ease;
}
.be-card-link:hover .be-arrow { opacity: 1; transform: none; }
.be-desc {
  margin: 2px 0 0;
  color: hsl(240 3.8% 28.1%);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.be-read {
  font-size: 13px;
  font-style: italic;
  color: hsl(240 3.8% 28.1%);
  padding: 6px 0;
}
.be-tags { list-style: none; display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 0; padding: 0; }
.be-tags li { margin: 0; }
.be-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 8px;
  background: hsl(240 4.8% 95%);
  border: 1px solid hsl(240 5.9% 88%);
  color: hsl(240 3.8% 28.1%);
  font-size: 12px;
  text-decoration: none;
  cursor: pointer;
  transition: all .15s ease;
}
.be-tag:hover { background: hsl(200 29% 45%); border-color: hsl(200 29% 45%); color: #fff; }

/* 优雅文章详情 */
.be-post { max-width: 70rem; margin: 0 auto; padding-left: 24px; }
.be-post-header,
.be-post-main,
.be-toc {
  opacity: 0;
  animation: beFadeInUp .45s ease forwards;
}
.be-post-main { animation-delay: .05s; }
.be-toc { animation-delay: .1s; }
.be-post-main { max-width: 46rem; }
.be-post-header h1 { font-size: 28px; font-weight: 500; letter-spacing: -.02em; line-height: 1.35; color: hsl(240 10% 3.9%); margin: 14px 0 0; }
.be-post-meta { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: hsl(240 3.8% 28.1%); }
.be-meta-item { display: inline-flex; align-items: center; gap: 4px; }
.be-post-tag-link { color: hsl(240 3.8% 28.1%); text-decoration: none; }
.be-post-tag-link:hover { color: hsl(200 29% 45%); text-decoration: underline; text-underline-offset: 3px; }
.be-post-excerpt {
  margin: 14px 0 0;
  padding: 0;
  border: none;
  background: none;
  color: hsl(240 3.8% 28.1%);
  font-style: italic;
  font-size: 15px;
}
.be-post-divider { width: 50%; border-top: 1px solid hsl(240 5.9% 88%); margin-top: 18px; }
.be-post-content { font-size: 15px; color: hsl(240 3.8% 28.1%); line-height: 1.85; }
.be-post-content h1, .be-post-content h2, .be-post-content h3, .be-post-content h4 {
  color: hsl(240 10% 3.9%);
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.4;
  scroll-margin-top: 76px;
}
.be-post-content h1 { font-size: 1.6em; margin: 1.8em 0 .7em; }
.be-post-content h2 { font-size: 1.4em; margin: 1.8em 0 .7em; padding-bottom: .25em; border-bottom: 1px solid hsl(240 5.9% 88%); }
.be-post-content h3 { font-size: 1.2em; margin: 1.5em 0 .6em; }
.be-post-content p { margin: .9em 0; }
.be-post-content a { color: hsl(200 29% 45%); text-decoration: none; border-bottom: 1px solid hsl(200 29% 45% / .35); transition: border-color .15s; }
.be-post-content a:hover { border-color: hsl(200 29% 45%); }
.be-post-content blockquote {
  margin: 1.2em 0;
  padding: .5em 1em;
  border-left: 3px solid hsl(200 29% 45% / .5);
  background: hsl(240 4.8% 95%);
  border-radius: 0 8px 8px 0;
  color: hsl(240 3.8% 28.1%);
}
.be-post-content code {
  background: hsl(240 4.8% 95%);
  border: 1px solid hsl(240 5.9% 88%);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: .9em;
  color: #476582;
}
.be-post-content pre {
  background: hsl(240 20.54% 5.2%);
  color: #cdd6f4;
  padding: 16px 18px;
  border-radius: 12px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
}
.be-post-content pre code { background: none; border: none; padding: 0; color: inherit; }
.be-post-content img { border-radius: 12px; margin: 1.2em auto; box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.be-post-content hr { border: none; border-top: 1px solid hsl(240 5.9% 88%); margin: 2em 0; }
.be-post-content ul, .be-post-content ol { padding-left: 1.5em; margin: .9em 0; }
.be-post-content li { margin: .4em 0; }
.be-post .post-pager { margin-top: 40px; }

/* 文章页双栏布局 + 侧边目录 */
.be-post-layout { display: flex; align-items: flex-start; gap: 40px; margin-top: 28px; }
.be-post-main { flex: 1; min-width: 0; }
.be-toc {
  display: none;
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
  height: calc(100vh - 7rem);
  overflow-y: auto;
}

.be-toc-title { font-size: 14px; font-weight: 600; color: hsl(240 10% 3.9%); margin-bottom: 12px; letter-spacing: .02em; }
.be-toc .post-toc { padding: 0; }
.be-toc .post-toc ul { list-style: none; padding-left: 0; margin: 0; }
.be-toc .post-toc li { margin: 0; }
.be-toc .toc-item-wrap { position: relative; }
.be-toc .toc-progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  height: auto;
  border-radius: 0;
  background: hsl(240 5.9% 88%);
  transition: background-color .2s ease;
}
/* 大标题不显示蓝条；小标题蓝条保留并形成连续线 */
.be-toc .toc-level-2 .toc-progress-bar { display: none; }
.be-toc .toc-item-wrap.active .toc-progress-bar,
.be-toc .toc-item-wrap:hover .toc-progress-bar { background: hsl(200 29% 45%); }
.be-toc .toc-item-wrap.is-read .toc-progress-bar { background: hsl(240 5.9% 88%); }

.be-toc .post-toc a:hover { color: hsl(240 10% 3.9%); background: hsl(240 4.8% 95%); opacity: 1; }
.be-toc .post-toc a.active {
  color: hsl(200 29% 45%);
  background: hsl(240 4.8% 95%);
  font-weight: 500;
  opacity: 1;
}
.be-toc .post-toc a.is-read { color: hsl(240 3.8% 28.1%); opacity: .6; }
.be-toc .post-toc .toc-level-3 .toc-item-wrap { margin-left: 0; }
@media (min-width: 1024px) {
  .be-toc { display: block; }
  .be-toc-mobile { display: none; }
}

.editor-toolbar { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.editor-toolbar button { padding: 4px 10px; border: 1px solid var(--border); background: var(--card); border-radius: 4px; cursor: pointer; font-size: 13px; font-family: monospace; }
.editor-toolbar button:hover { background: #f3f4f6; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tag { padding: 2px 10px; background: #e0e7ff; color: var(--accent); border-radius: 20px; font-size: 12px; cursor: pointer; }
.tag.active { background: var(--accent); color: #fff; }

.toast { position: fixed; top: 20px; right: 20px; padding: 12px 24px; border-radius: var(--radius); color: #fff; font-size: 14px; z-index: 1000; animation: slideIn .3s; }
.toast-success { background: #10b981; }
.toast-error { background: #ef4444; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: none; opacity: 1; } }

.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 20px; }
.pagination button { padding: 6px 14px; border: 1px solid var(--border); background: var(--card); border-radius: var(--radius); cursor: pointer; font-size: 14px; }
.pagination button:disabled { opacity: .4; cursor: default; }
.pagination button.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; z-index: 200; }
.modal { background: var(--card); border-radius: var(--radius); padding: 28px; width: 90%; max-width: 400px; max-height: 80vh; overflow-y: auto; }
.modal h3 { margin-bottom: 16px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text2); }
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }

.spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

.oauth-divider { display: flex; align-items: center; margin: 14px 0; }
.oauth-divider::before, .oauth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.oauth-divider span { padding: 0 12px; color: var(--text2); font-size: 12px; }
.oauth-buttons { display: flex; gap: 8px; flex-direction: column; }
.oauth-buttons .btn { justify-content: center; padding: 11px; font-size: 14px; border-radius: var(--radius); }
.oauth-github { background: #24292e; color: #fff; }
.oauth-github:hover { background: #1a1f23; }
.oauth-gitee { background: #c71d23; color: #fff; }
.oauth-gitee:hover { background: #a5171d; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 16px; }
.tool-card { text-align: center; padding: 24px; }
.tool-card .icon { font-size: 32px; margin-bottom: 8px; }
.tool-card h3 { margin-bottom: 4px; }

/* ============ 文件页 / 网盘风格 ============ */
.files-page { max-width: 1200px; margin: 0 auto; }
.pan-card { background: #fff; border-radius: 12px; box-shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.1); }

.pan-layout { display: flex; align-items: flex-start; gap: 14px; }
.pan-sidebar { width: 168px; flex-shrink: 0; padding: 12px; position: sticky; top: 70px; background: linear-gradient(180deg, #f7f8fa, rgba(217,225,239,.3)); border: none; }
.pan-sidebar-title { font-size: 16px; font-weight: 700; color: #111827; padding: 4px 10px 14px; border-bottom: 1px solid #f0f1f3; margin-bottom: 10px; }
.pan-sidebar-menu { display: flex; flex-direction: column; gap: 2px; }
.pan-sidebar-item { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 8px; font-size: 14px; color: #4b5563; cursor: pointer; transition: all .15s; user-select: none; }
.pan-sidebar-item:hover { background: #f3f4f6; color: #111827; }
.pan-sidebar-item.active { background: #eff6ff; color: #3c80ff; font-weight: 600; }
.pan-sidebar-icon { font-size: 16px; width: 20px; text-align: center; }
.pan-sidebar-storage { margin-top: 18px; padding: 12px 10px; background: #f8fafc; border-radius: 10px; }
.storage-label { font-size: 12px; color: #6b7280; }
.storage-text { font-size: 15px; font-weight: 700; color: #3c80ff; margin-top: 2px; }
.storage-files { font-size: 12px; color: #9ca3af; margin-top: 2px; }

.pan-main { flex: 1; min-width: 0; }
.pan-operator { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 12px; flex-wrap: wrap; }
.pan-operator-left, .pan-operator-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pan-breadcrumb { padding: 2px 4px 12px; font-size: 18px; font-weight: 700; color: #111827; }
.pan-breadcrumb span { position: relative; }
.pan-breadcrumb span::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px; border-radius: 2px; background: #3c80ff; }

.pan-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 24px; margin-bottom: 14px; flex-wrap: wrap; }
.pan-header-left { min-width: 0; }
.pan-title-row { display: flex; align-items: center; gap: 10px; }
.pan-title-row h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: .3px; }
.pan-storage-badge { background: #eff6ff; color: #3c80ff; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 20px; }
.files-stats { font-size: 13px; color: #6b7280; margin-top: 4px; }
.files-stats b { color: #3c80ff; font-weight: 700; }
.pan-header-actions { display: flex; align-items: center; gap: 10px; }
.pan-upload-btn { background: #3c80ff; border-radius: 8px; height: 40px; padding: 0 20px; font-size: 14px; box-shadow: 0 1px 2px rgba(60,128,255,.3); }
.pan-upload-btn:hover { background: #2f6fe0; }

.pan-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 14px; flex-wrap: wrap; }
.pan-tabs { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.pan-tab { border: none; background: transparent; padding: 8px 13px; border-radius: 8px; font-size: 14px; color: #4b5563; cursor: pointer; transition: all .15s; }
.pan-tab:hover { background: #f3f4f6; color: #111827; }
.pan-tab.active { background: #eff6ff; color: #3c80ff; font-weight: 600; }
.pan-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pan-search { position: relative; }
.pan-search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 13px; color: #9ca3af; pointer-events: none; }
.pan-search input { width: 220px; height: 40px; padding: 0 12px 0 32px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 13px; outline: none; transition: border-color .15s, box-shadow .15s; background: #fff; }
.pan-search input:focus { border-color: #3c80ff; box-shadow: 0 0 0 3px rgba(60,128,255,.12); }
.pan-select { padding: 8px 10px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 13px; background: #fff; color: #374151; outline: none; cursor: pointer; }
.pan-select:focus { border-color: #3c80ff; }
.pan-view-toggle { display: flex; gap: 4px; background: #f5f6f7; border-radius: 8px; padding: 4px; }
.pan-view-toggle button { border: none; background: transparent; border-radius: 6px; padding: 4px 10px; cursor: pointer; color: #6b7280; font-size: 14px; line-height: 1.2; transition: all .15s; }
.pan-view-toggle button + button { border-left: none; }
.pan-view-toggle button:hover { background: rgba(182,186,195,.2); color: #111827; }
.pan-view-toggle button.active { background: #fff; color: #3c80ff; box-shadow: 0 1px 2px rgba(0,0,0,.06); }

.pan-body { background: #fff; border-radius: 12px; overflow: hidden; }
.pan-body .empty-state { background: #fff; }
.pan-batch { margin-bottom: 14px; border-radius: 12px; }

.upload-progress {
  width: 100%; padding: 8px 0;
}
.progress-bar {
  height: 6px; background: #3c80ff; border-radius: 3px;
  width: 0; transition: width 0.3s;
}
.progress-text {
  font-size: 12px; color: #6b7280; margin-top: 4px; display: block;
}

.file-table-wrap { overflow-x: auto; }
.file-table { width: 100%; border-collapse: collapse; }
.file-table th { text-align: left; padding: 12px 16px; font-size: 12px; color: #6b7280; font-weight: 600; border-bottom: 1px solid #eef0f2; white-space: nowrap; background: #fafbfc; }
.file-table td { padding: 10px 16px; border-bottom: 1px solid #f0f1f3; font-size: 14px; vertical-align: middle; }
.file-table tbody tr { transition: background .12s; }
.file-table tbody tr:hover td { background: #f8fafc; }
.file-table tbody tr:last-child td { border-bottom: none; }
.file-table td input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: #3c80ff; }
.file-name-cell { display: flex; align-items: center; max-width: 420px; min-width: 0; }
.file-name-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 400; color: #1b1f35; }
.file-preview-link { color: #1b1f35; text-decoration: none; cursor: pointer; }
.file-preview-link:hover { color: #3c80ff; }
.file-cell-meta { color: #bbbdc9; font-size: 13px; white-space: nowrap; }
.file-actions { display: flex; gap: 4px; }
.file-table tr .file-actions { opacity: .85; transition: opacity .15s; }
.file-table tr:hover .file-actions { opacity: 1; }
.file-actions .btn { white-space: nowrap; }
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border: none; border-radius: 6px;
  background: transparent; color: #6b7280; font-size: 14px; cursor: pointer;
  transition: all .15s;
}
.btn-icon:hover { background: #f3f4f6; color: #111827; }
.btn-icon-danger:hover { background: #fef2f2; color: #dc2626; }
.fg-actions .btn-icon { width: 28px; height: 28px; }

.file-icon-tile { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0; margin-right: 10px; }
.file-svg-icon { width: 1em; height: 1em; display: block; }
.fg-icon-large { width: 58px; height: 58px; font-size: 30px; margin: 0; border-radius: 16px; }
.file-tile-image { background: #eff6ff; }
.file-tile-video { background: #fef2f2; }
.file-tile-audio { background: #ecfdf5; }
.file-tile-pdf { background: #fee2e2; }
.file-tile-doc { background: #dbeafe; }
.file-tile-xls { background: #dcfce7; }
.file-tile-ppt { background: #ffedd5; }
.file-tile-zip { background: #fef9c3; }
.file-tile-code { background: #e0e7ff; }
.file-tile-text { background: #f3f4f6; }
.file-tile-app { background: #fce7f3; }
.file-tile-default { background: #f3f4f6; }

.file-preview-panel { background: #fff; border: 1px solid #eef0f2; border-radius: 12px; margin-top: 14px; overflow: hidden; box-shadow: 0 1px 3px rgba(16,24,40,.08); }
.preview-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; background: #f9fafb; border-bottom: 1px solid var(--border); font-size: 13px; }
.preview-body { padding: 16px; overflow: auto; max-height: 70vh; }
.preview-body pre { margin: 0; font-size: 13px; white-space: pre-wrap; word-wrap: break-word; }
.preview-body code { font-family: 'SF Mono', 'Consolas', monospace; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; }
.badge-public { background: #d1fae5; color: #065f46; }
.badge-private { background: #fef3c7; color: #92400e; }
.badge-admin { background: #e0e7ff; color: #3730a3; }
.badge-user { background: #f3f4f6; color: var(--text2); }

.profile-page .card { max-width: 600px; margin-left: auto; margin-right: auto; }
.profile-avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; margin: 0 auto; }
.post-mini { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; cursor: pointer; }
.post-mini:last-child { border-bottom: none; }

.admin-page h2 { margin-bottom: 16px; }
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; text-align: center; }
.stat-num { font-size: 28px; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 13px; color: var(--text2); margin-top: 4px; }

@media (max-width: 768px) {
  .hero h1 { font-size: 28px; }
  .hero .hero-tagline { letter-spacing: 0.08em; line-height: 1.7; padding: 0 8px; }
  .mode-switch { gap: 8px; }
  .mode-btn { padding: 7px 12px; font-size: 12px; letter-spacing: 0.04em; }
  .fp-hint { width: 92%; bottom: 22px; text-align: center; font-size: 10px; letter-spacing: 0.05em; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .pan-layout { flex-direction: column; }
  .pan-sidebar { width: 100%; position: static; flex-direction: row; align-items: center; gap: 8px; overflow-x: auto; padding: 10px 12px; }
  .pan-sidebar-title, .pan-sidebar-storage { display: none; }
  .pan-sidebar-menu { flex-direction: row; gap: 4px; }
  .pan-sidebar-item { white-space: nowrap; }
  .pan-toolbar { width: 100%; }
  .pan-header { flex-direction: column; align-items: flex-start; }
  .pan-header-actions { width: 100%; }
  .pan-tools { width: 100%; }
  .pan-search { flex: 1; min-width: 180px; }
  .pan-search input { width: 100%; }
  .pan-operator { flex-direction: column; align-items: stretch; }
  .pan-operator-left, .pan-operator-right { width: 100%; }
  .pan-operator-right .pan-search { flex: 1; }
}

/* ============ Markdown 内容排版（post-content） ============ */
.post-content { font-size: 15px; word-wrap: break-word; }
.post-content h1, .post-content h2, .post-content h3, .post-content h4,
.post-content h5, .post-content h6 {
  margin: 1.6em 0 0.7em; line-height: 1.4; font-weight: 700;
  scroll-margin-top: 76px;
}
.post-content h1 { font-size: 1.6em; padding-bottom: .3em; border-bottom: 1px solid var(--border); }
.post-content h2 { font-size: 1.4em; padding-bottom: .3em; border-bottom: 1px solid var(--border); }
.post-content h3 { font-size: 1.2em; }
.post-content h4 { font-size: 1.05em; color: var(--text); }
.post-content p { margin: 0.8em 0; }
.post-content ul, .post-content ol { margin: 0.8em 0; padding-left: 1.8em; }
.post-content li { margin: 0.35em 0; }
.post-content li > ul, .post-content li > ol { margin: 0.2em 0; }
.post-content blockquote {
  margin: 1em 0; padding: 0.6em 1em; border-left: 4px solid var(--accent);
  background: #eef2ff; color: #4b5563; border-radius: 0 var(--radius) var(--radius) 0;
}
.post-content blockquote p { margin: 0.3em 0; }
.post-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.post-content a:hover { color: var(--accent2); }
.post-content hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }
.post-content img { max-width: 100%; border-radius: var(--radius); display: block; margin: 1em auto; box-shadow: var(--shadow); }
.post-content strong { font-weight: 700; }
.post-content del { color: var(--text2); }
.post-content code {
  background: #f3f4f6; padding: 2px 6px; border-radius: 4px;
  font-size: 13px; font-family: 'SF Mono', 'Cascadia Code', Consolas, monospace;
}
.post-content pre { margin: 0; }
.post-content kbd {
  background: #f3f4f6; border: 1px solid var(--border); border-bottom-width: 2px;
  padding: 1px 6px; border-radius: 4px; font-size: 12px; font-family: monospace;
}
.post-content input[type="checkbox"] { margin-right: 6px; }

/* ============ 代码块（语言标签 + 复制按钮） ============ */
.code-block { position: relative; margin: 1em 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.code-block-bar {
  display: flex; justify-content: space-between; align-items: center;
  background: #16161e; padding: 5px 14px; font-size: 12px; color: #7f849c;
}
.code-block-lang { font-family: 'SF Mono', Consolas, monospace; text-transform: lowercase; }
.code-copy-btn {
  background: #2d2d3a; color: #cdd6f4; border: none; border-radius: 4px;
  padding: 3px 12px; font-size: 12px; cursor: pointer; font-family: inherit;
}
.code-copy-btn:hover { background: #3a3a4a; }
.code-block pre { border-radius: 0; }
.code-block pre.shiki {
  background: #0d1117 !important;
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
}
.code-block pre.shiki code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-family: 'SF Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.code-block pre.shiki .line {
  display: inline-block;
  width: 100%;
}

/* ============ 文章目录 TOC ============ */
.post-toc-details {
  margin: 16px 0; border: 1px solid var(--border); border-radius: var(--radius);
  background: #fafbff; overflow: hidden;
}
.post-toc-details summary {
  padding: 10px 16px; cursor: pointer; font-size: 14px; font-weight: 600;
  color: var(--text); user-select: none;
}
.post-toc-details summary:hover { background: #f3f4f6; }
.post-toc { padding: 4px 16px 14px; }
.post-toc ul { list-style: none; padding-left: 0; margin: 0; }
.post-toc li { margin: 3px 0; }
.post-toc a { color: var(--text2); text-decoration: none; font-size: 13.5px; line-height: 1.7; display: block; }
.post-toc a:hover { color: var(--accent); }
.post-toc .toc-level-1 { padding-left: 0; }
.post-toc .toc-level-2 { padding-left: 14px; }
.post-toc .toc-level-3 { padding-left: 28px; }
.post-toc .toc-level-4 { padding-left: 42px; }
.post-toc .toc-item-wrap { position: relative; padding-left: 14px; }
.post-toc .toc-progress-bar {
  position: absolute;
  left: 0;
  top: 10%;
  width: 2px;
  height: 0;
  border-radius: 2px;
  background: var(--accent);
  opacity: .3;
  transition: height .1s linear, opacity .2s ease;
}
.post-toc .toc-item-wrap.active .toc-progress-bar { opacity: 1; }

/* ============ 上一篇 / 下一篇 ============ */
.post-pager { display: flex; gap: 12px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); }
.pager-item {
  flex: 1; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: all .15s; background: var(--card);
}
.pager-item:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.pager-item.right { text-align: right; }
.pager-item span { font-size: 12px; color: var(--text2); }
.pager-item div { font-size: 14px; margin-top: 4px; color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ 编辑器（写文章） ============ */
.editor-toolbar { align-items: center; }
.editor-toolbar .toolbar-sep { width: 1px; height: 20px; background: var(--border); margin: 0 2px; }
.editor-preview-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text2); cursor: pointer; margin-left: auto; }
.editor-split { display: flex; gap: 12px; }
.editor-split textarea {
  flex: 1; width: 50%; min-height: 480px; resize: vertical;
  font-family: 'SF Mono', 'Cascadia Code', Consolas, monospace; font-size: 13.5px; line-height: 1.6;
}
.editor-preview {
  flex: 1; width: 50%; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; overflow-y: auto; max-height: 70vh; background: var(--card);
}
.editor-preview-inner { line-height: 1.8; }

/* ============ 返回顶部 ============ */
#back-to-top {
  position: fixed; right: 24px; bottom: 24px; width: 42px; height: 42px;
  border-radius: 50%; border: none; background: var(--accent); color: #fff;
  font-size: 18px; cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: all .25s; box-shadow: 0 4px 12px rgba(79,70,229,.35); z-index: 300;
}
#back-to-top.show { opacity: 1; visibility: visible; transform: none; }
#back-to-top:hover { background: var(--accent2); }

/* ============ 响应式 ============ */
@media (max-width: 768px) {
  .editor-split { flex-direction: column; }
  .editor-split textarea, .editor-preview { width: 100%; }
  .post-pager { flex-direction: column; }
  .pager-item.right { text-align: left; }
}

/* ============ 博客模糊搜索 ============ */
.blog-search { position: relative; margin-bottom: 16px; }
.blog-search input {
  width: 100%; padding: 12px 44px 12px 18px; font-size: 15px;
  border: 2px solid var(--border); border-radius: 24px; outline: none;
  background: var(--card); transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.blog-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
.blog-search-clear {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text2); font-size: 15px; cursor: pointer;
  padding: 6px 10px; border-radius: 50%;
}
.blog-search-clear:hover { background: #f3f4f6; color: var(--text); }
mark { background: #fde68a; color: #92400e; padding: 0 2px; border-radius: 3px; }
.post-desc { color: var(--text2); margin-top: 6px; font-size: 14px; line-height: 1.7; }
.post-item-tags { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.mini-tag {
  font-size: 11px; padding: 1px 9px; background: #eef2ff; color: var(--accent);
  border-radius: 10px; cursor: pointer;
}
.mini-tag:hover { background: #e0e7ff; }
.blog-filter-info {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
  font-size: 14px; color: var(--text2);
}
.blog-filter-info b { color: var(--text); }
.blog-clear-link { margin-left: auto; color: var(--accent); cursor: pointer; font-size: 13px; white-space: nowrap; }
.blog-clear-link:hover { text-decoration: underline; }

/* ============ 私密文章标记 ============ */
.lock-badge { font-size: 12px; color: var(--text2); }
.post-item h3 .lock-badge { font-size: 14px; }

/* ============ 标题栏统一深色（主页/其他页一致） ============ */
#navbar.dark .user-menu:hover { background: rgba(255,255,255,0.12); }
#navbar.dark .user-name { color: rgba(255,255,255,0.9); }
#navbar.dark .user-menu:hover .user-name { color: #fff; }
#navbar.dark .user-avatar { background: var(--accent2); }
#navbar.dark .user-dropdown { background: #1f1f33; border-color: #33334d; }
#navbar.dark .user-dropdown a { color: rgba(255,255,255,0.85); }
#navbar.dark .user-dropdown a:hover { background: rgba(255,255,255,0.1); color: #fff; }
#navbar.dark .user-dropdown hr { border-color: #33334d; }

/* ============ 允许谁看（多选 chips） ============ */
.visible-users-picker { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vup-all { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text2); cursor: pointer; margin-right: 2px; user-select: none; }
.vup-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border: 1px solid var(--border); border-radius: 20px; font-size: 13px; cursor: pointer;
  background: var(--card); user-select: none; transition: all .15s;
}
.vup-chip:hover { border-color: var(--accent); }
.vup-chip input { display: none; }
.vup-chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.vup-chip .vup-role { font-size: 10px; background: #e0e7ff; color: var(--accent); padding: 1px 6px; border-radius: 8px; }
.vup-chip.on .vup-role { background: rgba(255,255,255,.25); color: #fff; }
.vup-chip .vup-email { font-size: 11px; color: var(--text2); }
.vup-chip.on .vup-email { color: rgba(255,255,255,.8); }

/* ============ 文件盘（云盘体验） ============ */
.files-stats { font-size: 13px; color: #6b7280; margin-top: 4px; }
.files-stats b { color: #3c80ff; }
.toolbar-sep { width: 1px; height: 20px; background: #e5e7eb; margin: 0 2px; display: inline-block; vertical-align: middle; }
.batch-bar {
  display: flex; align-items: center; gap: 8px; padding: 10px 16px;
  background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 12px;
  margin-bottom: 14px; font-size: 14px; flex-wrap: wrap; box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.batch-bar b { color: #3c80ff; }
.file-row-selected { background: #eff6ff !important; }
.file-table td input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: #3c80ff; }

/* 网格视图 */
.pan-body .file-grid { padding: 16px; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.file-grid-item {
  background: #fff; border: 1px solid #eef0f2; border-radius: 12px;
  overflow: hidden; cursor: pointer; transition: all .18s; box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.file-grid-item:hover { border-color: #bfdbfe; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(16,24,40,.08); }
.file-grid-item.selected { border-color: #3c80ff; box-shadow: 0 0 0 2px rgba(60,128,255,.15); }
.fg-thumb { position: relative; height: 130px; display: flex; align-items: center; justify-content: center; background: #f8fafc; overflow: hidden; }
.fg-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.file-grid-item:hover .fg-thumb img { transform: scale(1.03); }
.fg-thumb-mask {
  position: absolute; inset: auto 0 0; padding: 18px 0 8px; text-align: center;
  font-size: 12px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.35)); opacity: 0; transition: opacity .18s;
}
.file-grid-item:hover .fg-thumb-mask { opacity: 1; }
.fg-icon-only { font-size: 44px; color: #6b7280; }
.fg-info { padding: 12px 14px 6px; }
.fg-name { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #1b1f35; }
.fg-meta { font-size: 12px; color: #bbbdc9; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fg-actions { display: flex; gap: 6px; padding: 10px 14px 14px; flex-wrap: wrap; opacity: .9; transition: opacity .15s; }
.file-grid-item:hover .fg-actions { opacity: 1; }
.fg-actions .btn { font-size: 12px; padding: 3px 10px; border-radius: 6px; }

/* 拖拽上传遮罩 */
#drop-overlay {
  position: fixed; inset: 0; z-index: 999; pointer-events: none;
  display: none; align-items: center; justify-content: center;
  background: rgba(79,70,229,.15); border: 3px dashed var(--accent);
}
#drop-overlay.show { display: flex; }
.drop-inner {
  font-size: 22px; color: var(--accent); background: var(--card);
  padding: 30px 50px; border-radius: 16px; box-shadow: 0 8px 30px rgba(0,0,0,.15);
}

/* 大图 lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 999; background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center; padding: 30px;
}
.lightbox-box { position: relative; max-width: 94vw; max-height: 90vh; text-align: center; }
.lightbox-box img { max-width: 94vw; max-height: 80vh; border-radius: 8px; box-shadow: 0 8px 40px rgba(0,0,0,.5); }
.lightbox-bar { display: flex; justify-content: space-between; align-items: center; color: #fff; padding: 6px 2px; font-size: 14px; }
.lightbox-close { background: none; border: none; color: #fff; font-size: 26px; cursor: pointer; line-height: 1; }
.lightbox-close:hover { color: #f87171; }
.lightbox-actions { margin-top: 10px; }

/* ============ 文章附件（绑定文件） ============ */
.post-attachments {
  margin-top: 28px; padding: 16px; border: 1px solid var(--border);
  border-radius: var(--radius); background: #fafbff;
}
.post-attachments-title { font-size: 14px; font-weight: 600; margin-bottom: 10px; color: var(--text); }
.attachment-list { display: flex; flex-direction: column; gap: 6px; }
.attachment-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none;
  color: var(--text); transition: all .15s; background: var(--card);
}
.attachment-item:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.attachment-icon { font-size: 20px; }
.attachment-name { flex: 1; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-size { font-size: 12px; color: var(--text2); }

/* 编辑页绑定文件选择器 */
.files-picker { max-height: 240px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; }
.fp-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: var(--radius); transition: background .15s;
}
.fp-item:hover { background: #f3f4f6; }
.fp-item.bound { background: #eef2ff; }
.fp-icon { font-size: 18px; }
.fp-name { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-size { font-size: 12px; color: var(--text2); }
.fp-btn { white-space: nowrap; }

/* ============ 允许谁看：搜索式选择器 ============ */
.vup-selected { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.vup-tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  background: var(--accent); color: #fff; border-radius: 16px; font-size: 13px;
}
.vup-tag-x { cursor: pointer; font-size: 15px; line-height: 1; opacity: .8; }
.vup-tag-x:hover { opacity: 1; }
.vup-search { position: relative; }
.vup-search input {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; outline: none; background: var(--card);
}
.vup-search input:focus { border-color: var(--accent); }
.vup-search-results {
  margin-top: 6px; max-height: 200px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--card);
}
.vup-search-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px; cursor: pointer;
  font-size: 13.5px; border-bottom: 1px solid var(--border); transition: background .1s;
}
.vup-search-item:last-child { border-bottom: none; }
.vup-search-item:hover { background: #f3f4f6; }
.vup-search-item.on { background: #eef2ff; }
.vup-s-icon { width: 16px; text-align: center; color: var(--accent); }
.vup-s-name { font-weight: 500; }
.vup-s-email { margin-left: auto; font-size: 12px; color: var(--text2); }

/* ============ 所见即所得编辑器 ============ */
.wysiwyg {
  min-height: 420px; max-height: 70vh; overflow-y: auto;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; background: var(--card);
  font-size: 15px; line-height: 1.8; outline: none;
  transition: border-color .15s;
}
.wysiwyg:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.wysiwyg:empty::before { content: attr(data-placeholder); color: #9ca3af; }
.wysiwyg h1, .wysiwyg h2, .wysiwyg h3, .wysiwyg h4 {
  margin: 1em 0 .5em; line-height: 1.4; font-weight: 700;
}
.wysiwyg h1 { font-size: 1.6em; border-bottom: 1px solid var(--border); padding-bottom: .3em; }
.wysiwyg h2 { font-size: 1.4em; border-bottom: 1px solid var(--border); padding-bottom: .3em; }
.wysiwyg h3 { font-size: 1.2em; }
.wysiwyg p { margin: .6em 0; }
.wysiwyg ul, .wysiwyg ol { margin: .6em 0; padding-left: 1.8em; }
.wysiwyg blockquote {
  margin: .8em 0; padding: .5em 1em; border-left: 4px solid var(--accent);
  background: #eef2ff; color: #4b5563; border-radius: 0 var(--radius) var(--radius) 0;
}
.wysiwyg pre {
  background: #1e1e2e; color: #cdd6f4; padding: 14px; border-radius: var(--radius);
  overflow-x: auto; font-size: 13px; margin: .8em 0;
}
.wysiwyg pre code { background: none; padding: 0; color: inherit; }
.wysiwyg code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-size: 13px; font-family: 'SF Mono', Consolas, monospace; }
.wysiwyg a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.wysiwyg img { max-width: 100%; border-radius: var(--radius); }
.wysiwyg table { border-collapse: collapse; margin: .8em 0; }
.wysiwyg th, .wysiwyg td { border: 1px solid var(--border); padding: 6px 12px; font-size: 14px; }
.wysiwyg th { background: #f9fafb; font-weight: 600; }

/* ============ 右键菜单 ============ */
.ctx-menu {
  position: fixed; z-index: 2000; min-width: 170px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,.16); padding: 6px; user-select: none;
}
.ctx-item {
  display: flex; align-items: center; padding: 7px 12px; border-radius: 6px;
  font-size: 13.5px; cursor: pointer; color: var(--text);
}
.ctx-item:hover { background: var(--accent); color: #fff; }
.ctx-label { flex: 1; }
.ctx-sep { height: 1px; background: var(--border); margin: 5px 8px; }

/* ============ 围棋 ============ */
.go-page h2 { margin-bottom: 4px; }
.go-header {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px; margin-bottom: 16px;
}
.go-subtitle { font-size: 13px; color: var(--text2); margin-bottom: 4px; }
.go-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 10px 12px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.go-toolbar select {
  padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 13px; background: var(--card); color: var(--text); outline: none;
}
.go-toolbar select:focus { border-color: var(--accent); }
.go-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px;
  align-items: start;
}
.go-board-panel { min-width: 0; }
.go-board-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px; box-shadow: var(--shadow);
}
.go-side { display: flex; flex-direction: column; gap: 16px; }
.go-status-card { margin-bottom: 0; }
.go-card-title {
  font-size: 14px; font-weight: 600; color: var(--text);
  padding-bottom: 10px; margin-bottom: 12px; border-bottom: 1px solid var(--border);
}
.go-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.go-actions .btn { justify-content: center; }

.go-turn {
  display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600;
  margin-bottom: 12px;
}
.go-dot { width: 18px; height: 18px; border-radius: 50%; display: inline-block; }
.go-dot-black { background: #111; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #999; }
.go-dot-white { background: #fff; box-shadow: 0 0 0 2px #eee, 0 0 0 3px #999; }
.go-meta { display: flex; gap: 16px; font-size: 13px; color: var(--text2); margin-bottom: 6px; }
.go-result { font-size: 20px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.go-score { font-size: 14px; color: var(--text2); margin-bottom: 8px; }
.go-hint-coord {
  margin-top: 10px; padding: 8px 12px; background: #fef3c7; color: #92400e;
  border-radius: var(--radius); font-size: 14px; font-weight: 600;
}
.go-winrate {
  margin-top: 10px; padding: 8px 12px; background: #eef2ff; color: var(--accent);
  border-radius: var(--radius); font-size: 14px; font-weight: 600;
}
.go-winrate-bar { margin-top: 8px; height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; }
.go-winrate-bar-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width .3s ease; }
.go-winrate-chart { margin-top: 8px; background: #f8fafc; border: 1px solid var(--border); border-radius: 8px; padding: 4px; }
.go-history-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 8px; max-height: 220px; overflow-y: auto; font-size: 12px; color: var(--text2); }
.go-history-move { white-space: nowrap; }
.go-history-move b { color: var(--text); font-weight: 600; }
.go-history-empty { color: var(--text2); font-size: 13px; text-align: center; padding: 12px 0; }



@media (max-width: 820px) {
  .go-layout { grid-template-columns: 1fr; }
  .go-actions { grid-template-columns: repeat(2, 1fr); }
}

/* ============ 默认暗黑主题 ============ */
:root[data-theme="dark"] {
  --bg: #0b0f17;
  --card: #141a24;
  --text: #e5e7eb;
  --text2: #9ca3af;
  --accent: #6d8dff;
  --accent2: #8aa5ff;
  --border: #252d3a;
  --shadow: 0 1px 3px rgba(0,0,0,.4);
  color-scheme: dark;
}
[data-theme="dark"] body { background: var(--bg); color: var(--text); }
[data-theme="dark"] .card,
[data-theme="dark"] .pan-card,
[data-theme="dark"] .be-card,
[data-theme="dark"] .file-grid-item,
[data-theme="dark"] .modal,
[data-theme="dark"] .tool-card,
[data-theme="dark"] .post-item,
[data-theme="dark"] .be-post,
[data-theme="dark"] .go-board-card,
[data-theme="dark"] .file-preview-panel,
[data-theme="dark"] .code-block { background: var(--card); color: var(--text); }
[data-theme="dark"] .be-card { border-color: var(--border); }
[data-theme="dark"] .be-card:hover { background: #1b2230; }
[data-theme="dark"] .be-header h2,
[data-theme="dark"] .be-title,
[data-theme="dark"] .be-post-header h1,
[data-theme="dark"] .file-name-text,
[data-theme="dark"] .fg-name { color: #e5e7eb; }
[data-theme="dark"] .be-subtitle,
[data-theme="dark"] .be-desc,
[data-theme="dark"] .be-post-meta,
[data-theme="dark"] .be-date,
[data-theme="dark"] .be-read,
[data-theme="dark"] .file-cell-meta,
[data-theme="dark"] .fg-meta { color: #9ca3af; }
[data-theme="dark"] .be-tag,
[data-theme="dark"] .be-toc .post-toc a,
[data-theme="dark"] .be-toc .post-toc a.is-read { color: #9ca3af; background: transparent; }
[data-theme="dark"] .be-tag:hover,
[data-theme="dark"] .be-toc .post-toc a.active { background: #1b2230; color: #6d8dff; }
[data-theme="dark"] .be-toc .toc-progress-bar { background: #252d3a; }
[data-theme="dark"] .be-post-content code { background: #1b2230; border-color: #2a3442; color: #aac8e4; }
[data-theme="dark"] .be-post-content pre { background: #0d1117; }
[data-theme="dark"] .be-post-content blockquote { background: #141a24; }
[data-theme="dark"] .post-content code { background: #1b2230; color: #aac8e4; }
[data-theme="dark"] .post-content pre { background: #0d1117; }
[data-theme="dark"] .file-table th { background: #141a24; color: #9ca3af; }
[data-theme="dark"] .file-table td { border-color: #252d3a; }
[data-theme="dark"] .file-table tbody tr:hover td { background: #1b2230; }
[data-theme="dark"] .fg-thumb { background: #10151d; }
[data-theme="dark"] .fg-icon-only { color: #9ca3af; }
[data-theme="dark"] .pan-sidebar { background: linear-gradient(180deg, #10151d, #141a24); }
[data-theme="dark"] .pan-sidebar-item:hover { background: #1b2230; color: #e5e7eb; }
[data-theme="dark"] .pan-sidebar-item.active { background: #1b2230; color: #6d8dff; }
[data-theme="dark"] .pan-search input,
[data-theme="dark"] .pan-select,
[data-theme="dark"] .blog-search input { background: #141a24; border-color: #252d3a; color: #e5e7eb; }
[data-theme="dark"] .go-winrate-chart { background: #10151d; border-color: #252d3a; }
[data-theme="dark"] .go-winrate-bar { background: #252d3a; }
[data-theme="dark"] .modal-overlay { background: rgba(0,0,0,.6); }

/* 暗黑主题文字对比度补强 */
[data-theme="dark"] .post-content,
[data-theme="dark"] .post-content p,
[data-theme="dark"] .post-content li,
[data-theme="dark"] .post-content h1,
[data-theme="dark"] .post-content h2,
[data-theme="dark"] .post-content h3,
[data-theme="dark"] .post-content h4,
[data-theme="dark"] .be-post-content,
[data-theme="dark"] .be-post-content p,
[data-theme="dark"] .be-post-content li,
[data-theme="dark"] .be-post-content h1,
[data-theme="dark"] .be-post-content h2,
[data-theme="dark"] .be-post-content h3,
[data-theme="dark"] .be-post-content h4 { color: #d1d5db; }
[data-theme="dark"] .post-content a,
[data-theme="dark"] .be-post-content a { color: #8ab4ff; }
[data-theme="dark"] .blog-header h2,
[data-theme="dark"] .blog-filter-info,
[data-theme="dark"] .pagination button,
[data-theme="dark"] .go-meta,
[data-theme="dark"] .go-turn,
[data-theme="dark"] .go-card-title,
[data-theme="dark"] .go-tip,
[data-theme="dark"] .go-history-move,
[data-theme="dark"] .file-name-cell,
[data-theme="dark"] .file-name-text,
[data-theme="dark"] .fg-name { color: #e5e7eb; }
[data-theme="dark"] .file-actions .btn,
[data-theme="dark"] .file-actions .btn-icon,
[data-theme="dark"] .fg-actions .btn-icon { color: #9ca3af; }
[data-theme="dark"] .file-actions .btn:hover,
[data-theme="dark"] .file-actions .btn-icon:hover,
[data-theme="dark"] .fg-actions .btn-icon:hover { color: #fff; background: #252d3a; }
[data-theme="dark"] .go-winrate { background: #1b2230; color: #8ab4ff; }
[data-theme="dark"] .go-hint-coord { background: #3a2f14; color: #fde68a; }
[data-theme="dark"] .go-history-grid { color: #9ca3af; }

/* ============ 围棋职业风格胜率 ============ */
.go-winrate { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; font-weight: 700; margin-top: 10px; }
.go-wr-black { color: #111; }
.go-wr-white { color: #555; }
.go-wr-sep { color: var(--text2); font-weight: 400; }
.go-winrate-bar2 { display: flex; height: 12px; border-radius: 6px; overflow: hidden; margin: 6px 0 4px; background: #ddd; }
.go-bw-black { background: #111; transition: width .5s; }
.go-bw-white { background: #eee; border-left: 1px solid #999; transition: width .5s; }
.go-lead { text-align: center; font-size: 13px; color: var(--accent); font-weight: 600; margin: 4px 0; }
.go-chart-legend { display: flex; gap: 12px; font-size: 11px; color: var(--text2); margin-bottom: 4px; }
.gl-black::before { content: '─ '; color: #111; font-weight: 700; }
.gl-lead::before { content: '─ '; color: #e67e22; font-weight: 700; }
.go-territory { text-align: center; font-size: 13px; color: var(--text2); margin-top: 6px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: 6px; }
.go-territory b { color: var(--accent); }

/* ============ 透明悬浮导航（首页/文件页）：空白区域可穿透点击（不挡下方内容），外观保持原样 ============ */
#navbar.dark { pointer-events: none; }
#navbar.dark .nav-inner { pointer-events: none; }
#navbar.dark .brand,
#navbar.dark .nav-item,
#navbar.dark .user-menu,
#navbar.dark .btn-outline.btn-sm {
  pointer-events: auto;
}
