/* ========== 小黄书 - 完整样式表 ========== */
* { margin:0; padding:0; box-sizing:border-box; }

@font-face {
    font-family: 'MSYHFont';
    src: url('../fonts/msyh.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
  /* 小红书原版风格：纯白卡片 + 浅灰背景 + 大圆角 + 淡阴影。
     【注意】--glass-* 这组变量名是历史遗留（毛玻璃时代），现在语义上就是
     「卡片底色 / 卡片描边 / 卡片阴影」，theme-*.css 只覆盖这 11 个颜色变量，
     改变量名会导致 7 套主题全部失效，所以名字保留、值改为实色。 */
  --primary: #ff2442;
  --primary-dark: #e61f3c;
  --primary-light: #fff0f2;
  --bg: #f8f8f8;
  --card-bg: #ffffff;
  --text: #333333;
  --text-secondary: #666;
  --text-light: #999;
  --border: rgba(0,0,0,0.06);
  --glass-bg: #ffffff;
  --glass-border: rgba(0,0,0,0.05);
  --glass-shadow: none;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 6px 18px rgba(0,0,0,0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 70px;
}

.container { max-width: 1000px; margin: 0 auto; padding: 0 16px; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ========== 顶部导航 ========== */
.navbar {
  background: var(--glass-bg);
  border-bottom: 1px solid #f0f0f0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }

/* Logo 图片 */
.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.logo img {
  height: 40px;
  width: auto;
  display: block;
  object-fit: contain;
  border-radius: 10px;
}

.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { font-size: 15px; color: var(--text-secondary); font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--primary); }
.user-menu {
  display: flex; align-items: center; gap: 12px; padding: 4px 12px; border-radius: 20px;
  background: #f5f5f5;
  border: 1px solid transparent;
}
.avatar-sm { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; }
.user-menu span { font-size: 14px; font-weight: 500; color: var(--text); }
@media (max-width: 768px) { .nav-links, .nav-search { display: none; } .navbar .container { justify-content: space-between; } }

/* ========== 页面标题（原先 16 处使用却没有任何规则，一直裸奔着浏览器默认 h2）========== */
.page-title { font-size: 22px; font-weight: 700; color: var(--text); margin: 18px 0 12px; line-height: 1.3; }

/* ========== 导航搜索框（小红书桌面端：居中灰底胶囊）========== */
.nav-search {
  flex: 1; max-width: 360px; margin: 0 auto;
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 16px;
  background: #f5f5f5; border-radius: 19px; border: 1px solid transparent;
  transition: var(--transition);
}
.nav-search:focus-within { background: #fff; border-color: #d9d9d9; }
.nav-search svg { width: 16px; height: 16px; color: #999; flex-shrink: 0; }
.nav-search input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 14px; color: var(--text); min-width: 0;
}
.nav-search input::placeholder { color: #aaa; }
/* 移动端隐藏导航搜索框 —— 必须写在 .nav-search 定义之后，
   否则会被上面的 display:flex 以「同特异性、后出现者胜」覆盖掉 */
@media (max-width: 768px) { .nav-search { display: none; } }

/* ========== 汉堡按钮 ========== */
.hamburger {
  display: none; flex-direction: column; justify-content: center; align-items: center;
  width: 40px; height: 40px; background: #f5f5f5;
  border: none; border-radius: 50%; cursor: pointer;
}
.hamburger span { display: block; width: 20px; height: 2px; background: var(--text); margin: 2.5px 0; border-radius: 2px; transition: var(--transition); }
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 768px) { .hamburger { display: flex; } }

/* ========== 移动端菜单 ========== */
.mobile-menu {
  display: block; max-height: 0; overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease; opacity: 0;
  background: var(--glass-bg);
  border-top: 1px solid var(--glass-border);
}
.mobile-menu.open { max-height: 80vh; opacity: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.mobile-menu-item { display: block; padding: 14px 24px; font-size: 16px; color: var(--text); border-bottom: 1px solid rgba(0,0,0,0.05); }
.mobile-menu-item:hover { background: #fff; color: var(--primary); }
.menu-divider { height: 1px; background: rgba(0,0,0,0.06); margin: 6px 0; }

/* ========== 用户下拉菜单 ========== */
.dropdown { position: relative; }
.dropdown-toggle { background: transparent; border: none; cursor: pointer; font-size: 12px; color: var(--text-secondary); padding: 0 2px; }
.dropdown-content {
  display: none; position: absolute; right: 0; top: 100%;
  background: #fff;
  border: 1px solid var(--glass-border); border-radius: 12px;
  box-shadow: var(--shadow-md); min-width: 160px; padding: 5px 0; z-index: 1000;
  max-height: 70vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.dropdown:hover .dropdown-content { display: block; }
.dropdown-content a { display: block; padding: 10px 16px; font-size: 13px; color: var(--text); white-space: nowrap; }
.dropdown-content a:hover { background: rgba(255,46,77,0.05); color: var(--primary); }

/* ========== 分类卡片 ========== */
.category-filter {
  display: flex; flex-wrap: nowrap; gap: 10px; margin: 14px 0 12px; padding: 4px 2px 8px 2px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.category-filter::-webkit-scrollbar { display: none; }
.filter-item {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  min-width: 64px; height: 36px; padding: 0 16px; background: #fff; border-radius: 18px;
  font-size: 14px; font-weight: 500; color: var(--text-secondary);
  white-space: nowrap; text-decoration: none; border: 1px solid #ebebeb;
  transition: var(--transition);
}
.filter-item:hover { border-color: #d9d9d9; color: var(--text); }
/* 小红书的分类选中态是「黑底白字」胶囊，不是主题色 —— 保持一致 */
.filter-item.active { background: #333; color: #fff; font-weight: 600; border-color: #333; }
.filter-item:active { transform: scale(0.94); }

/* ========== 猜你喜欢横滑区 ========== */
.rec-section { margin-bottom: 20px; }
.rec-title { font-size: 16px; font-weight: 700; margin-bottom: 10px; color: var(--text); }
.rec-row {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.rec-row::-webkit-scrollbar { display: none; }
.rec-card {
  flex: 0 0 auto; width: 140px; text-decoration: none;
  background: var(--card-bg); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 0 6px rgba(0,0,0,0.04); transition: transform 0.2s, box-shadow 0.2s;
}
.rec-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.1); }
.rec-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; }
.rec-cover-empty { width: 100%; aspect-ratio: 3/4; background: #f0f0f0; display: flex; align-items: center; justify-content: center; color: #ccc; }
.rec-cover-empty svg { width: 32px; height: 32px; }
.rec-body { padding: 8px 10px 10px; }
.rec-name {
  font-size: 12px; font-weight: 600; line-height: 1.35; color: var(--text);
  height: 32px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.rec-meta { font-size: 10px; color: var(--text-light); margin-top: 4px; display: flex; justify-content: space-between; align-items: center; }
.rec-meta .note-likes { font-size: 10px; gap: 2px; }
.rec-meta .note-likes svg { width: 12px; height: 12px; }

/* ========== 笔记卡片（小红书瀑布流样式）========== */
.notes-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 8px; }
.note-card {
  background: var(--card-bg);
  border: none; border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 0 6px rgba(0,0,0,0.04);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex; flex-direction: column;
}
.note-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.1); }
.note-cover { width: 100%; aspect-ratio: 3/4; object-fit: cover; background: #f0f0f0; }
.note-cover-wrapper { position: relative; }
/* 封面左下角的分类半透明胶囊（小红书式的角标位置） */
.cover-category-badge {
  position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px);
  padding: 3px 8px; border-radius: 6px;
  background: rgba(0,0,0,0.45); color: #fff;
  font-size: 11px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  pointer-events: none;
}
/* 封面左上角「置顶」角标 */
.cover-top-badge {
  position: absolute; top: 8px; left: 8px;
  padding: 3px 8px; border-radius: 6px;
  background: var(--primary); color: #fff;
  font-size: 11px; line-height: 1.3;
  pointer-events: none;
}
/* 视频角标：圆形半透明底 + SVG 播放三角（不依赖 emoji 字体） */
.video-overlay {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  color: #fff; background: rgba(0,0,0,0.4); border-radius: 50%;
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; pointer-events: none;
}
.video-overlay svg { width: 22px; height: 22px; margin-left: 2px; }
/* 视频无封面时占位区自带一个 ▶ 字符，与 SVG 播放角标叠成双层 —— 隐藏字符版，只留 SVG */
.video-cover-placeholder .video-play-icon { display: none; }
.note-body { padding: 10px 12px 12px; flex: 1; display: flex; flex-direction: column; }
.note-title { font-size: 14px; font-weight: 600; margin-bottom: 8px; line-height: 1.4; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.note-content { font-size: 13px; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 8px; }
/* 小红书式作者行：左「头像+昵称」右「心形+点赞数」 */
.note-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--text-light); margin-top: auto; }
.note-author { display: flex; align-items: center; gap: 5px; min-width: 0; color: var(--text-secondary); font-size: 12px; }
.note-author .author-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90px; }
.note-stats-mini { display: flex; align-items: center; gap: 10px; flex-shrink: 0; color: var(--text-light); font-size: 12px; }
.note-views, .note-likes { display: flex; align-items: center; gap: 3px; }
.note-likes svg { width: 15px; height: 15px; }
.note-views svg { width: 15px; height: 15px; color: var(--text-light); }
.author { display: flex; align-items: center; gap: 5px; min-width: 0; }
.avatar-placeholder { width: 18px; height: 18px; border-radius: 50%; background: #f0f0f0; flex-shrink: 0; }
.stats { white-space: nowrap; font-size: 12px; }
.level-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; background: var(--primary-light); color: var(--primary); font-weight: 600; font-size: 12px; }

@media (min-width: 768px) { .notes-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 1024px) { .notes-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1440px) { .notes-grid { grid-template-columns: repeat(5, 1fr); } }

/* ========== 按钮 ========== */
.btn {
  display: inline-block; padding: 11px 24px; background: var(--primary); color: #fff;
  border: none; border-radius: 24px; cursor: pointer; font-size: 14px; font-weight: 600;
  transition: var(--transition); text-align: center; box-shadow: none;
}
.btn:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; border: 1px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 20px; }
.btn-block { width: 100%; }

/* ========== 表单 ========== */
.form-container {
  max-width: 420px; margin: 24px auto; background: var(--glass-bg);
  border: 1px solid var(--glass-border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--glass-shadow);
}
.form-container h2 { text-align: center; margin-bottom: 20px; font-size: 22px; color: var(--text); }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; font-size: 14px; color: var(--text-secondary); }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 11px 14px; border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-sm); font-size: 15px;
  background: #fff; color: var(--text);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(255,46,77,0.1); outline: none; }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group input[type="file"] { padding: 8px; background: #fff; }

/* ========== 笔记详情 ========== */
/* 详情页：移动端整块白底卡片；桌面（≥1024px）左右分栏 —— 左媒体 sticky、右侧信息+评论（小红书网页版布局） */
.note-detail {
  background: var(--card-bg);
  border: none; border-radius: var(--radius);
  padding: 16px; margin-top: 12px; box-shadow: 0 0 6px rgba(0,0,0,0.04);
  /* 移动端也要是 flex 容器：媒体列的 order:-1 才能把图片顶到最上面（小红书移动端是图在上） */
  display: flex; flex-direction: column;
}
.note-media-col { order: -1; } /* 移动端图片在最上 */
@media (min-width: 1024px) {
  .note-detail {
    background: transparent; padding: 0; box-shadow: none; border-radius: 0;
    display: flex; flex-direction: row; gap: 20px; align-items: flex-start;
    /* flex-direction 必须显式写 row：基础规则里的 column 会沿用到这里（媒体查询只覆盖声明了的属性） */
  }
  .note-media-col {
    order: -1; flex: 1.15; min-width: 0; /* 桌面端媒体在左（小红书网页版布局） */
    position: sticky; top: 76px;
    background: var(--card-bg); border-radius: var(--radius);
    padding: 12px; box-shadow: 0 0 6px rgba(0,0,0,0.04);
  }
  .note-info-col {
    flex: 1; min-width: 0;
    background: var(--card-bg); border-radius: var(--radius);
    padding: 20px; box-shadow: 0 0 6px rgba(0,0,0,0.04);
  }
}
/* 点赞 / 收藏的图标按钮（小红书操作对） */
.action-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px; border-radius: 20px; border: 1px solid #ebebeb;
  background: #fff; color: var(--text-secondary); font-size: 14px; cursor: pointer;
  transition: var(--transition);
}
.action-btn svg { width: 17px; height: 17px; }
.action-btn:hover { border-color: #d9d9d9; color: var(--text); }
.action-btn.active { color: var(--primary); border-color: var(--primary-light); background: var(--primary-light); }
.note-detail h1 { font-size: 20px; margin-bottom: 6px; line-height: 1.3; color: var(--text); }
.note-detail .author { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); margin-bottom: 14px; flex-wrap: wrap; }
.note-detail .author img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.content-text { white-space: pre-wrap; font-size: 15px; line-height: 1.6; margin: 14px 0; color: var(--text); }
.note-stats { display: flex; gap: 20px; font-size: 14px; color: var(--text-secondary); margin: 10px 0; }
/* 浏览 / 点赞计数行：SVG 图标 + 数字，垂直居中对齐 */
.note-stats .stat-item { display: inline-flex; align-items: center; gap: 6px; }
.note-stats .stat-item svg { width: 17px; height: 17px; color: var(--text-light); }
.note-actions { display: flex; gap: 16px; margin: 14px 0; align-items: center; }

/* ========== 评论区域 ========== */
.comments-section { margin-top: 20px; }
.comments-section h3 { font-size: 16px; margin-bottom: 10px; color: var(--text); }
.comment-item { display: flex; align-items: flex-start; gap: 8px; padding: 12px 0; border-bottom: 1px solid rgba(0,0,0,0.05); }
.comment-item img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.comment-content { flex: 1; font-size: 14px; color: var(--text); }
.comment-user { font-weight: 600; margin-right: 4px; }
.comment-time { color: var(--text-light); font-size: 11px; margin-left: 6px; }
.no-comments { text-align: center; padding: 24px 0; color: var(--text-light); font-size: 14px; }
.top-comments { background: var(--primary-light); border-radius: 12px; padding: 10px; margin-bottom: 10px; }
.top-label { font-size: 12px; font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.comment-item.top { background: #fff; border-radius: 8px; padding: 8px; }

/* ========== 表格 ========== */
.table {
  width: 100%; border-collapse: collapse; background: var(--glass-bg);
  border: 1px solid var(--glass-border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--glass-shadow); font-size: 14px;
}
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid rgba(0,0,0,0.05); }
.table th { background: #fff; font-weight: 600; color: var(--text-secondary); }
.table img { width: 50px; height: 38px; object-fit: cover; border-radius: 6px; }
.status-badge { padding: 2px 8px; border-radius: 10px; font-size: 11px; display: inline-block; font-weight: 500; }
.status-0 { background: var(--primary-light); color: var(--primary); }
.status-1 { background: #e8f5e9; color: #2e7d32; }
.status-2 { background: #fff3e0; color: #f57c00; }
.badge-video { display: inline-block; margin-left: 4px; padding: 1px 5px; font-size: 10px; background: var(--primary); color: #fff; border-radius: 4px; }

/* ========== 图片轮播 ========== */
.image-carousel { position: relative; max-width: 100%; margin: 14px 0; overflow: hidden; border-radius: var(--radius); background: rgba(0,0,0,0.03); }
.carousel-track { display: flex; transition: transform 0.3s ease; }
.carousel-slide { min-width: 100%; display: none; }
.carousel-slide.active { display: block; }
.carousel-slide img { width: 100%; max-height: 400px; object-fit: contain; border-radius: var(--radius); }
.carousel-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.4); color: #fff; border: none; padding: 6px 10px; cursor: pointer; font-size: 16px; border-radius: 50%; }
.carousel-btn.prev { left: 6px; }
.carousel-btn.next { right: 6px; }
.carousel-indicators { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; }
.indicator { width: 7px; height: 7px; border-radius: 50%; background: #fff; cursor: pointer; }
.indicator.active { background: #fff; width: 18px; border-radius: 3px; }

/* ========== 公告弹窗 ========== */
.modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 9999; display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity 0.3s, visibility 0.3s;
}
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal-card { width: 90%; max-width: 360px; background: #fff; border-radius: 24px; box-shadow: 0 20px 60px rgba(0,0,0,0.2); padding: 20px; transform: scale(0.8); transition: transform 0.3s; }
.modal-overlay.show .modal-card { transform: scale(1); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-title { font-size: 18px; font-weight: 700; color: var(--primary); }
.modal-close { background: #f0f0f0; border: none; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 14px; color: #666; display: flex; align-items: center; justify-content: center; }
.modal-body { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.modal-item { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; }
.modal-label { flex-shrink: 0; background: var(--primary-light); color: var(--primary); padding: 2px 10px; border-radius: 10px; font-weight: 600; white-space: nowrap; }
.modal-text { color: var(--text); }
.modal-footer .btn { width: 100%; }

/* ========== 视频容器 ========== */
.video-container { margin: 14px 0; position: relative; }
.video-cover-placeholder { background: #333; display: flex; align-items: center; justify-content: center; aspect-ratio: 3/4; }
.video-play-icon { font-size: 40px; color: rgba(255,255,255,0.8); }
.video-thumb { width: 50px; height: 38px; background: #333; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; }

/* ========== 头像 ========== */
.note-author img.avatar-img { width: 16px !important; height: 16px !important; }
img.avatar-img { width: 28px !important; height: 28px !important; border-radius: 50% !important; object-fit: cover !important; flex-shrink: 0 !important; display: inline-block !important; }
.user-menu img.avatar-img { width: 32px !important; height: 32px !important; }
.note-detail .author img.avatar-img { width: 36px !important; height: 36px !important; }
.comment-item img.avatar-img { width: 30px !important; height: 30px !important; }

/* ========== 提示消息 ========== */
.alert { padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: 13px; background: #fff; }
.alert-error { background: rgba(255,46,77,0.1); color: #c62828; }
.alert-success { background: rgba(46,125,50,0.1); color: #2e7d32; }
.alert-info { background: rgba(21,101,192,0.1); color: #1565c0; }

/* ========== 分页 ========== */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin: 30px 0 20px; }
.page-link {
  display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 12px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: 12px; font-size: 14px; font-weight: 500; color: var(--text);
}
.page-link:hover { background: #fff; border-color: var(--primary); color: var(--primary); }
.page-link.active { background: var(--primary); color: #fff; font-weight: 700; border-color: transparent; }
.page-dots { color: var(--text-light); font-size: 16px; padding: 0 4px; }

/* ========== 全屏/下载按钮 ========== */
.fullscreen-btn { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,0.4); color: #fff; border: none; padding: 6px 10px; border-radius: 6px; cursor: pointer; font-size: 14px; z-index: 10; }
.download-buttons { margin: 10px 0; display: flex; flex-wrap: wrap; gap: 10px; }
.download-buttons a { flex: 1 1 auto; text-align: center; min-width: 120px; }

/* ========== 打卡区域 ========== */
.checkin-box { background: var(--card-bg); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; text-align: center; box-shadow: var(--glass-shadow); }

/* ========== 主题选择卡片 ========== */
.theme-card { background: #fff; border-radius: 14px; padding: 16px; text-align: center; box-shadow: var(--shadow-sm); cursor: pointer; transition: var(--transition); }
.theme-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* ========== 页脚 ========== */
.footer { background: transparent; padding: 20px 0; text-align: center; color: var(--text-light); font-size: 13px; }

/* ========== 收藏本站引导 ========== */
.fav-guide {
  margin: 16px 0 8px;
  background: linear-gradient(135deg, rgba(255,46,77,0.08), rgba(255,107,129,0.12));
  border: 1px solid rgba(255,46,77,0.15);
  border-radius: 16px;
  padding: 14px 16px;
}
.fav-guide-content { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fav-guide-icon { font-size: 28px; flex-shrink: 0; }
.fav-guide-text { flex: 1; min-width: 160px; }
.fav-guide-title { font-size: 14px; font-weight: 700; color: var(--primary); margin-bottom: 3px; }
.fav-guide-desc { font-size: 12px; color: var(--text-secondary); }
.fav-guide-desc kbd { display: inline-block; padding: 1px 6px; background: #fff; border: 1px solid #ddd; border-radius: 4px; font-size: 11px; font-family: monospace; color: #333; font-weight: 600; }
.fav-guide-btn { background: var(--primary); color: #fff; border: none; padding: 8px 18px; border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer; }
.fav-guide-btn:hover { background: var(--primary-dark); }
.fav-guide-close { background: transparent; border: none; color: var(--text-light); font-size: 16px; cursor: pointer; padding: 4px 8px; }
.fav-guide-close:hover { color: var(--primary); }

/* ========== 上传进度条 ========== */
.progress-wrap { display: none; margin: 15px 0; padding: 14px 18px; background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius); }
.progress-label { font-size: 14px; color: var(--text-secondary); margin-bottom: 8px; display: flex; justify-content: space-between; }
.progress-bar-bg { width: 100%; height: 10px; background: rgba(0,0,0,0.08); border-radius: 10px; overflow: hidden; }
.progress-bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--primary), var(--primary-dark)); border-radius: 10px; transition: width 0.2s ease; }
.progress-bar.success { background: linear-gradient(90deg, #4caf50, #388e3c); }
.progress-bar.error { background: linear-gradient(90deg, #f44336, #c62828); }

/* ========== 滚动横幅（跑马灯） ========== */
.marquee-banner {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 44px;
  border-radius: 12px;
  margin: 12px 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.marquee-content {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  white-space: nowrap;
  width: max-content;
  animation-name: marqueeScroll;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform;
}
.marquee-content span {
  display: block;
  flex-shrink: 0;
  color: #000000 !important;
  font-family: 'MSYHFont', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  font-size: 15px;
  font-weight: 600;
  padding: 0 60px;
  white-space: nowrap;
  line-height: 44px;
}
@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ========== 移动端优化 ========== */
@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .navbar .container { height: 54px; }
  .logo img { height: 34px; }
  .hamburger { width: 38px; height: 38px; }
  .hamburger span { width: 18px; margin: 2px 0; }
  .category-filter { gap: 8px; margin: 12px 0 10px; padding: 2px 2px 6px 2px; }
  .filter-item { min-width: 68px; height: 38px; padding: 0 14px; font-size: 13px; border-radius: 13px; }
  .notes-grid { gap: 8px; }
  .note-card { border-radius: 14px; }
  .note-body { padding: 8px 10px 10px; }
  .note-title { font-size: 13px; }
  .note-content { font-size: 11px; }
  .note-meta { font-size: 10px; }
  .page-link { min-width: 36px; height: 36px; padding: 0 10px; font-size: 13px; }
  .dropdown-content { max-height: 60vh; min-width: 140px; }
  .marquee-banner { height: 40px; border-radius: 10px; }
  .marquee-content span { font-size: 14px; padding: 0 40px; line-height: 40px; }
}

/* ========== 主题定义（8套） ========== */


/* ========== SVG 图标导航样式 ========== */
.nav-item,
.mobile-menu-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-item svg,
.mobile-menu-item svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.nav-item:hover svg {
    transform: scale(1.15);
}

.nav-item.nav-icon {
    position: relative;
    padding: 4px;
}

.icon-badge {
    position: absolute;
    top: -2px;
    right: -6px;
    background: #ff2e4d;
    color: #fff;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 8px;
    font-weight: 600;
    min-width: 16px;
    text-align: center;
    line-height: 1.3;
}

/* 下拉菜单图标 */
.dropdown-content a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-content a svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.dropdown-content a:hover svg {
    color: var(--primary);
}

/* 下拉箭头按钮 */
.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dropdown-toggle svg {
    width: 14px;
    height: 14px;
}

/* 移动端菜单图标 */
.mobile-menu-item svg {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
}

.mobile-menu-item:hover svg {
    color: var(--primary);
}

/* ========== 群聊 ========== */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 180px);
    min-height: 400px;
    max-height: 720px;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    overflow: hidden;
    margin-bottom: 20px;
}
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    background: #fff;
}
.chat-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 15px;
    color: var(--text);
}
.chat-title svg { color: var(--primary); }
.chat-online {
    font-size: 12px;
    color: var(--text-light);
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 3px; }
.chat-empty {
    text-align: center;
    color: var(--text-light);
    padding: 60px 20px;
    font-size: 14px;
}
.chat-msg {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    align-items: flex-start;
}
.chat-msg.self {
    flex-direction: row-reverse;
}
.chat-msg-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    background: #eee;
}
.chat-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
}
.chat-msg-body {
    display: flex;
    flex-direction: column;
    max-width: 70%;
}
.chat-msg.self .chat-msg-body {
    align-items: flex-end;
}
.chat-msg-meta {
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.chat-msg-name {
    font-weight: 600;
    color: var(--text-secondary);
}
.chat-msg-rank {
    background: var(--primary-light);
    color: var(--primary);
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 10px;
}
.chat-msg-bubble {
    padding: 10px 14px;
    background: #fff;
    border-radius: 16px;
    border-top-left-radius: 4px;
    border: 1px solid rgba(0,0,0,0.05);
    word-break: break-word;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.chat-msg.self .chat-msg-bubble {
    background: var(--primary);
    color: #fff;
    border-color: transparent;
    border-top-left-radius: 16px;
    border-top-right-radius: 4px;
}
.chat-msg-time {
    font-size: 10px;
    color: var(--text-light);
    margin-top: 4px;
    padding: 0 4px;
}

/* 分享的笔记卡片 */
.chat-note-card {
    display: flex;
    gap: 10px;
    padding: 8px;
    background: #f8f8f8;
    border-radius: 10px;
    margin-bottom: 6px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
    min-width: 220px;
}
.chat-msg.self .chat-note-card {
    background: rgba(255,255,255,0.15);
}
.chat-note-card:hover {
    background: #f0f0f0;
}
.chat-msg.self .chat-note-card:hover {
    background: rgba(255,255,255,0.25);
}
.chat-note-cover {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #eee;
}
.chat-note-video {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #333;
    color: #fff;
    font-size: 18px;
}
.chat-note-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 11px;
}
.chat-note-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.chat-note-title {
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
    color: var(--text);
}
.chat-msg.self .chat-note-title { color: #fff; }
.chat-note-meta {
    font-size: 11px;
    color: #999;
}
.chat-msg.self .chat-note-meta { color: rgba(255,255,255,0.75); }
.chat-text {
    font-size: 14px;
    line-height: 1.5;
}

/* 输入区域 */
.chat-input-area {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid rgba(0,0,0,0.05);
    background: #fff;
}
.chat-input-area input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 20px;
    font-size: 14px;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
}
.chat-input-area input:focus {
    border-color: var(--primary);
}
.chat-input-area button {
    flex-shrink: 0;
    padding: 8px 20px;
    border-radius: 20px;
}

/* 移动端 */
@media (max-width: 480px) {
    .chat-container {
        height: calc(100vh - 200px);
        min-height: 350px;
        border-radius: 12px;
    }
    .chat-msg-body { max-width: 78%; }
    .chat-msg-avatar { width: 34px; height: 34px; }
    .chat-note-card { min-width: 180px; }
    .chat-input-area input { padding: 9px 12px; font-size: 14px; }
    .chat-input-area button { padding: 8px 16px; }
}

/* ========== 移动端底部导航 ========== */
.bottom-tabbar {
    display: none;
}

@media (max-width: 768px) {
    .bottom-tabbar {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        height: 58px;
        background: #fff;
        border-top: 1px solid rgba(0,0,0,0.06);
        z-index: 200;
        align-items: center;
        justify-content: space-around;
        padding: 0 4px;
        padding-bottom: env(safe-area-inset-bottom, 0);
        box-shadow: 0 -1px 6px rgba(0,0,0,0.03);
    }

    body {
        padding-bottom: calc(70px + env(safe-area-inset-bottom, 0)) !important;
    }

    .tab-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        flex: 1;
        height: 100%;
        text-decoration: none;
        color: #666;
        position: relative;
        transition: color 0.2s;
    }
    .tab-item svg {
        width: 22px;
        height: 22px;
        transition: transform 0.2s;
    }
    .tab-item span {
        font-size: 10px;
        font-weight: 500;
        line-height: 1;
    }
    .tab-item.active {
        color: #1a1a1a;
    }
    .tab-item.active svg {
        transform: scale(1.05);
    }

    .tab-publish {
        flex: 1;
        color: #666;
    }
    .publish-btn {
        width: 44px;
        height: 34px;
        background: #ff2e4d;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        transition: transform 0.15s, background 0.2s;
        margin-bottom: 2px;
    }
    .publish-btn svg {
        width: 22px;
        height: 22px;
        stroke: #fff;
    }
    .tab-publish:active .publish-btn {
        transform: scale(0.92);
    }

    .tab-icon-wrap {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .tab-badge {
        position: absolute;
        top: -4px;
        right: -10px;
        background: #ff2e4d;
        color: #fff;
        font-size: 10px;
        font-weight: 600;
        padding: 1px 5px;
        border-radius: 8px;
        min-width: 16px;
        height: 16px;
        line-height: 14px;
        text-align: center;
        box-sizing: border-box;
    }
    .tab-badge-large {
        padding: 1px 4px;
        font-size: 9px;
    }

    .tab-me-avatar {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        object-fit: cover;
        display: block;
        transition: transform 0.2s;
    }
    .tab-me-avatar-text {
        background: var(--primary);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        font-weight: 600;
    }
    .tab-item.active .tab-me-avatar {
        transform: scale(1.05);
        box-shadow: 0 0 0 2px rgba(255,46,77,0.2);
    }
}

/* ========== 评论回复 + 评论点赞 ========== */
.comment-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
}
.comment-text {
    word-break: break-word;
}
.comment-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-light);
}
.comment-like-btn,
.comment-reply-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-light);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0;
    transition: color 0.2s;
}
.comment-like-btn:hover,
.comment-reply-btn:hover {
    color: var(--primary);
}
.comment-like-btn.liked {
    color: var(--primary);
}
.comment-like-count:empty {
    display: none;
}
.comment-replies {
    margin-top: 6px;
    padding: 8px 12px;
    background: rgba(0,0,0,0.03);
    border-radius: 8px;
    border-left: 2px solid var(--primary-light);
}
.comment-reply-item {
    font-size: 13px;
    padding: 4px 0;
    line-height: 1.5;
}
.comment-reply-item .reply-name {
    font-weight: 600;
    color: var(--text-secondary);
}
.comment-reply-item .reply-text {
    color: var(--text);
}
.reply-form-wrap {
    margin-top: 8px;
    padding: 8px 10px;
    background: rgba(0,0,0,0.02);
    border-radius: 8px;
}
.reply-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 6px;
    font-size: 13px;
    resize: vertical;
    box-sizing: border-box;
    background: #fff;
}
.reply-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

/* ========== 顶部 Tab（发现 / 关注） ========== */
.top-tabs {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin: 12px 0 8px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    padding-bottom: 0;
}
.top-tab {
    padding: 8px 0 12px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-light);
    text-decoration: none;
    position: relative;
    transition: color 0.2s;
}
.top-tab:hover { color: var(--text); }
.top-tab.active {
    color: var(--text);
    font-weight: 700;
}
.top-tab.active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -1px;
    transform: translateX(-50%);
    width: 28px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
}

/* ========== 用户主页 ========== */
.user-profile-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 24px;
    margin-top: 16px;
    box-shadow: var(--glass-shadow);
}
.user-profile-main {
    display: flex;
    gap: 18px;
    align-items: center;
    margin-bottom: 18px;
}
.user-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.user-avatar-placeholder {
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 600;
}
.user-profile-info {
    flex: 1;
    min-width: 0;
}
.user-profile-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}
.user-rank-tag {
    font-size: 12px;
    padding: 2px 8px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 10px;
    font-weight: 600;
}
.user-level-tag {
    font-size: 12px;
    padding: 2px 8px;
    background: #f0f0f0;
    color: #666;
    border-radius: 10px;
    font-weight: 600;
}
.user-profile-username {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 12px;
}
.user-profile-stats {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
}
.user-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.user-stat strong {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
}
.user-stat span {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
}
.user-profile-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}
.user-profile-date {
    margin-top: 14px;
    font-size: 12px;
    color: var(--text-light);
}
.user-notes-title {
    margin: 28px 0 14px;
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
}

@media (max-width: 480px) {
    .user-profile-card { padding: 18px; }
    .user-avatar-large { width: 64px; height: 64px; }
    .user-avatar-placeholder { font-size: 26px; }
    .user-profile-name { font-size: 17px; }
    .user-profile-stats { gap: 16px; }
    .user-stat strong { font-size: 15px; }
}

/* ========== 图片缩放 ========== */
.zoom-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.zoomable-image {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
    will-change: transform;
    touch-action: none;
}

.zoom-tip {
    text-align: center;
    font-size: 12px;
    color: var(--text-light);
    margin: 8px 0 12px;
}

/* 图片轮播容器防止溢出 */
.carousel-slide {
    overflow: hidden;
}

@media (max-width: 480px) {
    .zoomable-image {
        max-height: 400px;
    }
}

/* ========== 设置页面 ========== */
.settings-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--glass-shadow);
}
.settings-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}
.settings-header svg {
    color: var(--primary);
}
.settings-desc {
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 18px;
}
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}
.theme-card {
    background: #fff;
    border: 2px solid transparent;
    border-radius: 14px;
    padding: 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
    box-shadow: var(--shadow-sm);
}
.theme-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.theme-card.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,46,77,0.15);
}
.theme-preview {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-bottom: 10px;
}
.theme-color {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid rgba(0,0,0,0.05);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.theme-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}
.theme-check {
    display: none;
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
}
.theme-card.active .theme-check {
    display: flex;
}
.settings-menu {
    display: flex;
    flex-direction: column;
}
.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 4px;
    font-size: 15px;
    color: var(--text);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: color 0.2s;
}
.settings-item:last-child {
    border-bottom: none;
}
.settings-item:hover {
    color: var(--primary);
}
.settings-item svg {
    color: var(--text-light);
    flex-shrink: 0;
}
.settings-item:hover svg {
    color: var(--primary);
}

