/* ===== CSS变量：明亮模式（默认） ===== */
:root {
  --bg-primary: #FBFBFD;          /* 象牙白主背景 */
  --bg-secondary: #FFFFFF;        /* 卡片白 */
  --bg-tertiary: #F5F5F7;         /* 次级浅米色 */
  --bg-hover: #F0F0F2;
  
  --text-primary: #1D1D1F;        /* 主文字-炭灰 */
  --text-secondary: #6E6E73;      /* 次级文字 */
  --text-tertiary: #86868B;       /* 提示文字 */
  --text-on-dark: #F8F6F0;        /* 深色背景上的文字 */
  
  --accent-primary: #F37021;      /* 香槟金主色 */
  --accent-secondary: #FF8F1F;    /* 浅金棕 */
  --accent-light: #FFB453;        /* 淡金 */
  --accent-pale: #FFF1E0;         /* 极浅金米 */
  --accent-gold: #FF7A00;         /* 烫金色 */
  --accent-gold-light: #FF9A3C;   /* 浅金 */
  
  --border-light: #E8E8ED;
  --border-medium: #D2D2D7;
  
  --shadow-xs: none;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.1);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-round: 999px;
  
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  
  --tag-cssci: #1B4332;
  --tag-cssci-bg: #D8F3DC;
  --tag-cssci-ext: #2D6A4F;
  --tag-cssci-ext-bg: #E9F5EC;
  --tag-pku: #8B6914;
  --tag-pku-bg: #FFF8E1;
  --tag-dual: #C62828;
  --tag-dual-bg: #FFEBEE;
  --tag-ssci-q1: #0D47A1;
  --tag-ssci-q1-bg: #E3F2FD;
  --tag-ssci-q2: #1565C0;
  --tag-ssci-q2-bg: #E3F2FD;
  --tag-ssci-q3: #1976D2;
  --tag-ssci-q3-bg: #E3F2FD;
  --tag-ssci-q4: #42A5F5;
  --tag-ssci-q4-bg: #E3F2FD;
  --tag-ahci: #6A1B9A;
  --tag-ahci-bg: #F3E5F5;
  --tag-scie-q1: #1B5E20;
  --tag-scie-q1-bg: #E8F5E9;
  --tag-scopus: #E65100;
  --tag-scopus-bg: #FFF3E0;
  --tag-ei: #0D47A1;
  --tag-ei-bg: #E3F2FD;
  --tag-if: #E65100;
  --tag-if-bg: #FFF1E0;
  /* 专业期刊（行业好刊）标签配色 - 蓝灰系低调专业 */
  --tag-pro: #4A6FA5;
  --tag-pro-bg: #EDF2F8;
  --tag-pro-border: #C9D8EA;
  --tag-pro-card-bg: #FAFCFE;
  /* ABS 标签配色 - 金色系体现权威评级 */
  --tag-abs-4star: #B8860B;
  --tag-abs-4star-bg: #FFF8E1;
  --tag-abs-4: #D4A017;
  --tag-abs-4-bg: #FFF8E1;
  --tag-abs-3: #E8B923;
  --tag-abs-3-bg: #FFFDE7;
  --tag-abs-2: #FBC02D;
  --tag-abs-2-bg: #FFFDE7;
  --tag-abs-1: #FFD54F;
  --tag-abs-1-bg: #FFFDE7;
}

/* ===== 暗黑模式 ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #1A1A1D;
    --bg-secondary: #26262A;
    --bg-tertiary: #333338;
    --bg-hover: #3D3D42;
    
    --text-primary: #F2F3F5;
    --text-secondary: #C9CDD4;
    --text-tertiary: #86868B;
    --text-on-dark: #F2F3F5;
    
    --accent-primary: #FF7B2E;
    --accent-secondary: #FFA94D;
    --accent-light: #FFC280;
    --accent-pale: #3D2A1A;
    --accent-gold: #FFB74D;
    --accent-gold-light: #FFCC80;
    
    --border-light: #333338;
    --border-medium: #4A4A50;
    
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35), 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.5), 0 8px 20px rgba(0, 0, 0, 0.35);
  }
}

[data-theme="light"] {
  --bg-primary: #FBFBFD;
  --bg-secondary: #FFFFFF;
  --bg-tertiary: #F5F5F7;
  --bg-hover: #F0F0F2;
  --text-primary: #1D1D1F;
  --text-secondary: #6E6E73;
  --text-tertiary: #86868B;
  --text-on-dark: #F8F6F0;
  --accent-primary: #F37021;
  --accent-secondary: #FF8F1F;
  --accent-light: #FFB453;
  --accent-pale: #FFF1E0;
  --accent-gold: #FF7A00;
  --accent-gold-light: #FF9A3C;
  --border-light: #E8E8ED;
  --border-medium: #D2D2D7;
  --shadow-xs: none;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  --bg-primary: #1A1A1D;
  --bg-secondary: #26262A;
  --bg-tertiary: #333338;
  --bg-hover: #3D3D42;
  --text-primary: #F2F3F5;
  --text-secondary: #C9CDD4;
  --text-tertiary: #86868B;
  --text-on-dark: #F2F3F5;
  --accent-primary: #FF7B2E;
  --accent-secondary: #FFA94D;
  --accent-light: #FFC280;
  --accent-pale: #3D2A1A;
  --accent-gold: #FFB74D;
  --border-light: #333338;
  --border-medium: #4A4A50;
  --tag-pro: #A9C1E4;
  --tag-pro-bg: #2A3240;
  --tag-pro-border: #3E4A5C;
  --tag-pro-card-bg: #1F232A;
}

/* ===== 全局样式 ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  background: var(--bg-primary);
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding-bottom: 70px;
  transition: background-color var(--transition-base), color var(--transition-base);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

/* ===== 顶部导航 ===== */
.nav-top {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFFDF9 100%);
  color: var(--text-primary);
  padding: calc(16px + env(safe-area-inset-top)) 20px 14px;
  min-height: calc(66px + env(safe-area-inset-top));
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 12px rgba(243, 112, 33, 0.06), 0 1px 3px rgba(0, 0, 0, 0.03);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  box-sizing: border-box;
}
/* 深色模式：顶部导航（含刘海安全区）背景随主题变深色，并延伸覆盖到安全区 */
[data-theme="dark"] .nav-top {
  background: linear-gradient(180deg, #1A1A1D 0%, #1A1A1D 100%);
}
.nav-top .title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 17px;
  font-weight: 600;
  text-align: center;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
  box-sizing: border-box;
  min-width: 0;
  line-height: 1.2;
  pointer-events: none;
}
.nav-top .nav-actions,
.nav-top .nav-right,
.nav-top .share-btn,
.nav-top .num {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
}
.nav-top .lang-switch-btn {
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  max-width: 26px !important;
  flex: 0 0 auto;
}
.nav-top .back-btn {
  position: relative;
  flex: 0 0 auto;
  margin: 0 auto 0 0; /* 靠左，作为 flex 首项，跟随 nav-top 的 safe-area padding 自然下移，与标题/首页顶部留白一致 */
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-primary);
  border: none;
  background: transparent;
  transition: background var(--transition-fast);
  z-index: 10;
}
.nav-top .back-btn:active { background: var(--bg-tertiary); }

