/* ==================== 全局变量与重置 ==================== */
:root {
  --primary: #6C5CE7;
  --primary-light: #A29BFE;
  --primary-dark: #5A4BD1;
  --primary-bg: rgba(108, 92, 231, 0.06);
  --text-primary: #2D3436;
  --text-secondary: #636E72;
  --text-muted: #B2BEC3;
  --bg-white: #FFFFFF;
  --bg-page: #F8F9FA;
  --border: #E8ECF1;
  --border-light: #F0F2F5;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: all 0.25s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input { font-family: inherit; outline: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==================== 顶部导航栏 ==================== */
.header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.95);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text-primary);
}

/* 百灵鸟 LOGO 图片 */
.logo-img {
  height: 80px;
  width: auto;
  flex-shrink: 0;
  object-fit: contain;
}

/* LOGO 文字组：站名 + 网址 + 副标题 */
.logo-text-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
  justify-content: center;
  align-items: flex-start;   /* 三行文字左对齐 */
}

.logo-text {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.3;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  white-space: nowrap;
}

.logo-url {
  font-size: 13px;
  color: #666;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.logo-slogan {
  font-size: 12px;
  color: #999;
  letter-spacing: 1px;
  white-space: nowrap;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 统一按钮风格：所有右上角按钮完全一致 */
.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 34px;
  padding: 0 14px;
  border-radius: 20px;
  font-size: 13px;
  line-height: 1;
  color: #fff;
  background: linear-gradient(135deg, #6C5CE7, #5A4BD1);
  transition: var(--transition);
  white-space: nowrap;
  border: none;
  box-sizing: border-box;
  vertical-align: middle;
  flex-shrink: 0;
}

.nav-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(108,92,231,0.35);
}

/* 首页按钮：与其它按钮风格完全一致 */
.nav-btn-home {
  /* 默认继承 .nav-btn 的紫色渐变，可通过后台 style_class 覆盖 */
}

