/* ==========================================
   Y的acg导航站 — Taste-Refined Styles
   设计方向：柔和、通透、有呼吸感
   ========================================== */

/* ---------- CSS 变量 ---------- */
:root {
  /* 主色系 — 更克制的薄荷绿 */
  --primary: #6DBD9A;
  --primary-light: #A8DCC4;
  --primary-dark: #4A8F6E;
  --primary-dim: #E8F5EF;

  /* 强调 — 柔化天空蓝 */
  --accent: #7CB8D4;
  --accent-light: #C0DFF0;
  --accent-dark: #4E8AAA;

  /* 点缀 — 温暖淡粉 */
  --pink: #EC9EAD;
  --pink-light: #FAD5DC;
  --pink-dim: #FDF0F2;

  /* 表面色 */
  --bg: #F8F6F3;
  --bg-card: #FFFFFF;
  --bg-warm: #F3F7F4;

  /* 文字层级 */
  --text: #2C2C2C;
  --text-secondary: #7A7A7A;
  --text-muted: #B0B0B0;

  /* 阴影层级 — 多层叠加 */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.05), 0 2px 8px rgba(0,0,0,.04);
  --shadow-md: 0 2px 6px rgba(0,0,0,.04), 0 6px 20px rgba(0,0,0,.06);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.04), 0 12px 36px rgba(0,0,0,.08);
  --shadow-xl: 0 8px 24px rgba(0,0,0,.06), 0 24px 60px rgba(0,0,0,.10);

  /* 圆角 */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 20px;
  --radius-full: 999px;

  /* 间距 */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 64px;

  /* 布局 */
  --max-width: 1200px;

  /* 字体 */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
           "Microsoft YaHei", "Hiragino Sans GB", sans-serif;

  /* 过渡 */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== 主题配色 ===== */
body[data-theme="green"] {
  --primary: #6DBD9A;
  --primary-light: #A8DCC4;
  --primary-dark: #4A8F6E;
  --primary-dim: #E8F5EF;
  --accent: #7CB8D4;
  --accent-light: #C0DFF0;
  --pink: #EC9EAD;
  --pink-light: #FAD5DC;
  --bg: #F8F6F3;
  --bg-card: #FFFFFF;
  --bg-warm: #F3F7F4;
}

body[data-theme="pink"] {
  --primary: #E49AAC;
  --primary-light: #F5CCD6;
  --primary-dark: #C47082;
  --primary-dim: #FDF0F3;
  --accent: #C4A0D8;
  --accent-light: #E2D0F0;
  --pink: #EC9EAD;
  --pink-light: #FAD5DC;
  --bg: #FCF6F6;
  --bg-card: #FFFFFF;
  --bg-warm: #FDF3F5;
}

body[data-theme="blue"] {
  --primary: #62A8C8;
  --primary-light: #A8D4E8;
  --primary-dark: #3E7A98;
  --primary-dim: #EBF4F8;
  --accent: #90CCC0;
  --accent-light: #C8E8E0;
  --pink: #EC9EAD;
  --pink-light: #FAD5DC;
  --bg: #F5F8FA;
  --bg-card: #FFFFFF;
  --bg-warm: #F0F5F8;
}

body[data-theme="dark"] {
  --primary: #6DBD9A;
  --primary-light: #2E5A44;
  --primary-dark: #4A8F6E;
  --primary-dim: #1E2E26;
  --accent: #6098B8;
  --accent-light: #2A4858;
  --pink: #C0808E;
  --pink-light: #40282E;
  --bg: #16181B;
  --bg-card: #1E2126;
  --bg-warm: #242830;
  --text: #D8D8D8;
  --text-secondary: #929292;
  --text-muted: #6E6E6E;
  --shadow-xs: 0 1px 2px rgba(0,0,0,.15);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.12);
  --shadow-md: 0 2px 6px rgba(0,0,0,.2), 0 6px 20px rgba(0,0,0,.18);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.22), 0 12px 36px rgba(0,0,0,.20);
  --shadow-xl: 0 8px 24px rgba(0,0,0,.25), 0 24px 60px rgba(0,0,0,.22);
}