.nav-top .top-right-btns {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}
.nav-top .nav-actions .icon-btn,
.nav-top .top-right-btns .icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all var(--transition-fast);
}
.nav-top .nav-actions .icon-btn svg.icon {
  color: #fff;
}
.nav-top .icon-btn-lg {
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  max-width: 26px !important;
  font-size: 14px;
  flex: 0 0 auto;
}
.nav-top .icon-btn-lg svg.icon {
  width: 15px !important;
  height: 15px !important;
}
.nav-top .icon-btn:active {
  transform: scale(0.96);
  background: var(--bg-tertiary);
}
.nav-top .icon-btn svg.icon {
  color: var(--accent-primary);
}
.nav-top .lang-switch-btn {
  font-size: 11px;
  background: var(--accent-primary);
  color: white;
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-weight: 600;
  width: 26px;
  height: 26px;
  min-width: 26px;
  max-width: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.nav-top .lang-switch-btn:active {
  background: var(--accent-secondary);
  transform: scale(0.96);
}

/* ===== 中英文切换Tab ===== */
.lang-tabs {
  display: flex;
  background: var(--bg-secondary);
  padding: 16px 16px 8px;
  gap: 12px;
}
.lang-tab {
  flex: 1;
  text-align: center;
  padding: 18px 12px;
  border-radius: var(--radius-lg);
  background: var(--bg-tertiary);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
.lang-tab::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent-primary);
  transform: scaleX(0);
  transition: transform var(--transition-base);
}
.lang-tab.active {
  background: var(--bg-secondary);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transform: translateY(-2px);
}
.lang-tab.active::before {
  transform: scaleX(1);
}
.lang-tab:active {
  transform: scale(0.97);
}
.lang-icon { font-size: 26px; display: block; margin-bottom: 6px; }
.lang-icon-svg {
  width: 34px;
  height: 34px;
  display: block;
  margin: 0 auto 6px;
}
.lang-tab[data-lang="chinese"] .lang-icon-svg { color: #D64545; }
.lang-tab[data-lang="english"] .lang-icon-svg { color: #2E7DB8; }
.lang-tab[data-lang="professional"] .lang-icon-svg { color: #4A6FA5; }
/* 老板决定：专业期刊板块从首页移除，仅在查找页保留入口；此处隐藏首页卡片，JS/CSS/i18n逻辑保留待日后恢复 */
.lang-tab[data-lang="professional"] { display: none !important; }
.lang-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.lang-count {
  font-size: 11px;
  color: var(--text-tertiary);
}

/* ===== 搜索框 ===== */
.search-box {
  padding: 8px 16px 12px;
  background: var(--bg-secondary);
  position: relative;
}
.search-box input {
  width: 100%;
  padding: 12px 64px 12px 40px;
  border: none;
  border-radius: var(--radius-round);
  background: var(--bg-tertiary);
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-xs);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A8A8A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E/%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 14px center;
}
.search-box input:focus {
  background-color: var(--bg-secondary);
  box-shadow: 0 0 0 2px var(--accent-light), var(--shadow-sm);
}
.search-btn {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 14px;
  border: none;
  border-radius: 999px;
  background: var(--accent-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  z-index: 2;
}
.search-btn:active {
  opacity: 0.8;
}

/* ===== 热门搜索 ===== */
.hot-searches {
  padding: 0 16px 12px;
  background: var(--bg-secondary);
}
.hot-searches-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.hot-tag {
  padding: 6px 14px;
  border-radius: var(--radius-round);
  font-size: 12px;
  line-height: 1;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  white-space: nowrap;
  height: 28px;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.hot-tag:hover {
  background: var(--accent-pale);
  color: var(--accent-primary);
  border-color: var(--accent-light);
}
.hot-tag:nth-child(1) { background: #FFEBEE; color: #C62828; }
.hot-tag:nth-child(2) { background: #FFF3E0; color: #E65100; }
.hot-tag:nth-child(3) { background: #FFF9C4; color: #F57F17; }

/* ===== 搜索历史 ===== */
.search-history {
  background: var(--bg-secondary);
  padding: 0 16px 12px;
  display: none;
}
.search-history.show { display: block; }
.history-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.history-title { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.history-clear { font-size: 12px; color: var(--text-tertiary); cursor: pointer; }
.history-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.history-tag {
  padding: 5px 12px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-round);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}
.history-tag:hover {
  background: var(--accent-pale);
  color: var(--accent-primary);
}
.hot-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.hot-tag {
  padding: 5px 12px;
  background: linear-gradient(135deg, #FFF0E6, #FFE4D0);
  border-radius: var(--radius-round);
  font-size: 12px;
  color: #F37021;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 500;
  transition: all var(--transition-fast);
}
.hot-tag:hover {
  background: linear-gradient(135deg, #FFE4D0, #FFD4B0);
}
.hot-tag .hot-rank {
  display: inline-block;
  width: 16px; height: 16px;
  line-height: 16px;
  text-align: center;
  background: #F37021;
  color: white;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  margin-right: 4px;
  vertical-align: middle;
}
.hot-tag:nth-child(1) .hot-rank { background: #FF3B30; }
.hot-tag:nth-child(2) .hot-rank { background: #F37021; }
.hot-tag:nth-child(3) .hot-rank { background: #FF9500; }

/* ===== 筛选栏 ===== */
.filter-bar {
  display: flex;
  background: var(--bg-secondary);
  padding: 8px 12px;
  gap: 4px;
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 48px;
  z-index: 90;
}
.filter-bar.filter-scroll {
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.filter-bar.filter-scroll::-webkit-scrollbar {
  display: none;
}
.filter-bar.filter-scroll .filter-btn {
  flex-shrink: 0;
}
.filter-bar.filter-scroll .filter-item {
  flex-shrink: 0;
  flex: none;
  padding: 8px 12px;
  min-width: auto;
}
.filter-bar.filter-scroll .filter-reset {
  flex-shrink: 0;
  color: #F37021;
  font-weight: 500;
}
.filter-item {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
}
.filter-item span { white-space: nowrap; }
.filter-item .arrow { font-size: 9px; flex-shrink: 0; }
.filter-item:hover {
  background: var(--bg-tertiary);
  color: var(--accent-primary);
}
.filter-item.active {
  background: var(--bg-tertiary);
  color: var(--accent-primary);
  font-weight: 500;
}
@media (prefers-color-scheme: dark) {
  .filter-bar { background: var(--bg-primary); }
  .filter-item.active { background: var(--bg-tertiary); color: var(--accent-primary); }
}

/* ===== 筛选面板 ===== */
.filter-panel {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: 90px;
  width: 100%;
  max-width: 480px;
  background: var(--bg-secondary);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-lg);
  z-index: 95;
  display: none;
  max-height: 50vh;
  overflow-y: auto;
}
.filter-panel.show { display: block; animation: slideDown 0.25s ease-out; }
@keyframes slideDown {
  from { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.filter-panel h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-option {
  padding: 7px 14px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-round);
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}
.filter-option:hover {
  background: var(--accent-pale);
  color: var(--accent-primary);
}
.filter-option.selected {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
}
.disc-filter-icon {
  width: 14px;
  height: 14px;
  vertical-align: -3px;
  margin-right: 4px;
  display: inline-block;
}

/* ===== 遮罩 ===== */
.mask {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 90;
  display: none;
  backdrop-filter: blur(2px);
}
.mask.show { display: block; animation: fadeIn 0.2s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ===== 首页板块 ===== */
.section {
  background: var(--bg-secondary);
  margin: 12px 12px;
  padding: 18px 16px;
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  transition: box-shadow var(--transition-base);
}
.section:hover {
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.section-title span:first-child {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  text-shadow: 0 1px 2px rgba(0,0,0,0.08);
  letter-spacing: 0.3px;
}
.section-title .more {
  font-size: 12px;
  color: var(--accent-secondary);
  cursor: pointer;
}

/* ===== 推荐卡片 ===== */
.recommend-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -14px;
  padding: 0 14px;
}
.recommend-scroll::-webkit-scrollbar { display: none; }
.recommend-list {
  display: flex;
  gap: 14px;
  padding: 4px 0;
}
.recommend-card {
  flex-shrink: 0;
  width: 72px;
  text-align: center;
  cursor: pointer;
}
.recommend-card:active .recommend-icon {
  transform: scale(0.92);
}
.recommend-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto;
  border-radius: 18px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}
.recommend-icon svg { width: 28px; height: 28px; }
.recommend-name {
  font-size: 12px;
  font-weight: 500;
  color: #1D1D1F;
  margin-top: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recommend-sub {
  font-size: 10px;
  color: #86868B;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== 学科分类 ===== */
.discipline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 8px;
}
.discipline-item {
  text-align: center;
  cursor: pointer;
  padding: 8px 4px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}
.discipline-item:active {
  background: var(--bg-tertiary);
  transform: scale(0.95);
}
.discipline-item .icon {
  font-size: 28px;
  display: block;
  margin-bottom: 4px;
}
.discipline-item .disc-icon {
  width: 30px;
  height: 30px;
  display: block;
  margin: 0 auto 6px;
  object-fit: contain;
}
.discipline-item .name {
  font-size: 12px;
  color: var(--text-primary);
  margin-bottom: 2px;
  line-height: 1.3;
}
.discipline-item .count {
  font-size: 10px;
  color: var(--text-tertiary);
}

/* ===== 学术机构 ===== */
.inst-group-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-primary);
  background: var(--accent-pale);
  padding: 4px 10px;
  border-radius: 12px;
  display: inline-block;
  margin: 8px 0 6px;
}

.institution-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.institution-item:last-child { border-bottom: none; }
.institution-item:active { background: var(--bg-hover); }
.institution-left {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
}
.institution-logo {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-right: 12px;
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}
.institution-logo-img {
  width: auto;
  height: 32px;
  max-width: 120px;
  object-fit: contain;
  margin-right: 12px;
  flex-shrink: 0;
}
.institution-info { flex: 1; min-width: 0; }
.institution-info .name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.institution-info .desc {
  font-size: 11px;
  color: var(--text-tertiary);
}
.institution-arrow {
  color: var(--text-tertiary);
  font-size: 18px;
  padding-left: 8px;
}

/* ===== 学术活动 ===== */
.activity-item {
  display: flex;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition-fast);
  gap: 14px;
}
.activity-item:last-child { border-bottom: none; }
.activity-item:active { background: var(--bg-hover); }
.activity-date {
  width: 50px;
  flex-shrink: 0;
  text-align: center;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 8px 4px;
  box-shadow: var(--shadow-xs);
}
.activity-date .month {
  font-size: 10px;
  color: var(--accent-secondary);
  font-weight: 600;
  text-transform: uppercase;
}
.activity-date .day {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-primary);
  line-height: 1.1;
}
.activity-content { flex: 1; min-width: 0; }
.activity-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.activity-meta {
  font-size: 11px;
  color: var(--text-tertiary);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.activity-tag {
  display: inline-block;
  padding: 1px 8px;
  border-radius: var(--radius-round);
  font-size: 10px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-weight: 500;
}
.activity-tag.hot {
  background: #FFF3E0;
  color: #E65100;
}

/* ===== 征稿通知 ===== */
.call-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.call-item:last-child { border-bottom: none; }
.call-item:active { background: var(--bg-hover); }
.call-left { flex: 1; min-width: 0; padding-right: 12px; }
.call-journal {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}
.hot-dot { font-size: 12px; }
.call-topic {
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.call-right {
  text-align: right;
  flex-shrink: 0;
  background: var(--bg-tertiary);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  width: 110px;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.call-deadline-label {
  font-size: 10px;
  color: var(--text-tertiary);
}
.call-deadline {
  font-size: 13px;
  color: var(--accent-gold);
  font-weight: 600;
  margin-top: 2px;
  font-family: 'SF Mono', Menlo, monospace;
}

/* 征稿通知 - 列表层次增强（首页，参考学术活动卡片：期刊来源徽章 + 学科标签 + 主题标题 + 截稿日期徽章） */
.call-item { padding: 14px 2px; gap: 12px; }
.call-left { display: flex; flex-direction: column; justify-content: center; }
.call-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.call-journal-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-round);
  background: var(--accent-pale);
  color: var(--accent-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.call-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-round);
  font-size: 10px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-weight: 500;
}
.call-main-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.call-right {
  text-align: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 9px 10px;
  min-width: 96px;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.call-deadline-label {
  font-size: 10px;
  color: var(--text-tertiary);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.call-deadline-land {
  font-size: 14px;
  color: var(--accent-gold);
  font-weight: 700;
  margin-top: 3px;
  font-family: 'SF Mono', Menlo, monospace;
  line-height: 1.2;
}

/* ===== 底部导航 ===== */
.tab-bar {
  position: fixed; bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: linear-gradient(0deg, #FFFFFF 0%, #FFFDF9 100%);
  border-top: 1px solid var(--border-color);
  display: flex;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(243, 112, 33, 0.06), 0 -1px 3px rgba(0, 0, 0, 0.02);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab-item {
  flex: 1;
  text-align: center;
  padding: 8px 0 10px;
  color: var(--text-tertiary);
  font-size: 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}
.tab-item .icon {
  width: 22px;
  height: 22px;
  display: block;
  margin: 0 auto 2px;
  transition: transform var(--transition-fast);
  position: relative;
}
.tab-item.active {
  color: var(--accent-primary);
}
.tab-item.active .icon {
  transform: translateY(-2px) scale(1.1);
}

/* ===== 期刊标签 ===== */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  margin-right: 4px;
  margin-bottom: 2px;
}
.tag-cssci { background: var(--tag-cssci-bg); color: var(--tag-cssci); }
.tag-cssci-ext { background: var(--tag-cssci-ext-bg); color: var(--tag-cssci-ext); }
.tag-pku { background: var(--tag-pku-bg); color: var(--tag-pku); }
.tag-dual { background: var(--tag-dual-bg); color: var(--tag-dual); font-weight: 600; }
.tag-ssci-q1 { background: var(--tag-ssci-q1-bg); color: var(--tag-ssci-q1); font-weight: 600; }
.tag-ssci-q2 { background: var(--tag-ssci-q2-bg); color: var(--tag-ssci-q2); }
.tag-ssci-q3 { background: var(--tag-ssci-q3-bg); color: var(--tag-ssci-q3); }
.tag-ssci-q4 { background: var(--tag-ssci-q4-bg); color: var(--tag-ssci-q4); }
.tag-ahci { background: var(--tag-ahci-bg); color: var(--tag-ahci); }
.tag-scie-q1 { background: var(--tag-scie-q1-bg); color: var(--tag-scie-q1); font-weight: 600; }
.tag-scopus { background: var(--tag-scopus-bg); color: var(--tag-scopus); }
.tag-ei { background: var(--tag-ei-bg); color: var(--tag-ei); font-weight: 600; }
.tag-if { background: var(--tag-if-bg); color: var(--tag-if); font-weight: 600; }
.tag-pro { background: var(--tag-pro-bg); color: var(--tag-pro); border: 1px solid var(--tag-pro-border); }
.tag-abs-4star { background: var(--tag-abs-4star-bg); color: var(--tag-abs-4star); font-weight: 700; }
.tag-abs-4 { background: var(--tag-abs-4-bg); color: var(--tag-abs-4); font-weight: 600; }
.tag-abs-3 { background: var(--tag-abs-3-bg); color: var(--tag-abs-3); }
.tag-abs-2 { background: var(--tag-abs-2-bg); color: var(--tag-abs-2); }
.tag-abs-1 { background: var(--tag-abs-1-bg); color: var(--tag-abs-1); }
.tag-warning {
  background: #FFEBEE;
  color: #C62828;
  font-weight: 700;
  border: 1px solid #FFCDD2;
}

/* 首页热门期刊排序Tab */
.hot-sort-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  padding: 0 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.hot-sort-tab {
  flex-shrink: 0;
  padding: 5px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
}
.hot-sort-tab.active {
  color: #fff;
  background: var(--accent-primary);
  font-weight: 500;
}

/* ===== 搜索结果 ===== */
.result-list {
  padding: 12px;
}
.journal-item {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}
.journal-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent-primary);
  transform: scaleY(0);
  transition: transform var(--transition-base);
}
.journal-item:hover {
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transform: translateY(-1px);
}
.journal-item:hover::before { transform: scaleY(1); }
.journal-item:active {
  transform: scale(0.99);
  box-shadow: var(--shadow-xs);
}
.journal-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}
.journal-name .fav-btn {
  font-size: 18px;
  cursor: pointer;
  padding: 2px 4px;
  transition: transform var(--transition-fast);
}
.journal-name .fav-btn svg.icon.follow-svg {
  width: 19px;
  height: 19px;
  vertical-align: -3px;
  color: var(--text-tertiary);
}
.journal-name .fav-btn.active svg.icon.follow-svg {
  color: var(--accent-primary);
}
.journal-name .fav-btn.cmp-fav-btn svg.icon.compare-svg {
  width: 19px;
  height: 19px;
  vertical-align: -3px;
  color: var(--text-tertiary);
}
.follow-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.compare-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.compare-btn svg.icon.compare-svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--accent-primary);
  vertical-align: -3px;
}
.follow-btn svg.icon.follow-svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--accent-primary);
}
.journal-name .fav-btn:active { transform: scale(1.3); }
.journal-tags { margin-bottom: 8px; }
.journal-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-tertiary);
}
.difficulty {
  color: var(--accent-gold);
  font-weight: 500;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.load-more {
  text-align: center;
  padding: 16px;
  color: var(--text-tertiary);
  font-size: 13px;
  cursor: pointer;
}
.load-more:active { color: var(--accent-primary); }
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-tertiary);
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }

/* ===== 搜索类型切换 ===== */
/* ===== 通用卡片 ===== */
.card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

/* ===== 通用列表项 ===== */
.list-row {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.list-row:last-child { border-bottom: none; }
.list-row:active { background: var(--bg-hover); }
.list-row-arrow {
  color: var(--text-tertiary);
  font-size: 18px;
  margin-left: 8px;
  flex-shrink: 0;
}

/* ===== 通用按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-round);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  box-sizing: border-box;
}
.btn-primary {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(243, 112, 33, 0.25);
}
.btn-primary:active { opacity: 0.85; transform: scale(0.98); }
.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}
.btn-secondary:active { background: var(--bg-hover); }
.btn-outline {
  background: transparent;
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary);
}
.btn-outline:active { background: var(--accent-pale); }
.btn-block { width: 100%; }

/* ===== 详情页底部操作栏 ===== */
.detail-bottom-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
}
.detail-bottom-bar .fav-btn {
  flex-shrink: 0;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-round);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}
.detail-bottom-bar .fav-btn.active {
  background: var(--accent-pale);
  border-color: transparent;
  color: var(--accent-primary);
  animation: favPop 0.3s ease;
}
.detail-bottom-bar .fav-btn svg.icon.follow-svg {
  width: 20px; height: 20px;
  flex: 0 0 auto;
}
@keyframes favPop {
  0% { transform: scale(0.8); }
  55% { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.detail-bottom-bar .primary-btn {
  flex: 1;
  height: 48px;
  border: none;
  border-radius: var(--radius-round);
  background: var(--accent-primary);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(243, 112, 33, 0.25);
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}
.detail-bottom-bar .primary-btn:active { opacity: 0.85; transform: scale(0.98); }

/* ===== 通用 section 区块 ===== */
.section-block {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  margin: 12px 16px;
  padding: 16px;
  border: 1px solid var(--border-color);
}

/* ===== 通用标签 ===== */
.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.5;
  font-weight: 500;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}
.pill-accent {
  background: var(--accent-pale);
  color: var(--accent-primary);
}
.pill-success {
  background: #E8F5E9;
  color: #2E7D32;
}
.pill-warning {
  background: #FFF3E0;
  color: #E65100;
}
.pill-danger {
  background: #FFEBEE;
  color: #C62828;
}

/* ===== 二级页面通用 ===== */
.page-search-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-primary);
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--border-color);
}
.page-search-wrap { position: relative; }
.page-search-input {
  width: 100%;
  height: 40px;
  border-radius: 20px;
  border: none;
  background: var(--bg-tertiary);
  padding: 0 84px 0 40px;
  font-size: 14px;
  color: var(--text-primary);
  box-sizing: border-box;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A8A8A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E/%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 14px center;
}
.page-search-wrap .search-btn {
  right: 10px;
}
.page-search-wrap .search-btn:active {
  opacity: 0.8;
}
.page-search-input:focus {
  background-color: var(--bg-secondary);
  box-shadow: 0 0 0 2px var(--accent-light);
}

/* 筛选标签栏（横向滚动） */
.filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 16px;
  background: var(--bg-primary);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  position: sticky;
  top: 48px;
  z-index: 9;
  border-bottom: 1px solid var(--border-color);
}
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}
.filter-chip.active {
  background: var(--accent-pale);
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  font-weight: 500;
}