@media (max-width: 480px) {
    .theme-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .theme-card {
        padding: 12px;
    }
    .theme-color {
        width: 22px;
        height: 22px;
    }
}

/* ========== 顶部导航（调整：汉堡在左） ========== */
.hamburger {
    display: flex; /* 移动端显示，桌面端隐藏 */
}
.logo { margin: 0 auto; }
.mobile-top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 40px;
    justify-content: flex-end;
}
.top-icon {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
}
.top-icon svg { width: 20px; height: 20px; }
.top-icon .icon-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ff2e4d;
    color: #fff;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 8px;
    font-weight: 600;
}

/* 桌面端：隐藏汉堡和右侧快捷图标，恢复原布局 */
@media (min-width: 769px) {
    .hamburger { display: none; }
    .mobile-top-actions { display: none; }
    .logo { margin: 0; }
}

/* ========== 侧边抽屉 ========== */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.drawer-overlay.show {
    opacity: 1;
    visibility: visible;
}

.drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 82%;
    max-width: 320px;
    background: #f5f5f7;
    z-index: 999;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 12px 0 30px;
    -webkit-overflow-scrolling: touch;
}
.drawer.open { transform: translateX(0); }

.drawer::-webkit-scrollbar { width: 0; }

/* 用户信息区 */
.drawer-user {
    background: #fff;
    border-radius: 16px;
    margin: 8px 12px 12px;
    padding: 16px;
}
.drawer-user-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}
.drawer-user-link > svg {
    color: #ccc;
    flex-shrink: 0;
}
.drawer-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.drawer-avatar-text {
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
}
.drawer-user-info { flex: 1; min-width: 0; }
.drawer-nickname {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 2px;
}
.drawer-rank {
    font-size: 10px;
    padding: 1px 6px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 8px;
    font-weight: 600;
}
.drawer-username {
    font-size: 12px;
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drawer-stats {
    display: flex;
    gap: 24px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(0,0,0,0.05);
}
.drawer-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    flex: 1;
}
.drawer-stat strong {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
}
.drawer-stat span {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 2px;
}

