/*
 * Author: 景昇
 * Email: uninto@icloud.com
 * Website: https://uninto.com/
 * GItHub: https://github.com/uninto/homePage
 * 请勿删除，感谢
*/

/* ========== 主题变量 - 液态玻璃 ========== */
:root {
  /* 背景 - 莫兰迪素雅 */
  --bg-grad: linear-gradient(135deg, #e8ecf1 0%, #dfe5ec 50%, #e9ecf0 100%);
  --bg-blob-1: radial-gradient(circle at 20% 30%, rgba(148, 163, 184, 0.15), transparent 50%);
  --bg-blob-2: radial-gradient(circle at 80% 70%, rgba(203, 213, 225, 0.12), transparent 50%);

  /* 玻璃质感 */
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-bg-hover: rgba(255, 255, 255, 0.68);
  --glass-blur: 28px;
  --glass-saturate: 180%;
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  --glass-shadow: 0 8px 32px rgba(15, 23, 42, 0.06), 0 2px 8px rgba(15, 23, 42, 0.03);
  --glass-shadow-strong: 0 16px 48px rgba(15, 23, 42, 0.1), 0 4px 16px rgba(15, 23, 42, 0.04);

  /* 文字 - 素雅灰系 */
  --text: #1a202c;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;

  /* 强调 - 不用鲜艳色，用深灰 */
  --accent: #475569;
  --accent-bg: rgba(71, 85, 105, 0.1);
  --accent-text: #334155;

  /* 卡片内部 */
  --card-inner: rgba(255, 255, 255, 0.42);
  --card-border: rgba(255, 255, 255, 0.5);

  /* 状态 */
  --success: #10b981;
  --danger: #ef4444;

  /* 图标 */
  --icon-filter: invert(35%) sepia(8%) saturate(400%) hue-rotate(180deg);

  /* 滚动条 */
  --scrollbar-thumb: rgba(100, 116, 139, 0.3);

  /* 侧边栏宽度 */
  --sidebar-width: 240px;
}

[theme='dark'] {
  --bg-grad: linear-gradient(135deg, #0c0f14 0%, #11151c 50%, #161b24 100%);
  --bg-blob-1: radial-gradient(circle at 20% 30%, rgba(71, 85, 105, 0.2), transparent 50%);
  --bg-blob-2: radial-gradient(circle at 80% 70%, rgba(100, 116, 139, 0.12), transparent 50%);

  --glass-bg: rgba(22, 27, 34, 0.55);
  --glass-bg-hover: rgba(22, 27, 34, 0.7);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
  --glass-shadow-strong: 0 16px 48px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.25);

  --text: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent: #cbd5e1;
  --accent-bg: rgba(203, 213, 225, 0.1);
  --accent-text: #e2e8f0;

  --card-inner: rgba(255, 255, 255, 0.045);
  --card-border: rgba(255, 255, 255, 0.07);

  --icon-filter: invert(85%) sepia(8%) saturate(300%) hue-rotate(180deg);

  --scrollbar-thumb: rgba(148, 163, 184, 0.3);
}

/* ========== 基础重置 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'GenSenRounded', -apple-system, BlinkMacSystemFont, 'PingFang SC',
    'Microsoft YaHei', 'Segoe UI', sans-serif;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}

*::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.25s ease, opacity 0.2s ease;
}

li {
  list-style: none;
}

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
  background: var(--bg-grad);
  position: relative;
  overflow-x: hidden;
  transition: background 0.6s ease, color 0.6s ease;
}

body::before,
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

body::before {
  background: var(--bg-blob-1);
}

body::after {
  background: var(--bg-blob-2);
}

body > * {
  position: relative;
  z-index: 1;
}

/* ========== 左侧固定竖版侧边导航 ========== */
nav {
  width: var(--sidebar-width);
  padding: 24px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  position: fixed;
  left: 12px;
  top: 12px;
  bottom: 12px;
  z-index: 50;
  flex-shrink: 0;
  border-radius: 22px;
  overflow: hidden;
}

/* 侧边栏 LOGO / 标题 */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 20px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--card-border);
}