/* 页面空状态 */
.page-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 24px;
  color: var(--text-tertiary);
  font-size: 14px;
}
.page-empty-icon {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-pale);
}
.page-empty-icon svg {
  width: 36px;
  height: 36px;
  color: var(--accent-primary);
}

/* 列表页内容区 */
.page-content { padding: 12px 16px 24px; }

/* ===== 搜索类型切换 ===== */
.search-type-tabs {
  display: flex;
  background: var(--bg-secondary);
  padding: 12px 16px 8px;
  gap: 10px;
}
.search-type-tab {
  flex: 1;
  text-align: center;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  cursor: pointer;
  transition: all var(--transition-base);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}
.search-type-tab.active {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* ===== 按钮 ===== */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  text-align: center;
}
.btn-primary {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.btn-primary:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-xs);
}
.btn-secondary {
  background: var(--accent-pale);
  color: var(--accent-primary);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
}
.btn-outline:hover {
  border-color: var(--accent-light);
  color: var(--accent-primary);
}

/* ===== 对比栏 ===== */
.compare-bar {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 448px;
  background: var(--accent-primary);
  color: #fff;
  padding: 12px 16px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  display: none;
  justify-content: space-between;
  align-items: center;
  z-index: 99;
  box-shadow: 0 -4px 20px rgba(27, 67, 50, 0.3);
  animation: slideUp 0.3s ease-out;
}
.compare-bar.show { display: flex; }
@keyframes slideUp {
  from { transform: translateX(-50%) translateY(100%); }
  to { transform: translateX(-50%) translateY(0); }
}
.compare-bar .btn {
  background: #fff;
  color: var(--accent-primary);
  padding: 6px 16px;
  font-size: 13px;
}

