/* ============================================
   小扁担 - 隐私政策 & 服务协议 共用样式
   q2.css
   ============================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif; color: #333; line-height: 1.8; background: #fff; }

/* ---- Header ---- */
.site-header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    background: rgba(255,255,255,0.96); backdrop-filter: blur(12px);
    box-shadow: 0 1px 6px rgba(0,0,0,0.06); transition: box-shadow 0.3s;
}
.header-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between; height: 64px;
}
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo-icon { width: 36px; height: 36px; }
.logo-text { font-size: 20px; font-weight: 700; color: #1677ff; }
.main-nav { display: flex; gap: 32px; list-style: none; }
.main-nav a {
    color: #555; font-size: 15px; text-decoration: none;
    padding: 4px 0; transition: color 0.3s; position: relative;
}
.main-nav a:hover, .main-nav a.active { color: #1677ff; }
.main-nav a.active::after {
    content: ''; position: absolute; bottom: -2px; left: 0; width: 100%;
    height: 2px; background: #1677ff; border-radius: 1px;
}
.header-cta {
    padding: 8px 24px; background: #1677ff; color: #fff;
    border-radius: 20px; font-size: 14px; text-decoration: none;
    transition: background 0.3s; border: none; cursor: pointer;
}
.header-cta:hover { background: #0958d9; }

/* ---- Hero Banner (Privacy - Blue) ---- */
body.page-privacy .page-hero {
    margin-top: 64px; padding: 60px 24px 40px;
    background: linear-gradient(135deg, #e8f3ff 0%, #f0f5ff 50%, #e6f0ff 100%);
    text-align: center;
}
/* ---- Hero Banner (Agreement - Orange) ---- */
body.page-agreement .page-hero {
    margin-top: 64px; padding: 60px 24px 40px;
    background: linear-gradient(135deg, #fff3e0 0%, #fff8e1 50%, #fef9e7 100%);
    text-align: center;
}
.page-hero h1 { font-size: 36px; font-weight: 700; color: #1a1a1a; margin-bottom: 12px; }
.page-hero p { font-size: 16px; color: #666; max-width: 600px; margin: 0 auto; }
.page-hero .update-date { font-size: 13px; color: #999; margin-top: 16px; }

/* ---- Content ---- */
.content-wrap {
    max-width: 900px; margin: 0 auto; padding: 48px 24px 80px;
}
.content-wrap h2 {
    font-size: 22px; font-weight: 700; color: #1a1a1a;
    margin: 48px 0 20px; padding-bottom: 10px;
}
.content-wrap h2:first-child { margin-top: 0; }
.content-wrap h3 {
    font-size: 18px; font-weight: 600; color: #222;
    margin: 32px 0 14px;
}
.content-wrap h4 {
    font-size: 16px; font-weight: 600; color: #333;
    margin: 24px 0 10px;
}
.content-wrap p { margin-bottom: 14px; text-align: justify; }
.content-wrap ul, .content-wrap ol {
    margin: 10px 0 14px 24px;
}
.content-wrap li { margin-bottom: 6px; }
.content-wrap .sensitive { font-weight: 700; text-decoration: underline; }
.content-wrap table {
    width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px;
}

/* Privacy theme - blue */
body.page-privacy .content-wrap h2 { border-bottom: 2px solid #e8f3ff; }
body.page-privacy .content-wrap .highlight { color: #1677ff; font-weight: 600; }
body.page-privacy .content-wrap th {
    background: #f0f5ff; color: #333; font-weight: 600;
    padding: 10px 14px; text-align: left; border: 1px solid #dde5f0;
}
body.page-privacy .content-wrap td {
    padding: 10px 14px; border: 1px solid #e8ecf0; vertical-align: top;
}
body.page-privacy .content-wrap tr:nth-child(even) td { background: #fafcff; }

/* Agreement theme - orange */
body.page-agreement .content-wrap h2 { border-bottom: 2px solid #fff3e0; }
body.page-agreement .content-wrap .highlight { color: #e65100; font-weight: 600; }
body.page-agreement .content-wrap th {
    background: #fff8e1; color: #333; font-weight: 600;
    padding: 10px 14px; text-align: left; border: 1px solid #f0e0b0;
}
body.page-agreement .content-wrap td {
    padding: 10px 14px; border: 1px solid #f0e8d0; vertical-align: top;
}
body.page-agreement .content-wrap tr:nth-child(even) td { background: #fffcf5; }

/* ---- App Section Card ---- */
body.page-privacy .app-section {
    background: #fafcff; border: 1px solid #e8f3ff; border-radius: 12px;
    padding: 28px 32px; margin: 32px 0;
}
body.page-agreement .app-section {
    background: #fffcf5; border: 1px solid #fff3e0; border-radius: 12px;
    padding: 28px 32px; margin: 32px 0;
}
.app-section-title {
    display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
}
.app-section-title .app-badge {
    display: inline-block; padding: 3px 12px; border-radius: 12px;
    font-size: 12px; font-weight: 600; color: #fff;
}
.app-section-title h3 { margin: 0; }
.badge-ks { background: linear-gradient(135deg, #ff6b35, #ff8f00); }
.badge-ksps { background: linear-gradient(135deg, #2196f3, #42a5f5); }
.badge-xnh { background: linear-gradient(135deg, #9c27b0, #ba68c8); }
.badge-kdy { background: linear-gradient(135deg, #4caf50, #66bb6a); }
.badge-yz { background: linear-gradient(135deg, #ff5722, #ff8a65); }
.badge-yzpro { background: linear-gradient(135deg, #e91e63, #f06292); }

/* ---- Important Notice Box (Agreement) ---- */
.notice-box {
    background: #fff3e0; border-left: 4px solid #ff8f00;
    padding: 16px 20px; margin: 20px 0; border-radius: 0 8px 8px 0;
}
.notice-box p { margin-bottom: 6px; font-size: 14px; color: #5d4037; }
.notice-box p:last-child { margin-bottom: 0; }

/* ---- CTA Section ---- */
.cta-section {
    text-align: center; padding: 80px 24px;
    background: linear-gradient(135deg, #e6f4ff 0%, #f0f5ff 100%);
}
.cta-title { font-size: 32px; font-weight: 700; color: #1a1a1a; margin-bottom: 14px; }
.cta-desc { font-size: 16px; color: #666; margin-bottom: 32px; }
.cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
    padding: 12px 36px; background: #1677ff; color: #fff;
    border-radius: 8px; font-size: 15px; text-decoration: none;
    transition: all 0.3s; border: none; cursor: pointer;
}
.btn-primary:hover { background: #0958d9; transform: translateY(-1px); }
.btn-outline {
    padding: 12px 36px; border: 1px solid #1677ff; color: #1677ff;
    border-radius: 8px; font-size: 15px; text-decoration: none;
    transition: all 0.3s; background: transparent; cursor: pointer;
}
.btn-outline:hover { background: #1677ff; color: #fff; }

/* ---- Footer ---- */
.site-footer {
    background: #1a1a2e; color: #ccc; padding: 56px 24px 24px;
}
.footer-inner {
    max-width: 1200px; margin: 0 auto;
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px;
}
.footer-brand .logo-text { font-size: 22px; font-weight: 700; color: #fff; }
.footer-brand p { margin-top: 12px; color: #888; font-size: 14px; line-height: 1.6; }
.footer-links h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #999; font-size: 14px; text-decoration: none; transition: color 0.3s; }
.footer-links a:hover { color: #1677ff; }
.footer-bottom {
    grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 36px; padding-top: 20px; text-align: center;
    font-size: 13px; color: #666;
}
.footer-bottom a { color: #888; text-decoration: none; }
.footer-bottom a:hover { color: #1677ff; }

/* ---- Mobile ---- */
@media (max-width: 768px) {
    .header-inner { height: 56px; }
    .main-nav { display: none; }
    .page-hero { padding: 48px 20px 32px; }
    .page-hero h1 { font-size: 26px; }
    .content-wrap { padding: 32px 16px 60px; }
    .content-wrap h2 { font-size: 19px; }
    .content-wrap h3 { font-size: 16px; }
    .app-section { padding: 20px; }
    .footer-inner { grid-template-columns: 1fr; gap: 28px; }
    .cta-section { padding: 56px 20px; }
    .cta-title { font-size: 24px; }
}

/* ---- Back to top ---- */
.back-to-top {
    position: fixed; bottom: 32px; right: 32px; width: 44px; height: 44px;
    border: none; border-radius: 50%;
    font-size: 20px; cursor: pointer;
    transition: all 0.3s; display: none; z-index: 999;
    background: #1677ff; color: #fff;
    box-shadow: 0 4px 12px rgba(22,119,255,0.3);
}
.back-to-top:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(22,119,255,0.4); }
body.page-privacy .back-to-top {
    background: #1677ff; color: #fff;
    box-shadow: 0 4px 12px rgba(22,119,255,0.3);
}
body.page-privacy .back-to-top:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(22,119,255,0.4); }
body.page-agreement .back-to-top {
    background: #ff8f00; color: #fff;
    box-shadow: 0 4px 12px rgba(255,143,0,0.3);
}
body.page-agreement .back-to-top:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(255,143,0,0.4); }
.back-to-top.visible { display: flex; align-items: center; justify-content: center; }

/* ---- TOC ---- */
body.page-privacy .toc-card {
    background: #f8faff; border: 1px solid #e0eaff; border-radius: 12px;
    padding: 24px 28px; margin-bottom: 40px;
}
body.page-privacy .toc-card h3 { margin: 0 0 14px; font-size: 16px; color: #1677ff; }
body.page-privacy .toc-list a { color: #555; font-size: 14px; text-decoration: none; transition: color 0.2s; }
body.page-privacy .toc-list a:hover { color: #1677ff; }

body.page-agreement .toc-card {
    background: #fffcf5; border: 1px solid #fff3e0; border-radius: 12px;
    padding: 24px 28px; margin-bottom: 40px;
}
body.page-agreement .toc-card h3 { margin: 0 0 14px; font-size: 16px; color: #e65100; }
body.page-agreement .toc-list a { color: #555; font-size: 14px; text-decoration: none; transition: color 0.2s; }
body.page-agreement .toc-list a:hover { color: #e65100; }

.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-list li { margin-bottom: 6px; }
.toc-list .toc-app { font-weight: 600; color: #333; margin-top: 10px; font-size: 13px; }

/**
 * 小扁担官网 - 新增样式说明
 * 下方为本次新增的 CSS 样式，供您参考和复用
 * ============================================
 */

/* ========== 分类筛选区域（原有，与友链无关）========== */
.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 36px;
}

/* ========== 友情连接 / 合作伙伴 区域 ========== */
.friendship-links {
  padding: 56px 0;
  background: var(--bg-white);
  border-top: 1px solid var(--border);
}

/* 区块标题 */
.fl-header {
  text-align: center;
  margin-bottom: 36px;
}
.fl-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 8px;
}
.fl-desc {
  font-size: 14px;
  color: var(--text-gray);
}

/* 链接网格：默认 5 列 */
.fl-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

/* 单个链接卡片 */
.fl-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--bg-light);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  text-decoration: none;
  transition: all var(--transition);
}
.fl-item:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}
.fl-item:hover .fl-arrow {
  transform: translateX(4px);
}

/* 右侧箭头 */
.fl-arrow {
  color: var(--text-light);
  font-size: 16px;
  transition: transform var(--transition);
  flex-shrink: 0;
}

/* 底部提示文字 */
.fl-note {
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
}
.fl-note a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
.fl-note a:hover {
  text-decoration: underline;
}

/* ========== 响应式适配 ========== */

/* ≥1024px：小屏幕笔记本 */
@media (max-width: 1024px) {
  .fl-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 480px~768px：平板 */
@media (max-width: 768px) {
  .fl-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* <480px：手机 */
@media (max-width: 480px) {
  .fl-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .friendship-links {
    padding: 40px 0;
  }
}