.nav-logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

nav a {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 12px 18px;
  border-radius: 14px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
}

nav a:hover {
  color: var(--text);
  background: var(--card-inner);
}

nav a.active {
  color: var(--text);
  background: var(--card-inner);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  font-weight: 600;
}

[theme='dark'] nav a.active {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* 导航底部工具按钮 */
.nav-tools {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--card-border);
}

.nav-tool-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.25s ease;
  background: transparent;
  border: none;
  font-family: inherit;
  text-align: left;
  width: 100%;
}

.nav-tool-item:hover {
  background: var(--card-inner);
  color: var(--text);
}

.nav-tool-item img,
.nav-tool-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-tool-item img {
  filter: var(--icon-filter);
}

/* 搜索按钮（合并到工具栏） */
.nav-search-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.25s ease;
  background: transparent;
  border: none;
  font-family: inherit;
  text-align: left;
  width: 100%;
}

.nav-search-btn:hover {
  background: var(--card-inner);
  color: var(--text);
}

.nav-search-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

nav img {
  width: 20px;
  height: 20px;
  filter: var(--icon-filter);
  cursor: pointer;
  padding: 0;
  border-radius: 0;
  transition: all 0.25s ease;
  flex-shrink: 0;
  box-sizing: content-box;
}

nav img:hover {
  background: transparent;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 51;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--text);
  box-shadow: var(--glass-shadow);
}

.mobile-menu-btn svg {
  width: 22px;
  height: 22px;
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 49;
}

.mobile-menu-overlay.show {
  display: block;
}

/* ========== 聊天页面 ========== */
.chat-container {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  color: var(--text-secondary, #94a3b8);
  gap: 16px;
}

.chat-empty svg {
  width: 72px;
  height: 72px;
  opacity: 0.4;
}

.chat-empty p {
  font-size: 16px;
}

.chat-login-btn {
  padding: 10px 24px;
  background: var(--accent, #475569);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.chat-login-btn:hover {
  background: var(--accent-hover, #334155);
}

.chat-main {
  display: flex;
  height: calc(100vh - 200px);
  min-height: 500px;
  background: var(--surface, #fff);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--glass-border, rgba(0,0,0,0.06));
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.chat-sidebar {
  width: 280px;
  border-right: 1px solid var(--glass-border, rgba(0,0,0,0.06));
  display: flex;
  flex-direction: column;
  background: var(--surface-2, #f8fafc);
  flex-shrink: 0;
}

.chat-sidebar-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--glass-border, rgba(0,0,0,0.06));
}

.chat-sidebar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text, #0f172a);
}

.chat-user-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.chat-user-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 2px;
}

.chat-user-item:hover {
  background: var(--glass-bg-strong, rgba(15, 23, 42, 0.05));
}

.chat-user-item.active {
  background: var(--accent-bg, rgba(71, 85, 105, 0.1));
}

.chat-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  flex-shrink: 0;
}

.chat-user-info {
  flex: 1;
  min-width: 0;
}

.chat-user-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text, #0f172a);
}