/* ===== 期刊详情 ===== */
.detail-header {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #E65100 100%);
  color: var(--text-on-dark);
  padding: 24px 20px 30px;
  position: relative;
  overflow: hidden;
}
.detail-header::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
}
.journal-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.4;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}
.tags { position: relative; display: flex; flex-wrap: wrap; gap: 6px; }
.detail-header .tags .tag {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.18);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(4px);
  font-weight: 500;
  letter-spacing: 0.2px;
}
.detail-header .tags .tag.tag-dual { background: rgba(255,255,255,0.3); border-color: rgba(255,255,255,0.5); }
.detail-header .tags .tag.tag-if { background: rgba(255,215,0,0.25); color: #FFE57F; border-color: rgba(255,215,0,0.5); }

.detail-hero {
  padding: 20px 16px;
  background: var(--bg-secondary);
  border-bottom: 8px solid var(--bg-primary);
}
.detail-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", sans-serif;
}
.detail-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.detail-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}
.detail-meta-item {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 12px;
}
.detail-meta-item .meta-label {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}
.detail-meta-item .meta-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.detail-section {
  background: var(--bg-secondary);
  margin: -12px 12px 12px;
  padding: 18px 16px;
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  position: relative;
  z-index: 1;
}
.detail-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}
.detail-section h3::before {
  content: '';
  width: 3px;
  height: 16px;
  background: var(--accent-primary);
  border-radius: 2px;
}
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border-light);
}
.info-row:last-child { border-bottom: none; }
.info-row .label {
  font-size: 13px;
  color: var(--text-secondary);
  flex-shrink: 0;
  width: 100px;
}
.info-row .value {
  font-size: 13px;
  color: var(--text-primary);
  text-align: right;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.info-link {
  font-size: 13px;
  color: var(--accent-primary);
  text-align: right;
  flex: 1;
  text-decoration: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.info-link:active { opacity: 0.7; }

.difficulty-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.stars { color: var(--accent-gold); font-size: 18px; letter-spacing: 2px; }
/* 难度评级钻石图标（线框 SVG，符合设计规范；达成=实心金、未达成=空心淡） */
.diff-gem { width: 14px; height: 14px; min-width: 14px; max-width: 14px; min-height: 14px; max-height: 14px; flex: none; align-self: center; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -2px; margin: 0 1px; }
.diff-gem.gem-on { fill: var(--accent-gold); stroke: var(--accent-gold); }
.diff-gem.gem-off { fill: color-mix(in srgb, var(--text-tertiary) 42%, transparent); stroke: color-mix(in srgb, var(--text-tertiary) 42%, transparent); }
.diff-gem .dc { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 54; stroke: rgba(255,255,255,.82); }
.diff-gem-wrap { display: inline-flex; align-items: center; vertical-align: middle; }
.difficulty-bar .label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.difficulty-progress {
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}
.difficulty-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
  border-radius: 3px;
  transition: width 0.5s ease-out;
}

/* 难度量化指标 */
.diff-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--bg-tertiary);
}
.diff-metric-item {
  text-align: center;
  padding: 8px 4px;
}
.diff-metric-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-primary);
  line-height: 1.2;
}
.diff-metric-label {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.detail-actions {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--bg-secondary);
  padding: 10px 16px;
  display: flex;
  gap: 10px;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
  z-index: 100;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
}
.detail-actions .btn {
  flex: 1;
  padding: 12px;
  font-size: 14px;
}