/* 分组 */
.drawer-group {
    background: #fff;
    border-radius: 16px;
    margin: 0 12px 12px;
    overflow: hidden;
}
.drawer-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 18px;
    font-size: 15px;
    color: var(--text);
    text-decoration: none;
    transition: background 0.15s;
    position: relative;
}
.drawer-item:active { background: #f5f5f5; }
.drawer-item svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: #333;
    stroke-width: 1.8;
}
.drawer-item span {
    flex: 1;
    text-align: left;
}
.drawer-badge {
    background: #ff2e4d;
    color: #fff;
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

/* 开关样式 */
.settings-toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 4px;
    font-size: 15px;
    color: var(--text);
}
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
    flex-shrink: 0;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 28px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.switch input:checked + .slider {
    background-color: var(--primary);
}
.switch input:checked + .slider:before {
    transform: translateX(20px);
}

/* 关闭横幅后隐藏上下横幅 */
body.banner-hidden .marquee-banner {
    display: none !important;
}

@media (max-width: 480px) {
    .theme-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .theme-card {
        padding: 12px;
    }
    .theme-color {
        width: 22px;
        height: 22px;
    }
}

/* ========== 小红书个人主页 ========== */
.profile-hero {
    background: linear-gradient(135deg, #d4a373 0%, #8b6f47 50%, #3d2f1f 100%);
    border-radius: 0 0 20px 20px;
    padding: 16px 20px 24px;
    color: #fff;
    margin: -16px -16px 16px;
    position: relative;
    overflow: hidden;
}
.profile-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.15), transparent 60%);
    pointer-events: none;
}
.profile-top-bar {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}
.profile-menu-btn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
}
.profile-menu-btn svg { width: 24px; height: 24px; }

