/* ── 重置 ─────────────────────────────── */
:root { --glass-blur: 20px; --text-color: #e0e0e0; }
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow-y: auto;
}
body {
  min-height: 100%;
  height: auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  background: #1a1a2e;
  color: var(--text-color, #e0e0e0);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ── 玻璃卡片（独立页面复用） ──────────── */
.glass-card, .profile-card, .player-card, .post-card, .av-card, .auth-card {
  background: rgba(255,255,255,var(--glass-a,0.12));
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ═══════════════════════════════════════
   加载遮罩（首次访问）
   ═══════════════════════════════════════ */
.loader-overlay {
  position: fixed;
  inset: 0;
  background: #1a1a2e;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}

.loader-overlay.hide {
  opacity: 0;
  pointer-events: none;
}

.loader-box {
  text-align: center;
}

.loader-avatar {
  width: 100px;
  height: 100px;
  margin: 0 auto 16px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255,255,255,0.15);
}

.loader-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.loader-name {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-color);
  margin-bottom: 8px;
}

.loader-desc {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-color); opacity: 0.45;
  margin-bottom: 24px;
}

.loader-bar-track {
  width: 260px;
  height: 4px;
  margin: 0 auto;
  background: rgba(255,255,255,0.10);
  border-radius: 2px;
  overflow: hidden;
}

.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: #a855f7;
  border-radius: 2px;
  transition: width 0.3s linear;
}

/* ── 顶栏 ─────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  padding: 0 16px;
  z-index: 100;
}

/* ── 毛玻璃游客调节按钮 ───────────────── */
.glass-tune-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  color: var(--text-color);
  font-size: 18px;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  margin-left: auto;
  flex-shrink: 0;
  transition: background 0.2s;
}
.glass-tune-btn:hover { background: rgba(255,255,255,0.16); }

/* ── 调节面板 ──────────────────────────── */
.glass-panel {
  position: fixed;
  top: 56px; right: 8px;
  background: rgba(25,25,40,0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 10px;
  z-index: 200;
  min-width: 160px;
  max-width: 220px;
  display: none;
  color: var(--text-color);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.glass-panel.show { display: block; }
.glass-panel label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 4px;
  color: var(--text-color); opacity: 0.6;
}
.glass-panel input[type="range"] {
  width: 100%;
  margin: 2px 0 8px;
  height: 4px;
  accent-color: #818cf8;
}
.glass-panel button {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-color); opacity: 0.85;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  margin-right: 4px;
  transition: background 0.2s;
}
.glass-panel button:hover { background: rgba(255,255,255,0.16); }

.menu-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 8px;
  transition: background 0.2s;
  flex-shrink: 0;
}

.menu-btn:hover { background: rgba(255, 255, 255, 0.16); }

.menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: 0.3s;
}

.menu-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-btn.open span:nth-child(2) {
  opacity: 0;
}
.menu-btn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.topbar-title {
  font-size: 18px;
  font-weight: 600;
  margin-left: 12px;
  letter-spacing: 0.5px;
  color: var(--text-color);
  flex: 1;
  overflow: hidden;
}

.marquee-wrap {
  display: block;
  overflow: hidden;
  white-space: nowrap;
}

.marquee-text {
  display: inline-block;
  animation: marquee 12s linear infinite;
  padding-left: 100%;
}

@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ── 遮罩 ─────────────────────────────── */
.overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* ═══════════════════════════════════════
   侧边导航 — 毛玻璃
   ═══════════════════════════════════════ */
.sidebar {
  position: fixed;
  top: 56px; left: 0;
  width: 240px;
  height: calc(100% - 56px);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 95;
  transform: translateX(-100%);
  transition: transform 0.35s ease;
  display: flex;
  flex-direction: column;
}

.sidebar.open { transform: translateX(0); }

.sidebar-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.nav-list { padding: 16px 0; flex-shrink: 0; }

.nav-item {
  display: block;
  padding: 14px 28px;
  font-size: 16px;
  color: var(--text-color); opacity: 0.65;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-color);
}

.nav-item.active {
  color: var(--text-color);
  background: rgba(255, 255, 255, 0.12);
  font-weight: 600;
}

/* ── 更多页面提示 ────────────────────── */
.sidebar-more {
  padding: 8px 28px 16px;
  font-size: 12px;
  color: var(--text-color); opacity: 0.25;
  flex-shrink: 0;
}

/* ── 侧边栏底部用户卡片 ──────────────── */
.sidebar-user {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px 16px;
  flex-shrink: 0;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-color);
  padding: 6px;
  border-radius: 10px;
  transition: background 0.2s;
}