.chat-user-status {
  font-size: 12px;
  color: var(--text-secondary, #94a3b8);
  margin-top: 2px;
}

.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chat-area-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--glass-border, rgba(0,0,0,0.06));
  font-weight: 600;
  font-size: 15px;
  color: var(--text, #0f172a);
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-msg {
  display: flex;
  gap: 10px;
  max-width: 75%;
}

.chat-msg.mine {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-msg-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}

.chat-msg.mine .chat-msg-avatar {
  background: linear-gradient(135deg, #10b981, #059669);
}

.chat-msg-bubble {
  padding: 10px 14px;
  background: var(--surface-2, #f1f5f9);
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text, #0f172a);
  word-break: break-word;
}

.chat-msg.mine .chat-msg-bubble {
  background: var(--accent, #475569);
  color: #fff;
}

.chat-msg-time {
  font-size: 11px;
  color: var(--text-muted, #cbd5e1);
  margin-top: 4px;
  text-align: center;
}

.chat-input-area {
  display: flex;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--glass-border, rgba(0,0,0,0.06));
  background: var(--surface, #fff);
}

.chat-input-area input {
  flex: 1;
  padding: 11px 16px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 14px;
  font-size: 14px;
  outline: none;
  background: var(--surface-2, #f8fafc);
  color: var(--text, #0f172a);
  transition: all 0.2s;
}

.chat-input-area input:focus {
  border-color: var(--accent, #475569);
  background: var(--surface, #fff);
}

.chat-input-area button {
  padding: 11px 22px;
  background: var(--accent, #475569);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.chat-input-area button:hover {
  background: var(--accent-hover, #334155);
}

@media (max-width: 768px) {
  .chat-main {
    flex-direction: column;
    height: calc(100vh - 220px);
    min-height: 0;
  }
  .chat-sidebar {
    width: 100%;
    max-height: 180px;
    border-right: none;
    border-bottom: 1px solid var(--glass-border, rgba(0,0,0,0.06));
  }
  .chat-user-list {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 10px;
  }
  .chat-user-item {
    flex-shrink: 0;
    flex-direction: column;
    width: 72px;
    gap: 6px;
    padding: 8px 6px;
  }
  .chat-user-info {
    text-align: center;
  }
  .chat-user-name {
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .chat-user-status {
    display: none;
  }
}

/* ========== 底部 Tabbar（手机端苹果风格） ========== */
.tabbar {
  display: none;
}

/* ========== 用户登录/注册弹窗 ========== */
.nav-user-area {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--glass-border);
}

.nav-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.nav-user-info:hover {
  background: var(--glass-bg-strong);
}

.nav-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--accent-text);
  flex-shrink: 0;
}

.nav-user-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-user-logout {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}

.nav-user-logout:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.auth-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.auth-overlay.show {
  display: flex;
}

.auth-modal {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border-radius: 24px;
  padding: 32px 28px 28px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  animation: authPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes authPop {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--text-muted);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.auth-close:hover {
  background: var(--surface-2);
  color: var(--text);
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  background: var(--surface-2);
  padding: 4px;
  border-radius: 14px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  background: none;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s;
}

.auth-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.auth-form {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.auth-form.active {
  display: flex;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.auth-field input {
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  background: var(--surface-2);
  color: var(--text);
  transition: all 0.2s;
  outline: none;
}

.auth-field input:focus {
  border-color: var(--accent);
  background: var(--surface);
}

.auth-submit {
  padding: 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  margin-top: 4px;
}

.auth-submit:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.auth-submit:active {
  transform: translateY(0);
}

/* ========== 主体内容区域 ========== */
main {
  margin-left: calc(var(--sidebar-width) + 28px);
  flex: 1;
  width: calc(100vw - var(--sidebar-width) - 28px);
  min-height: 100vh;
  padding: 32px 32px 32px 12px;
  overflow-y: auto;
  position: relative;
}

section {
  display: none;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  animation: sectionFadeIn 0.3s ease;
}

section.active {
  display: block;
}

@keyframes sectionFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* section 标题 */
.section-title {
  width: 100%;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
  padding: 0;
}

/* ========== 首页 ========== */
#home {
  width: 100%;
}

.home-hero {
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: var(--glass-shadow-strong), var(--glass-highlight);
  overflow: hidden;
  margin-bottom: 24px;
}

#bg {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

.hero-content {
  padding: 0 40px 40px;
  display: flex;
  gap: 32px;
  align-items: flex-start;
  position: relative;
}

.avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  margin-top: -70px;
  border: 6px solid var(--glass-bg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  background: var(--card-inner);
  object-fit: cover;
}

.avatar:hover {
  transform: scale(1.05);
}

.info {
  flex: 1;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text);
}

.info h2 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
}

.info h4 {
  font-size: 18px;
  font-weight: 400;
  color: var(--text-secondary);
}

#link {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

#link a {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--card-inner);
  border: 1px solid var(--card-border);
  transition: all 0.25s ease;
}

#link a:hover {
  background: var(--glass-bg-hover);
  transform: translateY(-3px);
}

#link img {
  width: 28px;
  filter: var(--icon-filter);
}

/* 首页拓展区：快捷入口网格 */
.home-extension {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.quick-card {
  padding: 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  box-shadow: var(--glass-shadow), var(--glass-highlight);
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-card:hover {
  background: var(--glass-bg-hover);
  transform: translateY(-4px);
  box-shadow: var(--glass-shadow-strong);
}

.quick-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 4px;
}

.quick-card-icon svg {
  width: 24px;
  height: 24px;
}

.quick-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.quick-card-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* 首页下方内容区（关于+历程） */
.home-content {
  width: 100%;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
}

.home-content-block {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--glass-shadow), var(--glass-highlight);
  padding: 24px;
}

.block-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

.item {
  background: var(--card-inner);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 20px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.8;
}

#line {
  padding-left: 12px;
}

#line li {
  position: relative;
  padding: 14px 0 14px 20px;
  border-left: 2px solid var(--card-border);
  color: var(--text-muted);
  font-size: 13px;
}

#line li:first-child {
  color: var(--accent);
  font-weight: 600;
}

#line li > div:nth-child(2) {
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
  margin-bottom: 3px;
}

.focus {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--card-border);
  border: 3px solid var(--glass-bg);
  position: absolute;
  left: -8px;
  top: 18px;
}

#line li:first-child .focus {
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-bg);
  animation: focus 2.5s ease infinite;
}

