/* ==========================================================================
   全站共享设计令牌与基础壳层（仅放跨页面共用规则，首页专用规则在 gallery.css）
   ========================================================================== */
:root {
  --primary-color: #4d6bfe; /* DeepSeek 品牌蓝主题色 */
  --primary-color-dark: #3a65c2; /* hover 加深 */
  /* 深海蓝→鲸青轻量微渐变：只用于主按钮/选中态等品牌强调面 */
  --primary-grad: linear-gradient(135deg, #4d6bfe 0%, #4480e8 55%, #3e8ade 100%);
  --primary-grad-dark: linear-gradient(135deg, #3a65c2 0%, #3573c9 55%, #2f7cc4 100%);
  /* Q 弹曲线：overshoot 回弹，按压松手时轻微 bouncy */
  --bounce-ease: cubic-bezier(0.34, 1.56, 0.64, 1);
  --bg-color: #ffffff;
  --text-color: #1e232c;
  --shadow-color: rgba(0, 0, 0, 0.12);
}

body.dark {
  --primary-color: #5d79ff;
  --primary-color-dark: #4d6bfe;
  --text-color: #e0e0e0;
  --bg-color: #1c1e26;
  --shadow-color: rgba(0, 0, 0, 0.6);
  background-color: transparent;
  color: #e0e0e0;
}

/* 国产安卓浏览器（vivo/UC/QQ 系）常无视 viewport meta 做字体自动放大，全局钉死 text-size-adjust */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* 深海蓝渐变背景（fixed 伪元素铺视口，避免 Safari background-attachment:fixed 兼容坑） */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, #f7f9ff 0%, #eef2fb 55%, #e9f2f4 100%);
  pointer-events: none;
}

body.dark::before {
  background: linear-gradient(180deg, #121212 0%, #14161f 60%, #152130 100%);
}

body {
  font-family: "Roboto", Arial, sans-serif;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  background-color: transparent;
  transition: background-color 0.3s, color 0.3s;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  -webkit-touch-callout: none;
  -ms-touch-action: manipulation;
  touch-action: manipulation;
  color: var(--text-color);
}

/* 视觉隐藏但保留给读屏与爬虫（clip 法，非 display:none） */
.gj-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

main {
  width: 100%;
  box-sizing: border-box;
}

footer {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid rgba(77, 107, 254, 0.12);
  color: var(--text-color);
  text-align: center;
  padding: 14px 16px;
  margin-top: auto;
  opacity: 1;
  transition: opacity 1s;
  font-size: 13px;
  line-height: 1.7;
  padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
}

footer a {
  color: var(--primary-color);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

body.dark footer {
  background: rgba(24, 26, 33, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.dark footer a {
  color: #8fa6ff;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ========== 广告位 ========== */
#ad-banner-bottom {
  margin: 24px auto 12px;
  text-align: center;
  min-height: 50px;
}
#ad-banner-bottom:empty { display: none; }

/* Native Banner 穿插容器 */
.ad-native-wrap {
  margin: 12px 0;
  padding: 8px;
  border-radius: 8px;
  background: rgba(128,128,128,.06);
  overflow: hidden;
}
.ad-native-wrap > div[id^="container-"] { min-height: 120px; }

/* ========== 页面级分段胶囊导航（creators / videos / refs / plugins 共用） ========== */
.sec-tabs {
  display: flex; gap: 4px; width: max-content; max-width: calc(100vw - 32px);
  margin: 10px auto 2px; padding: 4px; border-radius: 999px;
  border: 1px solid rgba(30, 42, 80, 0.1); background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.sec-tab {
  padding: 5px 14px; border-radius: 999px; font-size: 0.82rem; line-height: 1.3;
  text-decoration: none; color: rgba(30, 35, 44, 0.7); white-space: nowrap;
  transition: background 0.18s, color 0.18s;
}
.sec-tab:hover { background: rgba(77, 107, 254, 0.1); color: #4d6bfe; }
.sec-tab.is-on { background: #4d6bfe; color: #fff; font-weight: 700; }
body.dark .sec-tabs { background: rgba(28, 30, 38, 0.72); border-color: rgba(255, 255, 255, 0.1); }
body.dark .sec-tab { color: #c8cede; }
body.dark .sec-tab.is-on { background: #4d6bfe; color: #fff; }