.user-card:hover { background: rgba(255,255,255,0.06); }

.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.user-avatar img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

.user-info { flex: 1; min-width: 0; }

.user-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-hint {
  font-size: 11px;
  color: var(--text-color); opacity: 0.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ═══════════════════════════════════════
   主页 — 全屏模糊背景（固定留空 + 可滚动）
   ═══════════════════════════════════════ */

/* 背景层固定全屏 */
.hero-slides {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100vh;
  z-index: -1;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.2s ease;
}

/* hero-slide opacity controlled by JS slideshow */

.hero-blur {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100vh;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(var(--bg-blur, 9px));
  -webkit-backdrop-filter: blur(var(--bg-blur, 9px));
  transition: backdrop-filter 0.3s ease;
  z-index: 0;
  pointer-events: none;
}

.hero-blur.high-blur {
  backdrop-filter: blur(21px);
  -webkit-backdrop-filter: blur(21px);
}

/* 子页面：固定 hero 的后继兄弟必须高于 hero（否则内容被覆盖） */
.hero + * {
  position: relative;
  z-index: 1;
}

/* 内容容器 */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: visible;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 68px 24px 32px;   /* 56px 顶栏 + 12px 留白 */
  gap: 16px;
}

/* ═══════════════════════════════════════
   二级 UI — 白色毛玻璃卡片
   ═══════════════════════════════════════ */
.profile-card {
  display: block;
  width: 100%;
  max-width: 380px;
  min-height: 200px;
  background: rgba(255, 255, 255, var(--glass-alpha, 0.15));
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  padding: 20px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
  color: var(--text-color);
}

.profile-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.30);
}

.profile-inner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.profile-avatar {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-info { flex: 1; min-width: 0; padding-top: 4px; }

.profile-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-color);
}

.profile-bio {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-color); opacity: 0.55;
  line-height: 1.5;
}

.profile-footer {
  margin-top: 12px;
  min-height: 50px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding-top: 12px;
}

/* ── 纯白毛玻璃按钮 ──────────────────── */
.s-btn {
  display: inline-block;
  padding: 5px 14px;
  background: rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-color);
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
}

.s-btn:hover {
  background: rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════
   帖子 & 联系我 — 普通面板
   ═══════════════════════════════════════ */
.content {
  margin-top: 0;
  padding-bottom: 80px;
}

.panel { display: none; }

.panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

#panel-posts, #panel-contact {
  max-width: 800px;
  margin: 56px auto 0;
  padding: 24px;
}

#panel-posts h2, #panel-contact h2 {
  font-size: 26px; font-weight: 700; margin-bottom: 16px;
}

#panel-posts p, #panel-contact p {
  font-size: 16px; line-height: 1.7; color: var(--text-color); opacity: 0.75;
}

/* ═══════════════════════════════════════
   /about 页面
   ═══════════════════════════════════════ */
.about-page {
  max-width: 800px;
  margin: 56px auto 0;
  padding: 24px;
}

.about-page h2 {
  font-size: 26px; font-weight: 700; margin-bottom: 16px;
}

.about-page p {
  font-size: 16px; line-height: 1.7; color: var(--text-color); opacity: 0.75;
}

/* ═══════════════════════════════════════
   /wechat 页面
   ═══════════════════════════════════════ */
.wechat-page {
  max-width: 500px;
  margin: 56px auto 0;
  padding: 24px;
  text-align: center;
}

.wechat-tip {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-color); opacity: 0.70;
  margin-bottom: 32px;
}

.wechat-qr {
  width: 220px;
  height: 220px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 12px;
}

.wechat-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ═══════════════════════════════════════
   播放器卡片（同毛玻璃风格）
   ═══════════════════════════════════════ */
.player-card {
  width: 100%;
  max-width: 380px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  padding: 16px;
  color: var(--text-color);
}

.player-inner {
  display: flex;
  align-items: center;
  gap: 14px;
}

.player-cover {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.20);
  transition: transform 0.05s linear;
}

.player-cover img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

.player-cover.spin {
  animation: coverSpin 6s linear infinite;
}

@keyframes coverSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.player-info { flex: 1; min-width: 0; }

.player-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-lyrics {
  min-height: 32px;
}

.lyric-line {
  font-size: 12px;
  line-height: 1.5;
  transition: color 0.3s;
}

.lyric-line.current {
  color: var(--text-color); opacity: 0.90;
}

.lyric-line.next {
  color: var(--text-color); opacity: 0.35;
}