.profile-info-row {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 1;
    margin-bottom: 16px;
}
.profile-avatar-wrap {
    flex-shrink: 0;
    text-decoration: none;
}
.profile-avatar-img {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.4);
    background: #fff;
}
.profile-avatar-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    color: #fff;
    font-size: 10px;
    gap: 2px;
}
.profile-avatar-placeholder svg { width: 28px; height: 28px; }
.profile-avatar-placeholder span { line-height: 1; }

.profile-info-text {
    flex: 1;
    min-width: 0;
    color: #fff;
}
.profile-name-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.profile-name {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}
.profile-edit-btn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    opacity: 0.9;
}
.profile-edit-btn svg { width: 16px; height: 16px; }
.profile-xhsid {
    font-size: 12px;
    opacity: 0.85;
    display: flex;
    align-items: center;
    gap: 4px;
}
.copy-id-btn {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0;
    opacity: 0.8;
    display: flex;
    align-items: center;
}
.copy-id-btn:hover { opacity: 1; }

.profile-stats {
    display: flex;
    gap: 24px;
    position: relative;
    z-index: 1;
}
.profile-stat {
    display: flex;
    align-items: baseline;
    gap: 4px;
}
.profile-stat strong {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}
.profile-stat span {
    font-size: 13px;
    color: rgba(255,255,255,0.85);
}