/* 暗夜覆盖 */
body[data-theme="dark"] .header {
  background: linear-gradient(135deg, #1E2E26, #223040, #30222A);
}
body[data-theme="dark"] .footer { border-top-color: #2E2E2E; }
body[data-theme="dark"] .modal-header { border-bottom-color: #2E2E2E; }
body[data-theme="dark"] .search-results-header { border-bottom-color: #2E2E2E; }
body[data-theme="dark"] .search-result-item .site-category { background: #333; }
body[data-theme="dark"] .card-tag { background: #2A2E35; color: #6DBD9A; }
body[data-theme="dark"] .site-item { background: #242830; }
body[data-theme="dark"] .site-item:hover { background: #2E323A; }
body[data-theme="dark"] .search-result-item:hover { background: #242830; }
body[data-theme="dark"] .modal-close { background: #333; color: #ccc; }
body[data-theme="dark"] .modal-close:hover { background: #4A2020; }
body[data-theme="dark"] .clear-search-btn { border-color: #3A3A3A; color: #999; }
body[data-theme="dark"] .clear-search-btn:hover { border-color: #C0808E; color: #e88; background: #2A1E1E; }
body[data-theme="dark"] .header-desc,
body[data-theme="dark"] .logo-text,
body[data-theme="dark"] .search-btn { color: #fff; }
body[data-theme="dark"] .search-btn { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
body[data-theme="dark"] .search-box { border-color: #333; }
body[data-theme="dark"] .notice-bar { border-left-color: var(--primary-dark); }
body[data-theme="dark"] .history-bar { border-left-color: var(--pink); }

/* ---------- 全局 ---------- */
*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }

html { font-size:16px; scroll-behavior:smooth; -webkit-font-smoothing:antialiased; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  letter-spacing: -0.01em;
}

.container { max-width:var(--max-width); margin:0 auto; padding:0 var(--spacing-lg); }

a { color:inherit; text-decoration:none; }
ul { list-style:none; }

/* ---------- 头部 — 更大、更有呼吸感 ---------- */
.header {
  background: linear-gradient(160deg, var(--primary-light) 0%, var(--accent-light) 45%, var(--pink-light) 100%);
  padding: var(--spacing-3xl) 0 var(--spacing-2xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: -80px; right: -60px;
  width: 240px; height: 240px;
  background: rgba(255,255,255,.2);
  border-radius: 50%;
}

.header::after {
  content: '';
  position: absolute;
  bottom: -70px; left: -50px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,.14);
  border-radius: 50%;
}

/* 额外的装饰 — 小圆点 */
.header-inner { position:relative; z-index:1; }

.logo { display:inline-flex; align-items:center; gap:14px; }

.logo-icon {
  font-size: 46px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.08));
  animation: float 4s var(--ease-in-out) infinite;
}

.logo-text {
  font-size: 40px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 3px;
  text-shadow: 0 2px 16px rgba(0,0,0,.06);
}

.header-desc {
  margin-top: 12px;
  font-size: 15px;
  font-weight: 400;
  color: rgba(255,255,255,.78);
  letter-spacing: 4px;
}

/* 搜索行 — 搜索框 + 天气 */
.search-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.search-row .search-box {
  flex: 1;
  max-width: 600px;
  margin: 0;
}

/* 天气组件 — 和搜索框同行 */
.weather-widget {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid rgba(0,0,0,.06);
  padding: 12px 18px;
  border-radius: var(--radius-full);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: default;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: box-shadow .25s var(--ease-out);
}

.weather-widget:hover {
  box-shadow: var(--shadow-sm);
}

.weather-icon { font-size: 20px; line-height: 1; }
.weather-temp { font-weight: 700; font-size: 15px; min-width: 28px; text-align: center; color: var(--primary-dark); }
.weather-city { font-size: 12px; color: var(--text-secondary); max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 悬浮搜索栏 — 磨砂玻璃质感 ---------- */
.sticky-search {
  position: fixed;
  top: 16px; left: 50%;
  transform: translateX(-50%) translateY(-120%);
  z-index: 999;
  max-width: 640px;
  width: calc(100% - 40px);
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,.5);
  border-radius: var(--radius-full);
  box-shadow: 0 4px 24px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04);
  padding: 6px;
  opacity: 0;
  pointer-events: none;
  transition: transform .45s var(--ease-out), opacity .35s var(--ease-out);
}

.sticky-search.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.sticky-search-inner {
  display: flex;
  align-items: center;
  gap: 0;
}

.sticky-logo {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-dark);
  white-space: nowrap;
  flex-shrink: 0;
  padding: 0 6px 0 16px;
  letter-spacing: .5px;
}

.sticky-search-box {
  flex: 1;
  margin: 0;
  border: none !important;
  box-shadow: none !important;
  background: transparent;
  border-radius: var(--radius-full);
}

.sticky-search-box:focus-within {
  border-color: transparent !important;
  box-shadow: none !important;
}

.sticky-search-box .search-input {
  padding: 10px 14px;
  font-size: 14px;
  background: transparent;
}

.sticky-search-box .search-btn {
  padding: 10px 18px;
  font-size: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: var(--radius-full);
  margin-right: 4px;
}

/* 暗夜下磨砂加深 */
body[data-theme="dark"] .sticky-search {
  background: rgba(30,33,38,.82);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 4px 24px rgba(0,0,0,.30), 0 1px 4px rgba(0,0,0,.20);
}

/* 手机端悬浮栏适配 */
@media (max-width: 560px) {
  .header-inner { display: flex; flex-direction: column; align-items: center; }
  .search-row { flex-direction: column; gap: 10px; }
  .weather-widget { padding: 8px 16px; font-size: 13px; }
  .weather-icon { font-size: 18px; }
  .sticky-logo { display: none; }
  .sticky-search-inner { gap: 0; }
  .sticky-search-box { max-width: 100%; }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-6px) rotate(2deg); }
  75% { transform: translateY(-10px) rotate(-2deg); }
}

/* ---------- 搜索 — 悬浮玻璃感 ---------- */
.search-section { padding: var(--spacing-xl) 0 var(--spacing-sm); }

.search-box {
  display: flex;
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1.5px solid rgba(0,0,0,.06);
  border-radius: var(--radius-full);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color .25s var(--ease-out), box-shadow .35s var(--ease-out);
}

.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: var(--shadow-md), 0 0 0 4px var(--primary-dim);
}

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

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

.search-btn {
  padding: 15px 30px;
  border:none;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color:#fff;
  font-size:15px;
  font-weight:600;
  cursor:pointer;
  font-family:var(--font);
  white-space:nowrap;
  letter-spacing: .5px;
  transition: opacity .2s, transform .2s var(--ease-out);
}

.search-btn:hover { opacity:.92; }
.search-btn:active { transform: scale(.98); }

/* 搜索结果 */
.search-results {
  max-width: 600px;
  margin: var(--spacing-md) auto 0;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: var(--spacing-lg);
  border: 1px solid rgba(0,0,0,.04);
}

.search-results-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0,0,0,.06);
  font-size:13px;
  color:var(--text-secondary);
}

.clear-search-btn {
  background:none;
  border:1px solid rgba(0,0,0,.1);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  cursor:pointer;
  font-size:12px;
  color:var(--text-secondary);
  font-family:var(--font);
  transition: all .2s var(--ease-out);
}

.clear-search-btn:hover { border-color:var(--pink); color:#d66; background:var(--pink-dim); }

.search-result-list { display:flex; flex-direction:column; gap:4px; }

.search-result-item {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  transition: background .2s var(--ease-out);
  border: 1px solid transparent;
}

.search-result-item:hover {
  background: var(--bg-warm);
  border-color: rgba(0,0,0,.04);
}

.search-result-item .site-name { font-weight: 600; font-size: 14px; }
.search-result-item .site-category {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg);
  padding: 2px 10px;
  border-radius: var(--radius-full);
}
.search-result-item .site-link { font-size:12px; color:var(--primary-dark); }

.search-no-result { text-align:center; color:var(--text-muted); padding: var(--spacing-xl); }

/* ---------- 公告栏 ---------- */
.notice-section { padding: var(--spacing-md) 0; }

.notice-bar {
  display:flex;
  align-items:center;
  gap: 12px;
  background: var(--bg-card);
  border-radius: var(--radius-full);
  padding: 12px 24px;
  box-shadow: var(--shadow-xs);
  border: 1px solid rgba(0,0,0,.04);
  border-left: 4px solid var(--primary);
}

.notice-icon { font-size: 16px; flex-shrink:0; }
.notice-scroll { flex:1; overflow:hidden; }

.notice-text {
  display:inline-block;
  white-space:nowrap;
  animation: scrollNotice 24s linear infinite;
  color: var(--text-secondary);
  font-size: 13px;
}

@keyframes scrollNotice {
  0%   { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ---------- 分类网格 ---------- */
.main { padding: var(--spacing-lg) 0 var(--spacing-3xl); }

.category-grid {
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
}

/* ---------- 分类卡片 — 更精致的卡片 ---------- */
.category-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: var(--spacing-xl) var(--spacing-lg) var(--spacing-lg);
  box-shadow: var(--shadow-xs);
  border: 1px solid rgba(0,0,0,.04);
  cursor: pointer;
  transition: transform .35s var(--ease-out),
              box-shadow .35s var(--ease-out),
              border-color .35s var(--ease-out);
  position: relative;
  overflow: hidden;
}

/* 卡片顶部色条 — 更宽、更柔和 */
.category-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  transition: height .35s var(--ease-out);
  opacity: .7;
}

.category-card:nth-child(7n+1)::before { background: var(--primary); }
.category-card:nth-child(7n+2)::before { background: var(--accent); }
.category-card:nth-child(7n+3)::before { background: var(--pink); }
.category-card:nth-child(7n+4)::before { background: #E0BE8C; }
.category-card:nth-child(7n+5)::before { background: #B0A0D0; }
.category-card:nth-child(7n+6)::before { background: #88C0B8; }
.category-card:nth-child(7n+7)::before { background: #D898B0; }

/* 卡片背景微渐变 */
.category-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 100% 0%, rgba(0,0,0,.015) 0%, transparent 70%);
  pointer-events: none;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(0,0,0,.08);
}

.category-card:hover::before { height: 4px; opacity: 1; }

.card-icon {
  font-size: 40px;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.card-title {
  font-size: 21px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text);
  position: relative; z-index:1;
  letter-spacing: .5px;
}

.card-count {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  position: relative; z-index:1;
}

.card-tags {
  display:flex;
  flex-wrap:wrap;
  gap: 6px;
  position: relative; z-index:1;
}

.card-tag {
  font-size: 11px;
  padding: 4px 12px;
  background: var(--bg-warm);
  border: 1px solid rgba(0,0,0,.04);
  border-radius: var(--radius-full);
  color: var(--primary-dark);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width: 130px;
  font-weight: 500;
}

/* ---------- 弹窗 ---------- */
.modal {
  position:fixed;
  inset:0;
  z-index:1000;
  display:flex;
  align-items:center;
  justify-content:center;
}

.modal-overlay {
  position:absolute;
  inset:0;
  background: rgba(0,0,0,.30);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-content {
  position:relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 720px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(0,0,0,.06);
  animation: modalIn .35s var(--ease-spring);
}

@keyframes modalIn {
  from { opacity:0; transform: translateY(24px) scale(.96); }
  to   { opacity:1; transform: translateY(0) scale(1); }
}

.modal-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: var(--spacing-lg);
  border-bottom: 1px solid rgba(0,0,0,.06);
  position:sticky;
  top:0;
  background: var(--bg-card);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  z-index:2;
  backdrop-filter: blur(12px);
}

.modal-title { font-size:22px; font-weight:700; }

.modal-close {
  width: 38px; height: 38px;
  border: 1px solid rgba(0,0,0,.08);
  background: var(--bg);
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s var(--ease-out);
  color: var(--text-secondary);
}

.modal-close:hover { background: var(--pink-dim); color:#d55; border-color:var(--pink); }

.modal-body { padding: var(--spacing-lg); }

.site-list { display:grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }

.site-item {
  display:flex;
  align-items:center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-warm);
  border: 1px solid transparent;
  transition: all .25s var(--ease-out);
}

.site-item:hover {
  background: var(--primary-dim);
  border-color: var(--primary-light);
  transform: translateX(4px);
}

.site-item .s-icon { font-size: 22px; flex-shrink:0; }
.site-item .s-info { flex:1; min-width:0; }
.site-item .s-name { font-weight: 600; font-size: 14px; display: block; color: var(--text); }
.site-item .s-desc { font-size: 12px; color: var(--text-secondary); display: block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.site-item .s-arrow {
  opacity: 0;
  transition: opacity .25s var(--ease-out), transform .25s var(--ease-out);
  color: var(--primary-dark);
  font-size: 14px;
}

.site-item:hover .s-arrow { opacity:1; transform: translateX(2px); }

/* ---------- 主题切换 ---------- */
.theme-switcher {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.theme-toggle-btn {
  width: 48px; height: 48px;
  border: 1px solid rgba(0,0,0,.08);
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  transition: transform .3s var(--ease-spring), box-shadow .3s var(--ease-out);
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle-btn:hover {
  transform: scale(1.12);
  box-shadow: var(--shadow-lg);
}

.theme-palette {
  display: none;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 30px;
  padding: 10px;
}

.theme-palette.show { display: flex; }

.theme-dot {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  cursor: pointer;
  transition: transform .25s var(--ease-spring), border-color .25s var(--ease-out);
}

.theme-dot:hover { transform: scale(1.18); }
.theme-dot.active { border-color: var(--text); }

.theme-dot.green { background: linear-gradient(135deg, #6DBD9A, #A8DCC4); }
.theme-dot.pink  { background: linear-gradient(135deg, #E49AAC, #F5CCD6); }
.theme-dot.blue  { background: linear-gradient(135deg, #62A8C8, #A8D4E8); }
.theme-dot.dark  { background: linear-gradient(135deg, #1E2126, #3A3E44); }

/* ---------- 历史浏览 ---------- */
.history-section { padding: 0 0 var(--spacing-md); }

.history-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 12px 18px;
  box-shadow: var(--shadow-xs);
  border: 1px solid rgba(0,0,0,.04);
  border-left: 4px solid var(--pink);
  flex-wrap: wrap;
}

.history-label { font-size: 13px; color: var(--text-secondary); white-space:nowrap; flex-shrink:0; font-weight:600; }

.history-list { display:flex; flex-wrap:wrap; gap:6px; align-items:center; flex:1; }

.history-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  padding: 4px 12px;
  background: var(--bg-warm);
  border: 1px solid rgba(0,0,0,.03);
  border-radius: var(--radius-full);
  color: var(--primary-dark);
  transition: all .2s var(--ease-out);
  cursor: pointer;
  white-space: nowrap;
}

.history-item:hover { background: var(--pink-dim); color: #c66; border-color: var(--pink-light); }

.history-clear {
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  transition: all .2s var(--ease-out);
}

.history-clear:hover { color: #d55; background: var(--pink-dim); }

.history-empty { font-size: 12px; color: var(--text-muted); }

/* ---------- 回到顶部 ---------- */
.back-to-top {
  position: fixed;
  bottom: 86px; right: 28px;
  z-index: 900;
  width: 48px; height: 48px;
  border: 1px solid rgba(0,0,0,.08);
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease-out), transform .3s var(--ease-spring);
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible { opacity:1; pointer-events:auto; }
.back-to-top:hover { transform: scale(1.12); box-shadow: var(--shadow-lg); }

/* ---------- 页脚 ---------- */
.footer {
  background: var(--bg-card);
  border-top: 1px solid rgba(0,0,0,.05);
  padding: var(--spacing-xl) 0;
  text-align: center;
}

.footer-text { font-size: 14px; color: var(--text-secondary); margin-bottom: 4px; }
.footer-sub { font-size: 12px; color: var(--text-muted); }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); gap: var(--spacing-md); }
  .logo-text { font-size: 30px; }
  .header { padding: var(--spacing-2xl) 0 var(--spacing-xl); }
  .site-list { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .category-grid { grid-template-columns: 1fr; gap: 14px; }
  .logo-text { font-size: 24px; letter-spacing: 1px; }
  .logo-icon { font-size: 34px; }
  .header-desc { font-size: 13px; letter-spacing: 2px; }
  .header { padding: var(--spacing-xl) 0 var(--spacing-lg); }
  .search-box { flex-direction: column; border-radius: var(--radius); }
  .search-input { padding: 13px 18px; }
  .search-btn { padding: 13px; border-radius: 0 0 var(--radius) var(--radius); text-align:center; }
  .modal-content { width: 95%; max-height: 90vh; }
  .card-title { font-size: 18px; }
  .notice-bar { border-radius: var(--radius); flex-direction: column; align-items: flex-start; gap: 6px; }
  .container { padding: 0 var(--spacing-md); }
}