/* 按钮预设颜色风格（后台 style_class 字段可配置） */
.nav-btn-purple  { background: linear-gradient(135deg, #6C5CE7, #5A4BD1); }
.nav-btn-green   { background: linear-gradient(135deg, #00B894, #00A381); }
.nav-btn-orange  { background: linear-gradient(135deg, #F59E0B, #D97706); }
.nav-btn-red     { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.nav-btn-blue    { background: linear-gradient(135deg, #0984E3, #0770C4); }
.nav-btn-pink    { background: linear-gradient(135deg, #F093FB, #D654D8); }
.nav-btn-teal    { background: linear-gradient(135deg, #00CEC9, #00B5B0); }

/* 带颜色风格的 hover 阴影跟随变色 */
.nav-btn-purple:hover  { box-shadow: 0 4px 15px rgba(108,92,231,0.35); }
.nav-btn-green:hover   { box-shadow: 0 4px 15px rgba(0,184,148,0.35); }
.nav-btn-orange:hover  { box-shadow: 0 4px 15px rgba(245,158,11,0.35); }
.nav-btn-red:hover     { box-shadow: 0 4px 15px rgba(231,76,60,0.35); }
.nav-btn-blue:hover    { box-shadow: 0 4px 15px rgba(9,132,227,0.35); }
.nav-btn-pink:hover    { box-shadow: 0 4px 15px rgba(240,147,251,0.35); }
.nav-btn-teal:hover    { box-shadow: 0 4px 15px rgba(0,206,201,0.35); }

/* 登录后的用户按钮：与 nav-btn 风格完全一致（同色同高） */
.nav-btn-user {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 34px;
  padding: 0 14px;
  border-radius: 20px;
  font-size: 13px;
  line-height: 1;
  color: #fff;
  background: linear-gradient(135deg, #6C5CE7, #5A4BD1);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  border: none;
  box-sizing: border-box;
  vertical-align: middle;
  flex-shrink: 0;
}
.nav-btn-user:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(108,92,231,0.35);
}
.nav-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(255,255,255,0.7);
}
.nav-nickname {
  font-weight: 500;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 导航栏额度按钮 */
.nav-btn-quota {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 20px;
  font-size: 12px;
  color: #fff;
  background: linear-gradient(135deg, #F59E0B, #D97706);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  font-weight: 500;
}
.nav-btn-quota:hover { opacity: 0.9; transform: translateY(-1px); }
.nav-btn-vip {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 20px;
  font-size: 12px;
  color: #fff;
  background: linear-gradient(135deg, #F093FB, #D654D8);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  font-weight: 600;
}
.nav-btn-vip:hover { opacity: 0.9; transform: translateY(-1px); }

/* 用户下拉菜单 */
.nav-user-dropdown {
  display: none;
  position: fixed;
  z-index: 1000;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.15);
  min-width: 140px;
  padding: 6px 0;
  overflow: hidden;
}
.nav-user-dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.15s;
}
.nav-user-dropdown a:hover { background: #f3f4f6; }

.nav-icon { font-size: 15px; }

/* 用户信息区 */
.user-info {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 2px 2px;
  border-radius: 24px;
  cursor: pointer;
  transition: var(--transition);
  background: #f5f3ff;
}

.user-info:hover { background: var(--border); }

.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #07C160;
  box-shadow: 0 2px 8px rgba(7,193,96,0.2);
}

.nickname {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a2e;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 140px;
  overflow: hidden;
  z-index: 200;
}

.user-info:hover .dropdown-menu { display: block; }

.dropdown-menu a {
  display: block;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  transition: var(--transition);
}

.dropdown-menu a:hover {
  background: var(--primary-bg);
  color: var(--primary);
}

/* ==================== 搜索区域 ==================== */
.search-section {
  padding: 40px 0 30px;
  background: linear-gradient(135deg, #f5f3ff 0%, #fff 100%);
}

.search-box {
  display: flex;
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg-white);
  border: 2px solid var(--primary);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(108,92,231,0.15);
  transition: var(--transition);
}

.search-box:focus-within {
  box-shadow: 0 6px 30px rgba(108,92,231,0.25);
  transform: translateY(-1px);
}

.search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 18px;
}

.search-icon { font-size: 20px; margin-right: 10px; opacity: 0.5; }

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

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

.search-btn {
  padding: 16px 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2px;
  transition: var(--transition);
}

.search-btn:hover { opacity: 0.9; }

/* 搜索建议 */
.search-suggestions {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 160px;
  width: 640px;
  max-height: 300px;
  overflow-y: auto;
  background: var(--bg-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 99;
}

.suggestion-item {
  padding: 12px 20px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: var(--primary-bg); color: var(--primary); }

/* 热门搜索 */
.hot-searches {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.hot-searches .hot-label { color: var(--text-secondary); }
.hot-searches .hot-tag {
  display: inline-block;
  margin: 4px 6px 0;
  padding: 2px 10px;
  background: var(--bg-white);
  border-radius: 12px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}
.hot-searches .hot-tag:hover { color: var(--primary); background: var(--primary-bg); }

/* ==================== 筛选区域 ==================== */
.filter-section {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
}

.filter-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  padding: 20px 0 12px;
}

.filter-row {
  display: flex;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-light);
}

.filter-row:last-child { border-bottom: none; }

.filter-label {
  width: 80px;
  flex-shrink: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 34px;
  font-weight: 500;
}

.filter-options {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-opt {
  padding: 5px 16px;
  border-radius: 18px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-page);
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.filter-opt:hover {
  color: var(--primary);
  border-color: var(--primary-light);
  background: var(--primary-bg);
}

.filter-opt.active {
  background: var(--primary);
  color: #fff;
  font-weight: 500;
  border-color: var(--primary);
}

.filter-opt.opt-highlight.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.expand-toggle {
  color: var(--text-muted) !important;
  font-size: 12px;
  padding: 5px 10px !important;
  background: transparent !important;
}
.expand-toggle:hover { color: var(--primary) !important; }

.filter-options-extra {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-left: 80px;
  margin-top: -8px;
}

/* ==================== 资源列表区域 ==================== */
.main-content {
  padding: 24px 0 60px;
  min-height: 60vh;
}

.result-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.result-count {
  font-size: 14px;
  color: var(--text-secondary);
}

.sort-options {
  display: flex;
  gap: 4px;
}

.sort-btn {
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: var(--transition);
}

.sort-btn:hover { color: var(--primary); }
.sort-btn.active {
  background: var(--primary-bg);
  color: var(--primary);
  font-weight: 500;
}

/* 资源卡片网格（网盘链接模式：文字为主，用较宽布局） */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 900px) {
  .resource-grid { grid-template-columns: repeat(1, 1fr); gap: 12px; }
}

.resource-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border-light);
  position: relative;
}

.resource-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.card-preview {
  aspect-ratio: 3/4;
  background: #fafbfc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  border-bottom: 1px solid var(--border-light);
}

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

.card-preview .preview-placeholder {
  width: 85%;
  height: 90%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.8;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.preview-placeholder .line {
  height: 8px;
  background: #eee;
  border-radius: 2px;
}
.preview-placeholder .line.short { width: 60%; }
.preview-placeholder .line.medium { width: 80%; }
.preview-placeholder .line.wide { width: 95%; }

/* Word图标角标 */
.card-badge-w {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  background: #2B579A;
  color: #fff;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  font-family: 'Segoe UI', sans-serif;
}

/* VIP标识 */
.card-vip-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #7a5c00;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

.card-info {
  padding: 12px;
}

.card-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

.card-score {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: #FF6B6B;
}

.card-pages {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 3px;
}

/* 骨架屏 */
.skeleton-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-img {
  aspect-ratio: 3/4;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.skeleton-text {
  height: 14px;
  background: #f0f0f0;
  border-radius: 4px;
  margin: 12px 12px 8px;
}
.skeleton-text.short { width: 60%; margin-top: 8px; }

/* ==================== 网盘链接模式卡片（仿截图样式） ==================== */
.link-mode-card {
  background: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  transition: var(--transition);
  border: 1px solid var(--border-light);
  position: relative;
}

.link-mode-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

/* 链接卡片中的封面图：限高缩略图，顶边铺满并圆角对齐 */
.link-mode-card .card-preview {
  margin: -18px -20px 14px;
  border-bottom: none;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  aspect-ratio: auto;
  height: 150px;
}
.link-mode-card .card-preview img { height: 150px; }

/* ===== 资源详情弹窗（宝贝详情式） ===== */
.detail-cover {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--radius-md);
  background: #f5f6f8;
  display: block;
  margin-top: 4px;
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 13px;
  color: var(--text-muted);
  margin: 14px 0 4px;
}
.detail-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}
.detail-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}
.detail-desc {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
}

.link-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.link-card-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 45px;
  word-break: break-all;
}

/* 网盘按钮行 */
.link-card-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
}

.dl-btn b {
  color: inherit;
  margin-left: 2px;
}

/* 百度网盘 - 橙色 */
.dl-baidu {
  background: #FFF5EB;
  color: #E67E22;
  border-color: #FAD6A5;
}
.dl-baidu:hover {
  background: #E67E22;
  color: #fff;
  border-color: #E67E22;
}

/* 夸克网盘 - 灰色/蓝紫 */
.dl-quark {
  background: #F4F5F7;
  color: #555;
  border-color: #E0E2E7;
}
.dl-quark:hover {
  background: #444;
  color: #fff;
  border-color: #444;
}

/* 迅雷网盘 - 红橙色（截图里高亮的那个） */
.dl-xunlei {
  background: #FEF0EF;
  color: #D63031;
  border-color: #F5C6CB;
}
.dl-xunlei:hover {
  background: #D63031;
  color: #fff;
  border-color: #D63031;
}

/* 阿里云盘 - 灰色 */
.dl-aliyun {
  background: #F4F5F7;
  color: #666;
  border-color: #E0E2E7;
}
.dl-aliyun:hover {
  background: #666;
  color: #fff;
  border-color: #666;
}

.no-link-hint {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* 加载更多 */
.load-more-wrap { text-align: center; padding: 30px 0; }
.load-more-btn {
  padding: 12px 48px;
  border-radius: 24px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 14px;
  transition: var(--transition);
}
.load-more-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-bg);
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}
.empty-icon { font-size: 64px; margin-bottom: 16px; }
.empty-state p { font-size: 16px; }

/* 分页 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 30px 0;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.page-btn.disabled { opacity: 0.4; cursor: not-allowed; }

/* ==================== 弹窗通用样式 ==================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 420px;
  width: 92%;
  position: relative;
  animation: slideUp 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.small-modal { max-width: 360px; }
.member-modal { max-width: 480px; }

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 24px;
  color: var(--text-muted);
  background: none;
  line-height: 1;
  padding: 4px;
  transition: var(--transition);
}
.modal-close:hover { color: var(--text-primary); transform: rotate(90deg); }

.modal-title {
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 24px;
  color: var(--text-primary);
}

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

/* ==================== 登录/注册弹窗（左右分栏） ==================== */
.login-modal-split {
  max-width: 720px !important;
  padding: 0 !important;
  display: flex;
  overflow: hidden;
}

.login-modal-split .modal-close {
  z-index: 10;
}

/* 左侧 - 微信注册 */
.login-left {
  width: 260px;
  background: linear-gradient(180deg, #f8f9ff 0%, #eef1fb 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  flex-shrink: 0;
  border-right: 1px solid var(--border-light);
}

.login-side-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.login-side-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* 右侧 - 手机号登录/注册 */
.login-right {
  flex: 1;
  padding: 32px 36px;
  min-width: 0;
}

/* 右侧 tab 样式 */
.login-modal-split .login-tabs {
  margin-bottom: 24px;
  background: var(--bg-page);
  border-radius: 10px;
  padding: 4px;
  display: flex;
}

.login-modal-split .tab-btn {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  text-align: center;
}

.login-modal-split .tab-btn.active {
  background: var(--bg-white);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.login-modal-split .login-panel { text-align: left; }

/* 验证码行 */
.sms-row {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.sms-input {
  flex: 1;
  min-width: 0;
  margin-bottom: 0 !important;
}

.sms-btn {
  flex-shrink: 0;
  padding: 14px 16px;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  background: transparent;
  border: 1px solid var(--primary);
  cursor: pointer;
  transition: var(--transition);
}

.sms-btn:hover { background: var(--primary-bg); }
.sms-btn:disabled { color: var(--text-muted); border-color: var(--border); cursor: not-allowed; }

/* 注册绿色按钮 */
.reg-submit-btn {
  background: linear-gradient(135deg, #00B894, #00A085) !important;
}
.reg-submit-btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* 协议勾选 */
.agreement-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1.5;
}

.agreement-check input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}

.agreement-check a {
  color: var(--primary);
  font-weight: 500;
}

.agreement-check a:hover { text-decoration: underline; }

.qr-code-area {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.qr-placeholder {
  width: 180px;
  height: 180px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
  gap: 8px;
}
.qr-placeholder p:first-child { font-size: 28px; }
.qr-hint { font-size: 12px !important; }

/* ==================== 微信快捷登录（纯微信版） ==================== */
.wx-login-modal {
  max-width: 400px !important;
  padding: 40px 36px !important;
  text-align: center;
}

.wx-login-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.wx-login-sub {
  font-size: 14px;
  color: #888;
  margin-bottom: 32px;
}

.wx-login-area {
  width: 200px;
  height: 200px;
  margin: 0 auto 20px;
  border: 2px solid #07C160;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: linear-gradient(180deg, #f0faf5 0%, #e8f8ef 100%);
}
.wx-login-area:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 20px rgba(7, 193, 96, 0.25);
  border-color: #06ae56;
}
.wx-login-area:active {
  transform: scale(0.98);
}

.wx-icon-circle {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #07C160, #06ae56);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 3px 10px rgba(7, 193, 96, 0.3);
}

.wx-icon-text {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
}

.wx-login-hint {
  font-size: 13px;
  color: #07C160;
  font-weight: 500;
}

.wx-loading {
  text-align: center;
  padding: 20px 0;
}
.wx-loading p {
  color: #666;
  font-size: 14px;
  margin-top: 10px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e0e0e0;
  border-top-color: #07C160;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

.wx-divider {
  display: flex;
  align-items: center;
  margin: 20px 0 12px;
  color: #ccc;
  font-size: 12px;
}
.wx-divider::before,
.wx-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e5e5;
}
.wx-divider span {
  padding: 0 12px;
}

.wx-register-hint {
  text-align: center;
  font-size: 13px;
  color: #666;
  line-height: 1.6;
}
.wx-register-hint strong {
  color: #07C160;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  margin-bottom: 12px;
  transition: var(--transition);
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }

.submit-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  transition: var(--transition);
  margin-top: 4px;
}
.submit-btn:hover { opacity: 0.9; transform: translateY(-1px); }

.login-hint {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

/* 社群/推广弹窗 */
.community-desc {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-top: 12px;
}

.promo-content { font-size: 14px; color: var(--text-secondary); line-height: 1.8; }
.promo-contact { background: var(--bg-page); border-radius: var(--radius-sm); padding: 16px; margin: 16px 0; }
.promo-contact p { margin: 6px 0; }
.promo-note { font-weight: 600; color: var(--text-primary); margin-top: 12px; }
.promo-content ul { padding-left: 20px; margin-top: 8px; }
.promo-content li { margin: 4px 0; }

/* 会员中心 */
.member-content { min-height: 200px; }
.login-prompt { text-align: center; color: var(--text-muted); padding: 40px 0; }

.member-info { text-align: center; }
.member-avatar { width: 72px; height: 72px; border-radius: 50%; margin-bottom: 12px; }
.member-nickname { font-size: 18px; font-weight: 600; }
.member-level { 
  display: inline-block; margin-top: 6px; padding: 3px 14px; 
  background: linear-gradient(135deg, #FFD700, #FFA500); 
  color: #7a5c00; border-radius: 12px; font-size: 12px; font-weight: 600;
}
.member-stats { display: flex; justify-content: center; gap: 30px; margin: 20px 0; text-align: center; }
.stat-num { font-size: 24px; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.member-plans { display: flex; gap: 12px; margin-top: 20px; }
.plan-card {
  flex: 1;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 12px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.plan-card:hover { border-color: var(--primary); }
.plan-card.recommended { border-color: var(--primary); background: var(--primary-bg); }
.plan-name { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.plan-price { font-size: 28px; font-weight: 700; color: #FF6B6B; }
.plan-price span { font-size: 13px; font-weight: 400; color: var(--text-muted); }
.plan-features { font-size: 12px; color: var(--text-secondary); margin-top: 10px; line-height: 1.8; }
.plan-btn {
  margin-top: 14px;
  padding: 8px 24px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  background: var(--primary);
  color: #fff;
  transition: var(--transition);
}
.plan-btn:hover { opacity: 0.9; }

/* ==================== 页脚 ==================== */
.footer {
  background: var(--text-primary);
  color: rgba(255,255,255,0.6);
  padding: 32px 0;
  text-align: center;
}

.footer-links { margin-bottom: 12px; }
.footer-links a {
  color: rgba(255,255,255,0.6);
  margin: 0 16px;
  font-size: 14px;
  transition: var(--transition);
}
.footer-links a:hover { color: #fff; }

.copyright { font-size: 13px; }

/* ==================== 响应式 ==================== */
@media (max-width: 768px) {
  .header-nav { gap: 4px; }
  .nav-btn { padding: 6px 10px; font-size: 12px; }
  .nav-btn span:not(.nav-icon) { display: none; }

  .search-section { padding: 24px 0 16px; }
  .search-btn { padding: 14px 24px; }

  .filter-label { width: 56px; font-size: 13px; }
  .filter-opt { padding: 4px 12px; font-size: 12px; }
  .filter-options-extra { padding-left: 56px; }

  .modal { padding: 24px 20px; margin: 16px; }

  /* 登录弹窗移动端：左右变上下 */
  .login-modal-split {
    max-width: 92% !important;
    flex-direction: column;
  }

  .login-left {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    padding: 28px 20px;
  }

  .login-right {
    padding: 24px 20px;
  }
}

/* ==================== VIP会员定价页（仿截图样式） ==================== */
.vip-page-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 40px 20px;
}

.vip-page {
  background: #fff;
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 1100px;
  padding: 48px 40px 40px;
  position: relative;
  animation: vipFadeIn 0.3s ease;
}

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

.vip-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 28px;
  color: var(--text-muted);
  background: none;
  cursor: pointer;
  transition: var(--transition);
}
.vip-close:hover { color: var(--text-primary); }

.vip-title {
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: #2D3436;
  margin-bottom: 8px;
}

.vip-subtitle {
  text-align: center;
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 36px;
}

.vip-plans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

@media (max-width: 900px) {
  .vip-plans { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .vip-plans { grid-template-columns: 1fr; }
  .vip-page { padding: 32px 20px; }
}

/* 单个VIP卡片（仿截图：蓝色头部+白色身体+推荐标签） */
.vip-card {
  border: 2px solid #E8ECF1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.vip-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.vip-card.recommended {
  border-color: var(--primary);
  box-shadow: 0 4px 24px rgba(108,92,231,0.18);
  transform: scale(1.03);
}

.vip-card.recommended:hover { transform: scale(1.03) translateY(-4px); }

/* 推荐标签 */
.vip-badge-recommended {
  position: absolute;
  top: 14px;
  right: -28px;
  background: linear-gradient(135deg, #FDCB6E, #F39C12);
  color: #7D6608;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 36px;
  transform: rotate(45deg);
  z-index: 2;
}

/* 卡片蓝色头部 */
.vip-card-header {
  background: linear-gradient(135deg, #2E86DE, #1B6BB5);
  color: #fff;
  text-align: center;
  padding: 22px 16px 18px;
}

.vip-card.recommended .vip-card-header {
  background: linear-gradient(135deg, #2E86DE, #1B4F9C);
}

.vip-card-name {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 4px;
}

.vip-card-duration {
  font-size: 12px;
  opacity: 0.85;
}

/* 价格区 */
.vip-card-price {
  text-align: center;
  padding: 20px 16px 12px;
}

.vip-price-value {
  font-size: 38px;
  font-weight: 800;
  color: #2E86DE;
  line-height: 1;
}

.vip-price-unit {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 400;
}

.vip-price-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* 权益列表 */
.vip-card-features {
  flex: 1;
  padding: 0 20px;
  list-style: none;
}

.vip-card-features li {
  padding: 7px 0;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px dashed var(--border-light);
}

.vip-card-features li:last-child { border-bottom: none; }

.vip-check { color: #00B894; font-weight: 700; flex-shrink: 0; }

/* 开通按钮 */
.vip-card-action {
  padding: 16px 20px 20px;
}

.vip-buy-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #2E86DE, #1B6BB5);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.vip-buy-btn:hover {
  opacity: 0.9;
  box-shadow: 0 4px 15px rgba(46,134,222,0.35);
}

.vip-note {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* ==================== 网站介绍弹窗 ==================== */
.about-modal {
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

.about-content { padding: 8px 0; }

.about-section {
  margin-bottom: 24px;
}

.about-section h3 {
  font-size: 16px;
  color: var(--primary);
  margin-bottom: 10px;
}

.about-section p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.about-list {
  list-style: none;
  padding: 0;
}

.about-list li {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 6px 0;
  line-height: 1.6;
}

/* ==================== 下载链接展示（详情弹窗内） ==================== */
.detail-dl-zone { margin-top: 18px; }
.dl-hint {
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-page);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin: 0 0 4px;
}
.detail-links { font-size: 14px; }
.link-list { display: flex; flex-direction: column; gap: 10px; }
.link-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-page);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}
.link-name {
  font-weight: 600;
  color: var(--primary);
  min-width: 72px;
}
.link-url {
  flex: 1;
  min-width: 160px;
  word-break: break-all;
  color: var(--text-primary);
  font-size: 13px;
}
.link-code { color: #E67E22; font-size: 13px; }
.quota-tip {
  margin-top: 12px;
  padding: 8px 12px;
  background: #EAFBF0;
  color: #1E8E4E;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

/* ==================== 推广分享弹窗 ==================== */
.promo-intro { font-size: 14px; color: var(--text-secondary); line-height: 1.8; margin-bottom: 14px; }
.promo-share-box {
  background: var(--bg-page);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-top: 6px;
}
.promo-share-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.promo-share-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.7; margin: 0 0 14px; }
.promo-link-row { display: flex; gap: 8px; margin-bottom: 12px; }
.promo-link-input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: #fff;
  color: var(--text-primary);
}
.promo-copy-btn {
  flex-shrink: 0;
  padding: 10px 18px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
}
.promo-copy-btn:hover { background: var(--primary-dark); }
.promo-claim-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #FD79A8, #E84393);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  transition: var(--transition);
}
.promo-claim-btn:hover:not(:disabled) { opacity: 0.9; transform: translateY(-1px); }
.promo-claim-btn:disabled { opacity: 0.6; cursor: default; }
.promo-remaining { font-size: 13px; color: var(--text-primary); font-weight: 600; margin: 0 0 4px; }
.promo-invite-stats { font-size: 13px; color: #16a34a; margin: 6px 0; padding: 8px 12px; background: #f0fdf4; border-radius: 8px; border: 1px solid #bbf7d0; }
.promo-tip { font-size: 12px; color: var(--text-muted); margin: 0; }

/* ==================== 额度耗尽弹窗 ==================== */
.quota-modal-body { display: flex; flex-direction: column; gap: 10px; }
.quota-modal-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin: 0 0 4px; }
.quota-opt-btn {
  width: 100%;
  padding: 13px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  transition: var(--transition);
}
.quota-opt-btn.vip { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; }
.quota-opt-btn.vip:hover { opacity: 0.9; transform: translateY(-1px); }
.quota-opt-btn.promo { background: linear-gradient(135deg, #FD79A8, #E84393); color: #fff; }
.quota-opt-btn.promo:hover { opacity: 0.9; transform: translateY(-1px); }
.quota-opt-btn.ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.quota-opt-btn.ghost:hover { background: var(--bg-page); }

/* ==================== 顶部额度角标 ==================== */
.quota-badge {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ==================== 轻提示 Toast ==================== */
.app-toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%) translateY(20px);
  background: rgba(45, 52, 54, 0.92);
  color: #fff;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 80vw;
  text-align: center;
}
.app-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.card-preview {
  display: none !important;
}

/* ===== 登录 modal 必须显示在所有其它 modal 之上（修复未登录下载时登录框被资源详情遮挡）===== */
#login-modal { z-index: 100000 !important; }