/* ===== 对比页 ===== */
.compare-container {
  padding: 12px;
}
.compare-table {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.compare-row {
  display: flex;
  border-bottom: 1px solid var(--border-light);
}
.compare-row:last-child { border-bottom: none; }
.compare-label {
  width: 80px;
  flex-shrink: 0;
  padding: 12px;
  background: var(--bg-tertiary);
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}
.compare-values {
  flex: 1;
  display: flex;
  overflow-x: auto;
}
.compare-col {
  flex: 1;
  min-width: 140px;
  padding: 12px;
  border-left: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--text-primary);
}
.compare-col:first-child { border-left: none; }

/* ===== 收藏页 ===== */
.fav-empty, .compare-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-tertiary);
}
.fav-empty .icon, .compare-empty .icon { font-size: 56px; margin-bottom: 16px; opacity: 0.5; }
.fav-empty p, .compare-empty p { font-size: 14px; margin-bottom: 20px; }

/* ===== 个人中心 ===== */
.profile-header {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #E65100 100%);
  color: var(--text-on-dark);
  padding: 30px 20px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.profile-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  border: 2px solid rgba(255,255,255,0.3);
}
.profile-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}
.profile-auth-btn {
  margin-top: 12px;
}
.profile-auth-btn .btn-sm {
  padding: 6px 18px;
  font-size: 13px;
  border-radius: 16px;
  border: none;
  cursor: pointer;
}
.profile-auth-btn .btn-primary {
  background: rgba(255,255,255,0.25);
  color: #fff;
  backdrop-filter: blur(10px);
}
.profile-auth-btn .btn-outline {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3) !important;
}
.profile-desc {
  font-size: 12px;
  opacity: 0.7;
}