/* ========== 站点页 ========== */
#site {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

#site li {
  padding: 0;
  cursor: pointer;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  box-shadow: var(--glass-shadow), var(--glass-highlight);
  transition: all 0.25s ease;
  overflow: hidden;
  position: relative;
}

#site li:hover {
  background: var(--glass-bg-hover);
  transform: translateY(-3px);
  box-shadow: var(--glass-shadow-strong);
}

#site li a {
  display: block;
  padding: 24px;
  height: 100%;
}

.status {
  position: absolute;
  right: 16px;
  top: 16px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--card-inner);
  backdrop-filter: blur(4px);
}

#site li a > span:nth-child(2) {
  display: block;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  padding-right: 64px;
}

#site li a > span:last-child {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* 站点卡片有背景图时 */
.site-link.has-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  border-color: transparent;
  min-height: 140px;
}

.site-link.has-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.65) 100%);
  z-index: 0;
}

.site-link.has-bg > * {
  position: relative;
  z-index: 1;
}

.site-link.has-bg .site-name {
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.site-link.has-bg .site-desc {
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.site-link.has-bg .status {
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  backdrop-filter: blur(4px);
}

/* ========== 朋友圈 ========== */
.moments-list {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.moment-card {
  padding: 24px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--glass-shadow), var(--glass-highlight);
  transition: all 0.25s ease;
}

.moment-card:hover {
  background: var(--glass-bg-hover);
  transform: translateY(-2px);
  box-shadow: var(--glass-shadow-strong);
}

.moment-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.moment-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-weight: 600;
  font-size: 18px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.moment-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.moment-info {
  flex: 1;
  min-width: 0;
}

.moment-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.moment-time {
  font-size: 13px;
  color: var(--text-muted);
}

.moment-content {
  font-size: 15px;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 14px;
  word-break: break-word;
}

.moment-images {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.moment-images img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  background: var(--card-inner);
  cursor: pointer;
}

.moment-images.single img {
  aspect-ratio: 16/10;
}

.moment-actions {
  display: flex;
  gap: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--card-border);
}

.moment-action {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
  padding: 4px 8px;
  border-radius: 8px;
}

.moment-action:hover {
  color: var(--text);
  background: var(--card-inner);
}

.moment-action svg {
  width: 18px;
  height: 18px;
}

/* 朋友圈 - 视频 */
.moment-video {
  margin-bottom: 14px;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  position: relative;
}

.moment-video video {
  width: 100%;
  max-height: 340px;
  display: block;
}

.moment-video-hint {
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(0, 0, 0, 0.45);
  padding: 3px 8px;
  border-radius: 6px;
  pointer-events: none;
}

/* 朋友圈 - 文件 */
.moment-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: var(--accent-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--accent-text);
  font-size: 14px;
  transition: all 0.2s ease;
}