/* 快捷卡片 */
.profile-quick-actions {
    margin-bottom: 16px;
}
.quick-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}
.quick-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.quick-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255,46,77,0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.quick-icon svg { width: 20px; height: 20px; }
.quick-text { flex: 1; }
.quick-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}
.quick-desc {
    font-size: 12px;
    color: var(--text-light);
}

/* 编辑面板 */
.edit-panel {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-md);
}
.edit-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}
.edit-panel-close {
    background: #f0f0f0;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}
.edit-form .form-group { margin-bottom: 12px; }
.checkin-box-small {
    background: rgba(255,46,77,0.05);
    border-radius: 10px;
    padding: 14px;
    text-align: center;
}
.checkin-box-small h4 { font-size: 14px; margin-bottom: 8px; color: var(--primary); }

/* Tab 栏 */
.profile-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #fff;
    border-radius: 14px 14px 0 0;
    padding: 0 12px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    scrollbar-width: none;
}
.profile-tabs::-webkit-scrollbar { display: none; }
.profile-tab {
    background: transparent;
    border: none;
    padding: 14px 12px;
    font-size: 15px;
    color: var(--text-light);
    cursor: pointer;
    position: relative;
    font-weight: 500;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}
.profile-tab svg { opacity: 0.7; }
.profile-tab.active {
    color: var(--text);
    font-weight: 700;
}
.profile-tab.active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
}
.profile-tab-icon {
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 12px;
    margin-left: auto;
    display: flex;
    align-items: center;
}
.profile-tab-icon svg { width: 18px; height: 18px; }