.profile-stats {
  display: flex;
  margin: -20px 12px 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  position: relative;
  z-index: 1;
}
.profile-stat {
  flex: 1;
  text-align: center;
}
.profile-stat .num {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-primary);
  font-family: 'SF Mono', Menlo, monospace;
}
.profile-stat .label {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}
.profile-stat + .profile-stat {
  border-left: 1px solid var(--border-light);
}

/* 统计卡片增强 */
.stats-card {
  display: flex;
  margin: -20px 16px 16px;
  background: var(--bg-primary);
  border-radius: 16px;
  padding: 16px 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  position: relative;
  z-index: 2;
}
.stats-card .profile-stat {
  flex: 1;
  text-align: center;
  padding: 4px 0;
  cursor: pointer;
  transition: transform 0.15s;
}
.stats-card .profile-stat:active {
  transform: scale(0.95);
}
.stats-card .num {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 4px;
}
.stats-card .label {
  font-size: 11px;
  color: var(--text-tertiary);
}

/* iOS 风格菜单 */
.ios-menu {
  margin: 0 16px 12px;
  background: var(--bg-primary);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.ios-menu-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--border-light);
  cursor: pointer;
  transition: background 0.15s;
  gap: 12px;
  position: relative;
}
.ios-menu-item:last-child { border-bottom: none; }
.ios-menu-item:active { background: var(--bg-hover); }

.ios-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  position: relative;
}


.ios-menu-text {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--text-primary);
}
.menu-soon {
  font-size: 11px;
  color: var(--text-tertiary);
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
}
.menu-right-text {
  font-size: 14px;
  color: var(--text-tertiary);
  flex-shrink: 0;
}
.ios-arrow {
  color: var(--text-tertiary);
  font-size: 18px;
  font-weight: 300;
  flex-shrink: 0;
  opacity: 0.6;
}

/* 清爽版：灰色统一图标 */
.ios-icon-gray {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 7px;
  font-size: 14px;
}
.ios-icon-gray svg.icon {
  width: 17px;
  height: 17px;
  display: block;
}
.ios-menu-simple .ios-menu-item {
  padding: 13px 16px;
}
.ios-menu-simple .ios-menu-text {
  font-size: 15px;
}