.moment-file:hover {
  background: var(--glass-bg-hover);
  transform: translateY(-1px);
}

.moment-file svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.moment-file span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 图片预览浮层 */
.image-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
  animation: fadeIn 0.2s ease;
}

.image-preview-overlay img {
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 12px;
  object-fit: contain;
}

/* 空状态 */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 15px;
  gap: 12px;
  padding: 60px 24px;
  text-align: center;
  grid-column: 1 / -1;
}

.empty-state svg {
  width: 56px;
  height: 56px;
  opacity: 0.4;
}

/* ========== 底部 ========== */
footer {
  width: 100%;
  padding: 24px 0 12px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* ========== 首页 Tab 切换 ========== */
.home-tab-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  padding: 4px;
  background: var(--card-inner);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  width: fit-content;
}

.home-tab {
  padding: 8px 20px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
}

.home-tab:hover {
  color: var(--text);
}

.home-tab.active {
  background: var(--glass-bg);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  font-weight: 600;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ========== 朋友圈查看更多按钮 ========== */
.moments-more-btn {
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  border: 1px solid var(--card-border);
  background: var(--card-inner);
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
}

.moments-more-btn:hover {
  background: var(--glass-bg-hover);
  color: var(--text);
  transform: translateY(-1px);
}

.moments-more-btn span {
  color: var(--accent);
  font-weight: 600;
}

/* ========== 朋友圈全屏浮层 ========== */
.moments-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg-grad);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.moments-fullscreen.show {
  opacity: 1;
  pointer-events: auto;
}

.moments-fs-header {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.moments-fs-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.moments-fs-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--card-border);
  background: var(--card-inner);
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.moments-fs-close:hover {
  background: var(--glass-bg-hover);
  color: var(--text);
}

.moments-fs-close svg {
  width: 20px;
  height: 20px;
}

.moments-fs-list {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  flex: 1;
  overflow-y: auto;
  padding: 0 24px 32px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.moments-fs-list::-webkit-scrollbar {
  width: 4px;
}

.moments-fs-list::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: var(--scrollbar-thumb);
}

/* ========== 代码块 ========== */
.moment-code-wrap {
  margin-bottom: 14px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #1a1b26;
  position: relative;
}

.moment-code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.moment-code-lang {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.moment-code-tools {
  display: flex;
  gap: 6px;
  align-items: center;
}

.moment-code-tool,
.moment-code-copy {
  padding: 4px 12px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.moment-code-tool:hover,
.moment-code-copy:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.moment-code-tool svg {
  width: 13px;
  height: 13px;
}

.moment-code {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  background: #1a1b26;
  font-size: 13px;
  line-height: 1.7;
  font-family: 'JetBrains Mono', 'Consolas', 'Monaco', monospace;
  max-height: 9.9em;
  overflow-y: hidden;
  position: relative;
  transition: max-height 0.3s ease;
}

.moment-code-wrap.expanded .moment-code {
  max-height: none;
}

.moment-code-expand {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, #1a1b26 70%);
  justify-content: center;
  align-items: flex-end;
  padding-bottom: 6px;
  cursor: pointer;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  z-index: 2;
}

.moment-code-wrap.foldable .moment-code-expand {
  display: flex;
}

.moment-code-wrap.expanded .moment-code-expand {
  display: none;
}

.moment-code code {
  background: transparent !important;
  padding: 0 !important;
}

/* 代码放大浮层 */
.code-zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 450;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  animation: codeZoomFadeIn 0.25s ease forwards;
}

@keyframes codeZoomFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.code-zoom-overlay .code-zoom-panel {
  width: 100%;
  max-width: 980px;
  height: 100%;
  max-height: 88vh;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
  animation: codeZoomPop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.code-zoom-overlay::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent 60%);
  pointer-events: none;
  animation: codeZoomGlow 4s ease-in-out infinite alternate;
}