/* Tab 内容 */
.profile-tab-content {
    min-height: 300px;
}
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}
.empty-state p {
    color: var(--text-secondary);
    font-size: 15px;
    margin: 20px 0;
}
.empty-state .btn {
    padding: 8px 28px;
    border-radius: 20px;
    background: #fff;
    color: var(--text);
    border: 1px solid #ddd;
    box-shadow: none;
}
.empty-state .btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
}

@media (max-width: 480px) {
    .profile-hero {
        padding: 12px 16px 20px;
        margin: -12px -12px 12px;
    }
    .profile-avatar-img { width: 68px; height: 68px; }
    .profile-name { font-size: 18px; }
    .profile-stat strong { font-size: 16px; }
    .profile-stat span { font-size: 12px; }
    .profile-tab { font-size: 14px; padding: 12px 10px; }
}

/* ========== 个人主页背景图 ========== */
.profile-hero {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--bg);
    padding: 16px 16px 24px;
    margin-bottom: 16px;
    transition: background 0.3s;
}

.profile-hero.has-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.25), rgba(0,0,0,0.5));
    z-index: 0;
    pointer-events: none;
}

.profile-hero.has-cover .profile-top-bar,
.profile-hero.has-cover .profile-info-row,
.profile-hero.has-cover .profile-stats {
    position: relative;
    z-index: 1;
}