/* 分组标题 */
.menu-section {
  margin-bottom: 8px;
}
.menu-section-title {
  font-size: 13px;
  color: var(--text-tertiary);
  padding: 16px 28px 6px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.menu-list {
  background: var(--bg-secondary);
  margin: 0 12px 12px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.menu-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: var(--bg-hover); }
.menu-item .icon {
  font-size: 18px;
  margin-right: 12px;
  width: 24px;
  text-align: center;
}
.menu-item .text {
  flex: 1;
  font-size: 14px;
  color: var(--text-primary);
}
.menu-item .arrow {
  color: var(--text-tertiary);
  font-size: 16px;
}

/* 语言切换选项 */
.lang-select {
  display: flex;
  gap: 8px;
  padding: 12px;
}
.lang-option {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--bg-tertiary);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}
.lang-option.active {
  background: var(--accent-primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

/* ===== 骨架屏 ===== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}
@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== 响应式微调 ===== */
@media (max-width: 360px) {
  .discipline-grid { grid-template-columns: repeat(4, 1fr); }
  .journal-title { font-size: 19px; }
  .section-title span:first-child { font-size: 15px; }
}


/* ===== 模糊搜索联想下拉 ===== */
.search-suggest {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  margin-top: 6px;
  max-height: 60vh;
  overflow-y: auto;
  z-index: 100;
  display: none;
}
.search-suggest.show { display: block; }
.suggest-item {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border-bottom: 1px solid #F0F0F5;
  transition: background 0.15s;
}
.suggest-item:last-child { border-bottom: none; }
.suggest-item:hover { background: #F5F5F7; }
.suggest-item:active { background: #E8E8ED; }
.suggest-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #FFF1E0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.suggest-info { flex: 1; min-width: 0; }
.suggest-name {
  font-size: 14px;
  font-weight: 500;
  color: #1D1D1F;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suggest-name mark {
  background: none;
  color: #F37021;
  font-weight: 600;
}
.suggest-sub {
  font-size: 11px;
  color: #86868B;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suggest-tags {
  display: flex;
  flex-shrink: 0;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 160px;
}
.suggest-tags .tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1.4;
}
.suggest-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #F0F0F5;
  color: #6E6E73;
  flex-shrink: 0;
}
.suggest-category {
  font-size: 11px;
  color: #F37021;
  font-weight: 500;
  padding: 4px 16px 2px;
  background: #FFFAF5;
  position: sticky;
  top: 0;
  z-index: 1;
}
.suggest-empty {
  padding: 32px 20px;
  text-align: center;
  color: #86868B;
  font-size: 13px;
}
.suggest-empty-icon {
  position: relative;
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-pale);
}
.suggest-empty-icon svg {
  width: 26px;
  height: 26px;
  color: var(--accent-primary);
}

/* 搜索框容器相对定位 */
.search-box, .search-input-wrap {
  position: relative;
}

[data-theme="dark"] .search-suggest {
  background: #1C1C1E;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  border: 1px solid #2C2C2E;
}
[data-theme="dark"] .suggest-item { border-bottom-color: #2C2C2E; }
[data-theme="dark"] .suggest-item:hover { background: #2C2C2E; }
[data-theme="dark"] .suggest-name { color: #F5F5F7; }
[data-theme="dark"] .suggest-sub { color: #8E8E93; }
[data-theme="dark"] .suggest-icon { background: #2C2C2E; }
[data-theme="dark"] .suggest-tag { background: #2C2C2E; color: #8E8E93; }
[data-theme="dark"] .suggest-category {
  background: #1C1C1E;
  color: #FF8A00;
}
[data-theme="dark"] .suggest-empty { color: #8E8E93; }


/* ===== 关注列表 ===== */
.follows-filter {
  background: #fff;
  padding: 8px 16px;
  position: sticky;
  top: 44px;
  z-index: 10;
  border-bottom: 1px solid #F2F2F7;
}
[data-theme="dark"] .follows-filter {
  background: #1C1C1E;
  border-color: #38383A;
}
.filter-tabs {
  display: flex;
  gap: 8px;
}
/* ===== 关注页空状态（专属） ===== */
.follows-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.follows-empty-state .empty-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0 20px;
  text-align: center;
  width: 100%;
}
.follows-empty-state .empty-icon-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.follows-empty-state .empty-bell {
  width: 56px;
  height: 56px;
  color: var(--accent-primary);
  filter: drop-shadow(0 4px 12px rgba(243, 112, 33, 0.22));
}
.follows-empty-state .empty-bell-dot {
  position: absolute;
  right: 8px;
  top: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 2px solid var(--accent-pale);
  box-shadow: 0 2px 6px rgba(243, 112, 33, 0.35);
}
.follows-empty-state .empty-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.5;
}
.follows-empty-state .empty-desc {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 28px;
  line-height: 1.6;
  max-width: 240px;
}
.follows-empty-state .empty-cta {
  min-width: 150px;
  padding: 11px 28px;
}
.filter-tab {
  padding: 6px 16px;
  border-radius: 16px;
  font-size: 13px;
  color: #8E8E93;
  background: #F2F2F7;
  white-space: nowrap;
  cursor: pointer;
}
[data-theme="dark"] .filter-tab {
  background: #2C2C2E;
  color: #8E8E93;
}
.filter-tab.active {
  background: var(--accent-primary);
  color: #fff;
  font-weight: 500;
}

.follows-list {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.follow-card {
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  cursor: pointer;
}
[data-theme="dark"] .follow-card {
  background: #2C2C2E;
  box-shadow: none;
}
.follow-info {
  flex: 1;
  min-width: 0;
}
.follow-name {
  font-size: 16px;
  font-weight: 600;
  color: #1C1C1E;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
[data-theme="dark"] .follow-name { color: #fff; }
.follow-sub {
  font-size: 12px;
  color: #8E8E93;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.follow-date {
  font-size: 11px;
  color: #C7C7CC;
}
.follow-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.notify-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}
.toggle-label {
  font-size: 12px;
  color: #8E8E93;
}

/* Switch 开关 */
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 26px;
  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: #E5E5EA;
  transition: .3s;
  border-radius: 26px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
input:checked + .slider {
  background-color: var(--accent-primary);
}
input:checked + .slider:before {
  transform: translateX(16px);
}

.btn-text {
  font-size: 12px;
  padding: 4px 10px;
  border: none;
  background: transparent;
  cursor: pointer;
}
.btn-text.danger {
  color: var(--accent-primary);
}

/* 通知角标 */
.notif-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--accent-primary);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.compare-badge {
  position: absolute;
  top: -5px;
  right: -7px;
  background: linear-gradient(135deg, #FF8F1F 0%, #F37021 100%);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 17px;
  height: 17px;
  line-height: 17px;
  border-radius: 9px;
  padding: 0 4px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(243, 112, 33, 0.35);
  justify-content: center;
  z-index: 2;
}

/* ===== 通知列表 ===== */
.notif-date-label {
  font-size: 12px;
  color: #8E8E93;
  padding: 16px 16px 6px;
  font-weight: 500;
}
.notif-list {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.notif-card {
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  display: flex;
  gap: 12px;
  position: relative;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  cursor: pointer;
}
[data-theme="dark"] .notif-card {
  background: #2C2C2E;
  box-shadow: none;
}
.notif-card.unread {
  background: #FFF8EF;
}
[data-theme="dark"] .notif-card.unread {
  background: #2A241E;
}
.notif-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #F2F2F7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
[data-theme="dark"] .notif-icon { background: #3A3A3C; }
.notif-content {
  flex: 1;
  min-width: 0;
}
.notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.notif-type {
  font-size: 12px;
  color: var(--accent-primary);
  font-weight: 500;
}
.notif-time {
  font-size: 11px;
  color: #C7C7CC;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}
.notif-title {
  font-size: 14px;
  font-weight: 600;
  color: #1C1C1E;
  margin-bottom: 4px;
}
[data-theme="dark"] .notif-title { color: #fff; }
.notif-desc {
  font-size: 13px;
  color: #636366;
  line-height: 1.4;
  margin-bottom: 4px;
}
[data-theme="dark"] .notif-desc { color: #8E8E93; }
.notif-journal {
  font-size: 11px;
  color: #8E8E93;
  background: #F2F2F7;
  padding: 2px 8px;
  border-radius: 10px;
  display: inline-block;
}
[data-theme="dark"] .notif-journal {
  background: #3A3A3C;
  color: #8E8E93;
}
.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #FF3B30;
  display: inline-block;
  margin-left: 6px;
  flex-shrink: 0;
  vertical-align: middle;
}

.nav-right {
  position: relative;
}
.nav-right .notif-badge {
  top: -2px;
  right: -8px;
}

/* ===== 期刊动态模块 ===== */
.news-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.news-section .section-header h3 {
  margin: 0;
}
.section-more {
  font-size: 13px;
  color: var(--accent-primary);
  text-decoration: none;
}
.detail-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}
.detail-section .section-header h3 {
  margin: 0;
  border-bottom: none;
  padding-bottom: 0;
}
.news-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #F2F2F7;
  cursor: pointer;
}
[data-theme="dark"] .news-item {
  border-color: #38383A;
}
.news-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.news-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.news-body {
  flex: 1;
  min-width: 0;
}
.news-type {
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 3px;
}
.news-title {
  font-size: 14px;
  font-weight: 500;
  color: #1C1C1E;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
[data-theme="dark"] .news-title { color: #fff; }
.news-summary {
  font-size: 12px;
  color: #8E8E93;
  line-height: 1.4;
}
.news-date {
  font-size: 11px;
  color: #C7C7CC;
  flex-shrink: 0;
  padding-top: 2px;
}

/* ==================== Auth Pages ==================== */
.auth-page {
  background: linear-gradient(180deg, #FFF8E7 0%, #FFFFFF 40%, #F8FAFC 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-container {
  width: 100%;
  max-width: 400px;
}

.auth-logo {
  text-align: center;
  margin-bottom: 30px;
}

.auth-logo-icon {
  font-size: 48px;
  margin-bottom: 8px;
}

.auth-logo-img {
  width: 110px;
  height: auto;
  display: block;
  margin: 0 auto 14px;
}

.auth-logo h1 {
  font-size: 24px;
  font-weight: 700;
  color: #1D1D1F;
  margin: 0 0 6px 0;
  letter-spacing: 1px;
}

.auth-logo p {
  font-size: 13px;
  color: #8E8E93;
  margin: 0;
}

.auth-card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.auth-card h2 {
  font-size: 20px;
  font-weight: 600;
  color: #1D1D1F;
  margin: 0 0 24px 0;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #3A3A3C;
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid #E5E5EA;
  border-radius: 10px;
  background: #FAFAFA;
  transition: all 0.2s;
  box-sizing: border-box;
  font-family: inherit;
}

.form-group input:focus {
  outline: none;
  border-color: #D4AF37;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-error {
  background: #FFF0F0;
  color: #FF3B30;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

.btn-block {
  width: 100%;
  padding: 13px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-page .btn-primary {
  background: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%);
  color: #FFFFFF;
}

.auth-page .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.auth-page .btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.auth-page .btn-outline {
  background: #FFFFFF;
  color: #3A3A3C;
  border: 1px solid #E5E5EA !important;
}

.auth-page .btn-outline:hover {
  background: #F8FAFC;
}

.auth-switch {
  text-align: center;
  margin-top: 18px;
  font-size: 13px;
  color: #8E8E93;
}

.auth-switch a {
  color: #D4AF37;
  text-decoration: none;
  font-weight: 500;
  margin-left: 4px;
}

.auth-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #E5E5EA;
}

.auth-divider span {
  padding: 0 12px;
  font-size: 12px;
  color: #C7C7CC;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: #C7C7CC;
}

.auth-footer a {
  color: #D4AF37;
  text-decoration: none;
}

/* ===== 学树互助 ===== */
.community-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.community-card {
  text-align: center;
  cursor: pointer;
}
.community-card:active .community-icon {
  transform: scale(0.92);
}
.community-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto;
  border-radius: 16px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}
.community-icon svg { width: 24px; height: 24px; }
.community-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  margin-top: 8px;
}

/* 暗色模式下SVG图标反色 */
[data-theme="dark"] .disc-icon {
  filter: invert(0.8) brightness(1.2);
  opacity: 0.9;
}

/* ===== 暗色模式全局修复 ===== */
/* 推荐区文字颜色 */
[data-theme="dark"] .recommend-name { color: #F5F5F7; }
[data-theme="dark"] .recommend-sub { color: #8E8E93; }
[data-theme="dark"] .recommend-icon { background: #2C2C2E; color: #D1D1D6; }

/* 热门核心标签暗色 */
[data-theme="dark"] .hot-tag { color: #FFB74D; border-color: rgba(255,183,77,0.3); background: rgba(255,183,77,0.1); }
[data-theme="dark"] .hot-tag:nth-child(1) { background: rgba(198,40,40,0.15); color: #EF5350; }
[data-theme="dark"] .hot-tag:nth-child(2) { background: rgba(230,81,0,0.15); color: #FF8A65; }
[data-theme="dark"] .hot-tag:nth-child(3) { background: rgba(245,127,23,0.15); color: #FFB74D; }

/* 暗色模式板块标题阴影更有层次 */
[data-theme="dark"] .section-title span:first-child {
  text-shadow: 0 1px 3px rgba(0,0,0,0.5), 0 0 1px rgba(255,255,255,0.1);
}

/* 暗色模式顶部导航 */
[data-theme="dark"] .nav-top {
  background: linear-gradient(180deg, #1C1C1E 0%, #232325 100%);
  border-bottom: 1px solid #2C2C2E;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .nav-top .title {
  font-weight: 700;
  color: #F5F5F7;
}
[data-theme="dark"] .tab-bar {
  background: linear-gradient(0deg, #1C1C1E 0%, #232325 100%);
  border-top: 1px solid #2C2C2E;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] .tab-item {
  color: #8E8E93;
}
[data-theme="dark"] .tab-item.active {
  color: var(--accent-primary);
}

/* 暗黑模式通用组件 */
[data-theme="dark"] .card,
[data-theme="dark"] .section-block {
  background: #1C1C1E;
  border-color: #2C2C2E;
}
[data-theme="dark"] .list-row {
  background: #1C1C1E;
  border-bottom-color: #2C2C2E;
}
[data-theme="dark"] .list-row:active { background: #2C2C2E; }
[data-theme="dark"] .page-search-bar {
  background: #1C1C1E;
  border-bottom-color: #2C2C2E;
}
[data-theme="dark"] .page-search-input {
  background: #2C2C2E;
  color: #F5F5F7;
}
[data-theme="dark"] .page-search-input:focus {
  background-color: #1C1C1E;
  box-shadow: 0 0 0 2px rgba(243, 112, 33, 0.4);
}
[data-theme="dark"] .filter-chips {
  background: #1C1C1E;
  border-bottom-color: #2C2C2E;
}
[data-theme="dark"] .filter-chip {
  background: #2C2C2E;
  color: #8E8E93;
  border-color: transparent;
}
[data-theme="dark"] .filter-chip.active {
  background: rgba(243, 112, 33, 0.15);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}
[data-theme="dark"] .btn-secondary {
  background: #2C2C2E;
  color: #F5F5F7;
}
[data-theme="dark"] .pill {
  background: #2C2C2E;
  color: #8E8E93;
}

/* ============ 帮助中心弹窗 ============ */
.help-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.help-modal {
  background: var(--bg-primary);
  width: 100%;
  max-width: 560px;
  max-height: 85vh;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.help-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.help-modal-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}
.help-modal-close {
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
}
.help-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  color: var(--text-primary);
}
.help-section {
  margin-bottom: 24px;
}
.help-section h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.help-section p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.help-section p strong {
  color: var(--text-primary);
  font-weight: 500;
}
.help-disclaimer {
  margin-top: 24px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 12px;
  border-left: 3px solid #ff9500;
}
.help-disclaimer h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.help-disclaimer p {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
[data-theme="dark"] .help-modal {
  background: var(--bg-primary);
}

/* ===== 验证码输入行（注册/找回密码共用） ===== */
.verify-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.verify-row input {
  flex: 1;
  min-width: 0;
}
.btn-send-code {
  flex: 0 0 auto;
  white-space: nowrap;
  width: auto;
  padding: 0 14px;
  min-height: 44px;
  font-size: 14px;
}
.btn-send-code:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* ===== 认证页描述与成功提示 ===== */
.auth-desc {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 18px;
}
.form-success {
  color: var(--success, #16a34a);
  font-size: 14px;
  line-height: 1.6;
  padding: 10px 0;
}

/* ===== 登录页 忘记密码 ===== */
.auth-forgot {
  text-align: right;
  margin-top: 10px;
  font-size: 14px;
}
.auth-forgot a {
  color: var(--accent, #2563eb);
  text-decoration: none;
}

/* ===== 通知中心：加载更多 / 没有更多 ===== */
.notif-load-more, .notif-no-more {
  text-align: center;
  padding: 14px;
  font-size: 13px;
  color: var(--accent-primary);
  cursor: pointer;
}
.notif-no-more {
  color: #C7C7CC;
  cursor: default;
}

/* ===== 编辑资料页 ===== */
.form-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
[data-theme="dark"] .form-card {
  background: #2C2C2E;
  box-shadow: none;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary, #3A3A3C);
  margin-bottom: 8px;
}
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid #E5E5EA;
  border-radius: 10px;
  background: #FAFAFA;
  transition: all 0.2s;
  box-sizing: border-box;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  color: var(--text-primary);
}
[data-theme="dark"] .form-group textarea {
  background: #1C1C1E;
  border-color: #3A3A3C;
  color: #fff;
}
.form-group textarea:focus {
  outline: none;
  border-color: #D4AF37;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}
[data-theme="dark"] .form-group textarea:focus {
  background: #2C2C2E;
}
.pe-avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.pe-avatar-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #F2F2F7;
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
}
[data-theme="dark"] .pe-avatar-wrap { background: #3A3A3C; }
.pe-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #B0B0B5;
}
.pe-avatar-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pe-avatar-edit {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
}
.pe-avatar-tip {
  font-size: 12px;
  color: var(--text-tertiary, #8E8E93);
  flex: 1;
  line-height: 1.5;
}
.pe-label-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pe-count {
  font-size: 12px;
  color: #C7C7CC;
}

/* ===== 表单控件主题协调：原生 select/单选框/复选框/滑块 选中态由系统蓝改为彼德学树金色主题 ===== */
select {
  color: var(--text-primary);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-medium);
  border-radius: 6px;
  accent-color: var(--accent-primary);
  font-family: inherit;
}
select:focus {
  border-color: var(--accent-primary);
  outline: none;
  box-shadow: 0 0 0 2px var(--accent-pale);
}
select option {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}
input[type="radio"],
input[type="checkbox"],
input[type="range"] {
  accent-color: var(--accent-primary);
}
::selection {
  background: var(--accent-primary);
  color: #fff;
}