@keyframes codeZoomPop {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes codeZoomGlow {
  from { opacity: 0.4; }
  to { opacity: 0.8; }
}

.code-zoom-overlay .moment-code-header {
  flex-shrink: 0;
  padding: 12px 18px;
}

.code-zoom-overlay .moment-code {
  flex: 1;
  max-height: none;
  overflow: auto;
  font-size: 14px;
  padding: 20px 24px;
}

.moment-code-back {
  display: none;
  padding: 4px 12px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  font-size: 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  align-items: center;
  gap: 4px;
}

.moment-code-back:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.moment-code-back svg {
  width: 12px;
  height: 12px;
}

.code-zoom-overlay .moment-code-back {
  display: inline-flex;
}

/* 代码预览浮层 */
.code-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  animation: shareFadeIn 0.25s ease forwards;
}

.code-preview-panel {
  width: 100%;
  max-width: 900px;
  height: 80vh;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.code-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13px;
  color: #475569;
  font-weight: 600;
}

.code-preview-close {
  width: 28px;
  height: 28px;
  border: none;
  background: #e2e8f0;
  border-radius: 50%;
  font-size: 18px;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.code-preview-close:hover {
  background: #cbd5e1;
}

.code-preview-iframe {
  flex: 1;
  border: none;
  background: #fff;
}

.code-preview-notice {
  padding: 40px 24px;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

/* ========== 评论区 ========== */
.moment-comments {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--card-border);
}

.moment-comments.show {
  display: block;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
  max-height: 320px;
  overflow-y: auto;
}

.comments-list::-webkit-scrollbar {
  width: 3px;
}

.comments-list::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: var(--scrollbar-thumb);
}

.comment-item {
  display: flex;
  gap: 10px;
}

.comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

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

.comment-body {
  flex: 1;
  min-width: 0;
}

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

.comment-text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  word-break: break-word;
}

.comment-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

.comment-empty {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding: 16px;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.comment-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  padding: 3px 6px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.comment-like-btn svg {
  width: 13px;
  height: 13px;
  fill: none;
}

.comment-like-btn:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.08);
}

.comment-like-btn.liked {
  color: var(--danger);
}

.comment-like-btn.liked svg {
  fill: var(--danger);
}

.comment-like-count {
  font-size: 12px;
  min-width: 8px;
}

.comment-images {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  margin-bottom: 3px;
}

.comment-images img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--card-border);
  transition: transform 0.2s;
}

.comment-images img:hover {
  transform: scale(1.03);
}

.comment-show-all {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 10px;
  margin-top: 6px;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.2s, color 0.2s;
}

.comment-show-all:hover {
  background: var(--card-inner);
  color: var(--text);
}

/* ========== 评论输入区 ========== */
.comment-input-area {
  padding: 10px 6px 12px;
  margin-bottom: 6px;
  border-radius: 14px;
  background: var(--card-inner);
  border: 1px solid var(--card-border);
}

.comment-input-top {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 0 8px;
}

.comment-input-top .comment-avatar {
  width: 32px;
  height: 32px;
  font-size: 12px;
  flex-shrink: 0;
}

.comment-input {
  flex: 1;
  border: 1px solid var(--card-border);
  background: var(--glass-bg);
  border-radius: 18px;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  font-family: inherit;
  min-width: 0;
  transition: border-color 0.2s, background 0.2s;
}

.comment-input:focus {
  border-color: var(--accent);
  background: var(--glass-bg-hover);
}

.comment-input::placeholder {
  color: var(--text-muted);
}

.comment-input-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 8px 0;
}

.comment-tool-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}

.comment-tool-btn svg {
  width: 18px;
  height: 18px;
}

.comment-tool-btn:hover {
  background: var(--glass-bg-hover);
  color: var(--text);
}

.comment-send {
  margin-left: auto;
  padding: 7px 20px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  border-radius: 16px;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
  transition: opacity 0.2s;
}

.comment-send:hover {
  opacity: 0.85;
}