.profile-hero.has-cover .profile-name,
.profile-hero.has-cover .profile-xhsid,
.profile-hero.has-cover .profile-stat strong,
.profile-hero.has-cover .profile-stat span {
    color: #fff;
}

.profile-hero.has-cover .profile-name {
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.profile-hero.has-cover .profile-stat strong,
.profile-hero.has-cover .profile-stat span {
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* 顶部栏布局 */
.profile-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    min-height: 32px;
}

.profile-menu-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text);
    width: 32px;
    height: 32px;
    padding: 4px;
    border-radius: 50%;
    transition: background 0.2s;
}
.profile-menu-btn:hover { background: rgba(0,0,0,0.05); }
.profile-menu-btn svg { width: 20px; height: 20px; }

.profile-hero.has-cover .profile-menu-btn {
    background: rgba(0,0,0,0.3);
    color: #fff;
}
.profile-hero.has-cover .profile-menu-btn:hover {
    background: rgba(0,0,0,0.5);
}

/* 背景图编辑按钮 */
.profile-cover-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(0,0,0,0.05);
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 16px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-weight: 500;
}
.profile-cover-edit-btn:hover {
    background: rgba(255,46,77,0.1);
    color: var(--primary);
}
.profile-hero.has-cover .profile-cover-edit-btn {
    background: rgba(255,255,255,0.2);
    color: #fff;
}
.profile-hero.has-cover .profile-cover-edit-btn:hover {
    background: rgba(255,255,255,0.35);
}