/* ── 进度条（恢复 input[type=range] 美化）── */
.player-progress {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.prog-label {
  font-size: 11px;
  color: var(--text-color); opacity: 0.45;
  flex-shrink: 0;
  min-width: 32px;
}

.prog-label:first-child { text-align: left; }
.prog-label:last-child  { text-align: right; }

.prog-range {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255,255,255,0.12);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  touch-action: pan-y pinch-zoom;
  -webkit-tap-highlight-color: transparent;
  margin: 8px 0;
}
.prog-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #a855f7;
  cursor: pointer;
  border: none;
}
.prog-range::-moz-range-thumb {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #a855f7;
  cursor: pointer;
  border: none;
}
.prog-range::-moz-range-track {
  background: transparent;
  border: none;
}

/* ── 控制按钮 ──────────────────── */
.player-ctrl {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pc-btn {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.2s;
  line-height: 1;
}

.pc-btn:hover { background: rgba(255, 255, 255, 0.12); }

.pc-play {
  font-size: 20px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.10);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pc-play:hover { background: rgba(255, 255, 255, 0.22); }

/* ═══════════════════════════════════════
   登录 / 后台页面
   ═══════════════════════════════════════ */
.auth-page {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-card {
  max-width: 380px;
  width: 100%;
  padding: 32px 28px;
  text-align: center;
}

.auth-card h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
}

.auth-field {
  width: 100%;
  margin-bottom: 14px;
  text-align: left;
}

.auth-field label {
  display: block;
  font-size: 13px;
  color: var(--text-color); opacity: 0.55;
  margin-bottom: 4px;
}

.auth-field input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: var(--text-color);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s;
}

.auth-field input:focus {
  border-color: var(--text-color); opacity: 0.30;
}

.auth-btn {
  width: 100%;
  padding: 10px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px;
  color: var(--text-color);
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 6px;
}

.auth-btn:hover { background: rgba(255,255,255,0.22); }

.auth-err {
  color: #f87171;
  font-size: 13px;
  margin-top: 10px;
  min-height: 20px;
}

/* ── 最新帖子小卡片 ──────────────────── */
.latest-section { width:100%; max-width:380px; }
.post-card{display:block;margin-bottom:20px;overflow:hidden;cursor:pointer;transition:transform 0.25s,box-shadow 0.25s;}
.post-card:hover{transform:translateY(-3px);box-shadow:0 12px 40px rgba(0,0,0,0.20);}
.post-img{width:100%;height:180px;overflow:hidden;background:rgba(255,255,255,0.04);}
.latest-section .post-img{height:90px;}
.post-img img{width:100%;height:100%;object-fit:cover;display:block;}
.post-img .placeholder{display:flex;align-items:center;justify-content:center;height:100%;font-size:32px;color: var(--text-color); opacity: 0.12;}
.post-body{padding:16px 18px 18px;}
.post-body h3{font-size:17px;font-weight:600;margin-bottom:4px;}
.post-body .preview{font-size:13px;color: var(--text-color); opacity: 0.5;line-height:1.6;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.post-body .meta{font-size:11px;color: var(--text-color); opacity: 0.25;margin-top:6px;}

/* 文字颜色全局覆盖（确保所有页面所有元素跟随 --text-color） */
body, body * { color: var(--text-color) !important; }
/* auth-err 错误红色必须保留 */
.auth-err { color: #f87171 !important; }
/* 背景图、icon 等非文字元素恢复默认白色 */
.bg-item, .hero-slide, .bg-item *, .bg-menu *, .menu-btn span, .prog-range, .prog-range::-webkit-slider-thumb { color: #ffffff !important; }
/* 表单 placeholder 不动 */
::placeholder, input::placeholder, textarea::placeholder { color: rgba(255,255,255,0.35) !important; }
/* input/select/button 的自带颜色保留（不强制覆盖） */
input, textarea, select, button { color: inherit !important; }
input[type="range"] { color: #ffffff !important; }

.hero-spacer { flex: 1; }
/* 隐藏 B站嵌入中的编辑/删除按钮（前台不显示） */
.bilibili-wrap .bili-admin { display: none !important; }

/* 隐藏已关闭的 B站嵌入（前台不显示） */
.bilibili-wrap[data-bili-disabled="1"] { display: none !important; }
/* 管理员/预览中显示已关闭的嵌入 */
.admin-content .bilibili-wrap[data-bili-disabled="1"],
.preview-body .bilibili-wrap[data-bili-disabled="1"] { display: block !important; }

/* #inMask is created by app.js init2() with inline styles */