.comment-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 表情面板 */
.emoji-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 10px 8px;
  margin: 8px 8px 0;
  background: var(--glass-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  max-height: 160px;
  overflow-y: auto;
}

.emoji-panel span {
  font-size: 22px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}

.emoji-panel span:hover {
  background: var(--card-inner);
  transform: scale(1.15);
}

.comment-image-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 8px 2px;
}

.comment-img-thumb {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: var(--card-inner);
}

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

.comment-img-thumb.uploading {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text-muted);
}

.comment-img-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
}

.moment-action.liked {
  color: var(--danger);
}

.moment-action.liked svg {
  fill: var(--danger);
}

.comment-count {
  font-size: 13px;
  color: var(--text-muted);
}

/* ========== 分享面板 ========== */
.share-panel-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding: 0;
  opacity: 0;
  animation: shareFadeIn 0.25s ease forwards;
}

@keyframes shareFadeIn {
  to { opacity: 1; }
}

.share-panel {
  width: 100%;
  max-width: 480px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border);
  border-radius: 22px 22px 0 0;
  box-shadow: var(--glass-shadow-strong), var(--glass-highlight);
  transform: translateY(100%);
  animation: shareSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) 0.05s forwards;
  overflow: hidden;
}

@keyframes shareSlideUp {
  to { transform: translateY(0); }
}

@media (min-width: 600px) {
  .share-panel-overlay {
    align-items: center;
    padding: 20px;
  }
  .share-panel {
    border-radius: 22px;
  }
}

.share-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--card-border);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.share-panel-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--card-inner);
  border-radius: 50%;
  font-size: 20px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s;
}

.share-panel-close:hover {
  background: var(--glass-bg-hover);
  color: var(--text);
}

.share-panel-body {
  padding: 24px;
}

.share-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.share-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 8px;
  border: none;
  background: var(--card-inner);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: inherit;
}

.share-item:hover {
  background: var(--glass-bg-hover);
  transform: translateY(-2px);
}

.share-item span {
  font-size: 13px;
  color: var(--text-secondary);
}

.share-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.share-icon svg {
  width: 22px;
  height: 22px;
}

.share-icon.wechat { background: #07c160; }
.share-icon.weibo { background: #e6162d; }
.share-icon.qq { background: #12b7f5; }
.share-icon.qzone { background: #fece00; color: #1a1a1a; }
.share-icon.copy { background: var(--accent); }
.share-icon.qrcode { background: #475569; }

.share-link-box {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  background: var(--card-inner);
  border: 1px solid var(--card-border);
  border-radius: 14px;
}

.share-link-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--text);
  outline: none;
  font-family: inherit;
  min-width: 0;
}

.share-link-copy {
  padding: 6px 16px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  border-radius: 12px;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
  transition: opacity 0.2s;
}

.share-link-copy:hover {
  opacity: 0.85;
}

.share-qrcode-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 16px;
  background: var(--card-inner);
  border: 1px solid var(--card-border);
  border-radius: 14px;
}

.share-qrcode-box canvas {
  background: #fff;
  border-radius: 10px;
  padding: 8px;
}

.share-qrcode-tip {
  font-size: 13px;
  color: var(--text-muted);
}

/* ========== 搜索浮层 ========== */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 100px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.search-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.search-box {
  width: 90%;
  max-width: 520px;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturate));
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--glass-shadow-strong), var(--glass-highlight);
  overflow: hidden;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.search-overlay.show .search-box {
  transform: translateY(0);
}

.search-input-wrap {
  display: flex;
  align-items: center;
  padding: 16px 22px;
  gap: 12px;
  border-bottom: 1px solid var(--card-border);
}

.search-input-wrap svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 16px;
  color: var(--text);
  outline: none;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-close {
  padding: 5px 12px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}

.search-close:hover {
  background: var(--card-inner);
  color: var(--text);
}

.search-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 10px;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}

.search-result-item:hover {
  background: var(--card-inner);
}

.search-result-item .title {
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
}

.search-result-item .desc {
  font-size: 13px;
  color: var(--text-muted);
}

.search-empty {
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
}