/* 头像 */
.profile-avatar-wrap {
    display: inline-block;
    position: relative;
}
.profile-avatar-img {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.profile-avatar-placeholder {
    background: var(--primary-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--primary);
    font-size: 10px;
    font-weight: 600;
}
.profile-avatar-placeholder svg { width: 26px; height: 26px; }

/* 信息行 */
.profile-info-row {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

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

.profile-name-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.profile-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-edit-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    padding: 4px;
    border-radius: 50%;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}
.profile-edit-btn svg { width: 16px; height: 16px; }
.profile-edit-btn:hover { color: var(--primary); background: rgba(255,46,77,0.1); }

.profile-xhsid {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-light);
    background: rgba(0,0,0,0.03);
    padding: 4px 10px;
    border-radius: 12px;
}
.profile-hero.has-cover .profile-xhsid {
    background: rgba(255,255,255,0.15);
}
.copy-id-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: inherit;
    padding: 2px;
    display: inline-flex;
}

/* 数据统计 */
.profile-stats {
    display: flex;
    gap: 28px;
    padding: 12px 0 0;
}
.profile-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.profile-stat strong {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}
.profile-stat span {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
}

/* 背景图预览 */
.cover-preview {
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.06);
}
.cover-preview img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

/* 编辑面板（保证背景面板在顶栏下） */
.cover-panel {
    margin-bottom: 16px;
}

@media (max-width: 480px) {
    .profile-avatar-img {
        width: 72px;
        height: 72px;
    }
    .profile-name { font-size: 18px; }
    .profile-stats { gap: 20px; }
    .profile-stat strong { font-size: 16px; }
}