/* ========== 字体 ========== */
@font-face {
  font-family: 'GenSenRounded';
  src: url('GenSenRounded-R.woff2');
}

/* ========== 动画 ========== */
@keyframes focus {
  0% { box-shadow: 0 0 0 0 var(--accent-bg); }
  50% { box-shadow: 0 0 0 6px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

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

.fade-in {
  animation: fadeIn 0.3s ease;
}

/* ========== 响应式：平板 ========== */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 200px;
  }

  main {
    padding: 24px;
  }

  #bg {
    height: 220px;
  }

  .avatar {
    width: 110px;
    height: 110px;
    margin-top: -55px;
  }

  .hero-content {
    padding: 0 28px 28px;
    gap: 24px;
  }

  .info h2 {
    font-size: 26px;
  }

  .info h4 {
    font-size: 16px;
  }

  .home-content {
    grid-template-columns: 1fr;
  }

  .moments-list {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
  }

  #site {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

/* ========== 响应式：移动端 ========== */
@media (max-width: 768px) {
  :root {
    --sidebar-width: 0px;
  }

  body {
    flex-direction: column;
  }

  /* 移动端：隐藏左侧侧边栏和汉堡按钮 */
  nav {
    display: none !important;
  }

  .mobile-menu-btn,
  .mobile-menu-overlay {
    display: none !important;
  }

  /* 底部 Tabbar：苹果风格 */
  .tabbar {
    display: flex;
    position: fixed;
    bottom: 12px;
    left: 12px;
    right: 12px;
    height: 64px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 22px;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06);
    z-index: 50;
    padding: 6px;
    gap: 4px;
  }

  .tabbar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: transparent;
    border: none;
    border-radius: 16px;
    color: var(--text-muted, #94a3b8);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 4px 2px;
  }

  .tabbar-item svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
  }

  .tabbar-item.active {
    color: var(--accent, #475569);
    background: rgba(71, 85, 105, 0.08);
  }

  .tabbar-item.active svg {
    stroke-width: 2.5;
  }

  main {
    margin-left: 0;
    width: 100%;
    padding: 16px 16px 92px;
    min-height: 100vh;
  }

  section {
    max-width: 100%;
  }

  .section-title {
    font-size: 20px;
    margin-bottom: 18px;
  }

  /* 首页 */
  .home-hero {
    border-radius: 18px;
  }

  #bg {
    height: 180px;
  }

  .avatar {
    width: 90px;
    height: 90px;
    margin-top: -45px;
    border-width: 4px;
  }

  .hero-content {
    padding: 0 20px 24px;
    gap: 16px;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .info {
    padding-top: 0;
    align-items: center;
  }

  .info h2 {
    font-size: 24px;
  }

  .info h4 {
    font-size: 15px;
  }

  #link {
    margin-top: 18px;
    gap: 12px;
    justify-content: center;
  }

  #link a {
    width: 48px;
    height: 48px;
    border-radius: 14px;
  }

  #link img {
    width: 24px;
  }

  .home-extension {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .quick-card {
    padding: 18px;
    border-radius: 14px;
  }

  /* 站点 */
  #site {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  #site li a {
    padding: 18px;
  }

  #site li a > span:nth-child(2) {
    font-size: 15px;
    padding-right: 50px;
  }

  #site li a > span:last-child {
    font-size: 13px;
  }

  .site-link.has-bg {
    min-height: 110px;
  }

  /* 朋友圈 */
  .moments-list {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .moment-card {
    padding: 18px;
    border-radius: 16px;
  }

  .moments-fs-list {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 0 16px 24px;
  }

  .moments-fs-header {
    padding: 14px 16px;
  }

  .comment-images img {
    width: 64px;
    height: 64px;
  }

  .search-overlay {
    padding-top: 80px;
  }

  footer {
    padding: 16px 0 8px;
    font-size: 12px;
  }
}

/* ========== 小屏手机 ========== */
@media (max-width: 420px) {
  #site {
    grid-template-columns: 1fr;
  }

  .home-extension {
    grid-template-columns: 1fr;
  }
}
