/* ============================================================
 * 会说Cloud 前端样式
 * 设计语言：移植自 rizhuti 主题（浅灰背景 + 深蓝导航 + 白色扁平卡片 + 蓝色主按钮）
 * 仅替换视觉，不改动任何业务类名（.resource/.card/.btn/.grid 等沿用）
 * ============================================================ */

/* ── 设计变量（rizhuti 调色板）── */
:root {
  --primary: #1890ff;          /* 主蓝（rizhuti btn-primary） */
  --primary-hover: #40a9ff;    /* 悬浮态蓝 */
  --primary-active: #0c6fd6;   /* 按下态蓝 */
  --navy: #001529;             /* 深蓝（页脚/深底） */
  --header-bg: rgba(0, 21, 41, .95); /* 顶部导航半透明深蓝 */
  --bg: #f6f6f6;               /* 页面背景（rizhuti body） */
  --text: #4e585a;             /* 正文文字 */
  --text-strong: #333;         /* 强调文字 */
  --text-muted: #999;          /* 弱文字 */
  --line: #e5e5e5;             /* 描边 */
  --line-soft: #eee;
  --card: #fff;                /* 卡片底色 */
  --price: #ff5e52;            /* 价格红（rizhuti 强调红） */
  --ok: #52c41a;               /* 成功绿 */
  --radius: 4px;               /* 通用圆角（rizhuti 风格，小圆角） */
  --radius-lg: 6px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .04), 0 1px 2px rgba(0, 0, 0, .08); /* rizhuti 卡片阴影 */
  --shadow-hover: 0 10px 20px rgba(213, 213, 213, .4);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Microsoft Yahei", "Hiragino Sans GB", "Heiti SC", "WenQuanYi Micro Hei", sans-serif;
  font-size: .875rem;       /* 14px，rizhuti 基准字号 */
  line-height: 1.6;
}
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--primary); text-decoration: none; }
svg { width: 1em; height: 1em; fill: currentColor; }
.svg-icon { display: inline-flex; align-items: center; justify-content: center; margin-right: 6px; vertical-align: -2px; }
img { max-width: 100%; vertical-align: middle; }
h1, h2, h3, h4, h5, h6 { margin-top: 0; color: var(--text-strong); font-weight: 700; }

/* ───────────────── 顶部导航（rizhuti .header）───────────────── */
.site-header {
  position: relative;
  z-index: 99;
  background: var(--header-bg);
  box-shadow: 0 2px 5px rgba(0, 0, 0, .07);
  transition: all .3s ease-in-out;
}
.header-inner {
  display: flex;
  align-items: center;
  height: 64px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}
.header-inner .logo {
  flex: 0 0 auto;
  margin-right: 24px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.header-inner .logo:hover { color: var(--primary); }
.site-nav { flex: 1 1 auto; }
.site-nav > ul { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.site-nav > ul > li { position: relative; }
.site-nav > ul > li > a {
  display: block;
  padding: 0 15px;
  height: 64px;
  line-height: 64px;
  color: #fff;
  font-size: .875rem;
  transition: color .25s;
}
.site-nav > ul > li > a:hover { color: var(--primary); }
.site-nav > ul > li.current > a { color: var(--primary); }

/* 右侧登录/用户区（rizhuti .wel / .wel-login） */
.wel { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; margin-left: 12px; }
.wel > a {
  display: inline-block;
  padding: 6px 16px;
  font-size: .8125rem;
  color: #fff;
  white-space: nowrap;
  transition: color .25s, background-color .25s;
}
.wel > a:hover { color: var(--primary); }
.wel .login-link { color: #fff; }
.wel .login-link:hover { color: var(--primary); }
.wel .reg-link {
  border: 1px solid var(--primary);
  border-radius: 50px;
  color: var(--primary);
  font-weight: 700;
}
.wel .reg-link:hover { background: var(--primary); color: #fff; }

/* ───────────────── 移动端汉堡菜单按钮（rizhuti 风格，桌面隐藏）───────────────── */
.nav-toggle {
  display: none;               /* 桌面不显示 */
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  margin-left: 4px;
  padding: 8px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  flex: 0 0 auto;
}
.nav-toggle i {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all .25s ease-in-out;
}
/* 菜单展开时三条横线变 X */
.site-header.nav-open .nav-toggle i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-header.nav-open .nav-toggle i:nth-child(2) { opacity: 0; }
.site-header.nav-open .nav-toggle i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ───────────────── 首页大图标题区（rizhuti .focusbox）───────────────── */
.focusbox {
  position: relative;
  padding: 60px 0;
  background: var(--navy);
  color: #eee;
  text-align: center;
  overflow: hidden;
}
.focusbox::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(24, 144, 255, .25), transparent 55%),
              radial-gradient(circle at 80% 0%, rgba(24, 144, 255, .18), transparent 50%);
}
.focusbox .container { position: relative; }
.focusbox .focusbox-text { margin: 0 0 14px; color: #d6d6d6; font-size: 1rem; letter-spacing: 1px; }
.focusbox .focusbox-title {
  margin: 0;
  color: #fff;
  font-weight: 400;
  font-size: 1.9rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}

/* 顶部广告位容器 */
.top-ad { padding: 18px 0 0; }
.top-ad .container { padding: 0 15px; }

/* ───────────────── 容器 / 页脚 ───────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.footer { padding: 40px 0 0; }
.site-footer {
  margin-top: 40px;
  background: var(--navy);
  color: #bbb;
}
.site-footer a { color: #bbb; }
.site-footer a:hover { color: #fff; }
.footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 36px 0 28px;
  border-bottom: 1px solid rgba(172, 172, 172, .1);
}
.footer-col { flex: 1 1 180px; min-width: 140px; }
.footer-col.footer-brand { flex: 2 1 320px; }
.footer-logo { font-size: 1.25rem; font-weight: 700; color: #ccc; margin-bottom: 12px; }
.footer-desc { color: #9aa3ab; font-size: .8125rem; line-height: 1.7; max-width: 360px; }
.footer-col h4 {
  margin: 0 0 14px;
  font-size: .95rem;
  font-weight: 700;
  color: #fff;
}
.footer-col ul { margin: 0; padding: 0; list-style: none; }
.footer-col ul li { padding: 6px 0; font-size: .8125rem; transition: all .15s ease; }
.footer-col ul li:hover { color: #fff; }
.footer-copyright {
  padding: 18px 0;
  font-size: 13px;
  text-align: center;
  color: #acacac;
}
.footer-copyright a { color: #acacac; }
.footer-copyright a:hover { color: var(--primary); }

/* ───────────────── 通用通知 / 公告 / 广告横幅 ───────────────── */
.notice, .ad-banner, .danger-notice {
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.notice { background: #e6f7ff; border-color: #91d5ff; color: #0c4a8a; }
.danger-notice { background: #fff1f0; border-color: #ffccc7; color: #a41233; }
.danger-notice p { margin-bottom: 0; }
.announce-card {
  margin-bottom: 18px;
  padding: 18px 22px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.announce-card h3 { margin: 0 0 8px; color: var(--primary); }

/* ───────────────── 搜索框 ───────────────── */
.search { display: grid; grid-template-columns: 1fr 150px; gap: 12px; margin: 22px 0; }
.ai-search-toggle { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; cursor: pointer; font-size: 14px; color: var(--text-muted); }
.ai-search-toggle input { width: auto; }

/* ───────────────── 标签 / 分类筛选 ───────────────── */
.tags-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.tag {
  display: inline-block;
  padding: 5px 10px;
  background: #f2f2f2;
  border-radius: 2px;
  color: #999;
  font-size: 12px;
  line-height: 1.2;
  transition: all .2s ease;
}
.tag:hover { background: var(--price); color: #fff; }
.category-row, .actions, .tabs, .user-menu, .sub-menu { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.pill, .tabs a {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 50px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: .875rem;
  transition: all .2s ease;
}
.pill:hover, .tabs a:hover { color: var(--primary); border-color: var(--primary); }
.pill.active, .tabs a.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ───────────────── 首页统计公告卡片（单行布局 + 轮播）───────────────── */
.stats-box {
  background: var(--card);
  border: 1px dashed #b9d6ff;
  border-radius: 12px;
  padding: 14px 18px;
  margin: 18px 0;
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap;
}
.stats-left { display: flex; align-items: center; gap: 8px; flex: 1 1 280px; min-width: 0; }
.stats-icon { font-size: 1rem; color: #0b86ff; white-space: nowrap; flex-shrink: 0; }
.stats-marquee { position: relative; flex: 1; min-width: 0; height: 1.6em; overflow: hidden; }
.stats-msg {
  position: absolute; inset: 0; opacity: 0; transition: opacity .4s ease;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.6;
}
.stats-msg.active { opacity: 1; }
.stats-right { display: flex; flex-wrap: nowrap; gap: 6px; flex: 0 0 auto; }
.stat-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  border: 1px dashed #b9d6ff;
  border-radius: 999px;
  background: rgba(11,134,255,0.04);
  font-size: .8125rem;
  white-space: nowrap;
}
.stat-label { color: #6b7c93; }
.stat-value { color: #1a2942; font-weight: 800; min-width: 1.5em; text-align: right; }
@media (min-width: 769px) {
  .stats-box { padding: 14px 22px; }
  .stats-right { gap: 8px; }
  .stat-pill { font-size: .875rem; padding: 6px 14px; }
}

/* ───────────────── 分页 ───────────────── */
.pager { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 24px 0; }
.pager a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); color: var(--text); font-size: .875rem;
  text-decoration: none; transition: all .2s ease;
}
.pager a:hover { color: var(--primary); border-color: var(--primary); }
.pager a.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 700; }
.pager .muted { font-size: .8125rem; }
.pager .ellipsis { color: var(--text); padding: 0 4px; }

/* ───────────────── 表单 / 按钮 ───────────────── */
input, textarea, select, button {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text-strong);
  background: #fff;
  font: inherit;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(24, 144, 255, .15);
}
input[type="checkbox"], input[type="radio"] { width: auto; }
textarea { min-height: 96px; }
label { display: inline-block; margin-bottom: 5px; font-weight: 700; color: var(--text-strong); }

button, .btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border: 1px solid transparent;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  padding: 9px 22px;
  font-weight: 400;
  font-size: .875rem;
  line-height: 1.5;
  cursor: pointer;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, .1);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .045);
  transition: all .2s ease-in-out;
  user-select: none;
}
button:hover, .btn:hover { background: var(--primary-hover); color: #fff; }
button:active, .btn:active { background: var(--primary-active); }
.btn.ghost { background: #fff; border-color: var(--line); color: var(--text); text-shadow: none; box-shadow: none; }
.btn.ghost:hover { color: var(--primary); border-color: var(--primary); background: #fff; }
.btn.tiny { padding: 5px 14px; font-size: .8125rem; }
.btn.wide { width: 100%; margin-top: 16px; }

/* ───────────────── 卡片 / 资源 / 面板 / 详情 ───────────────── */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.grid.home-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } /* 首页资源一行 4 个 */
.resource, .card, .panel, .detail, .stats > div {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: box-shadow .3s cubic-bezier(.215, .61, .355, 1), transform .3s cubic-bezier(.215, .61, .355, 1);
}
.resource:hover, .card:hover, .panel:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.resource { animation: fadeIn .5s both; }
.resource-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.resource-top span, .resource span { display: inline-flex; align-items: center; color: var(--primary); font-size: 13px; font-weight: 700; }
.owned-badge {
  display: inline-flex; align-items: center; padding: 4px 10px;
  border-radius: 50px; color: #06734f; background: #f6ffed; border: 1px solid #b7eb8f;
  font-size: 13px; font-weight: 700;
}
.updated-badge {
  display: inline-flex; align-items: center; padding: 4px 10px;
  border-radius: 50px; color: #d46b08; background: #fff7e6; border: 1px solid #ffd591;
  font-size: 13px; font-weight: 700; margin-right: 8px;
}
.detail-owned { margin-left: 8px; }
.resource h3 { min-height: 54px; margin: 12px 0; font-size: 1.05rem; line-height: 1.4; }
.resource h3 a { color: var(--text-strong); }
.resource h3 a:hover { color: var(--primary); }
.resource p, .muted { color: var(--text-muted); }
.meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.meta b, .price { color: var(--price); font-size: 1.5rem; font-weight: 700; }
.sale-price { color: var(--price); font-weight: 700; }
del { margin-left: 8px; color: var(--text-muted); font-size: 15px; font-weight: 400; }
.meta em { color: var(--text-muted); font-style: normal; }
.meta time.meta-date { color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.meta .meta-views { color: var(--text-muted); font-size: 12px; white-space: nowrap; }
.detail-date { margin: 0 0 8px; font-size: 13px; }
.detail-views { margin: 0 0 8px; font-size: 13px; }

.detail { display: grid; grid-template-columns: 1fr 280px; gap: 26px; align-items: start; }
.resource-body { margin: 18px 0; padding: 18px; border-radius: var(--radius); background: #fafafa; border: 1px solid var(--line-soft); line-height: 1.8; }
.resource-body img { display: block !important; max-width: 100% !important; width: 100% !important; height: auto !important; margin: 10px auto; border-radius: 6px; }
.form { max-width: 520px; margin: 0 auto; display: grid; gap: 12px; }
.wide-form { max-width: 760px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.stats > div { padding: 18px; }
.stats b { display: block; font-size: 1.6rem; color: var(--primary); }
.stats span { color: var(--text-muted); }

/* 资源封面图 */
.resource-cover { display: block; width: 100%; height: 160px; overflow: hidden; border-radius: var(--radius); margin-bottom: 12px; background: linear-gradient(135deg, #e3f1fe, #f0f9ff); }
.resource-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.resource:hover .resource-cover img { transform: scale(1.05); }
.detail-cover { width: 100%; max-height: 360px; overflow: hidden; border-radius: var(--radius); margin: 14px 0; background: linear-gradient(135deg, #e3f1fe, #f0f9ff); }
.detail-cover img { width: 100%; max-height: 360px; object-fit: cover; display: block; border-radius: var(--radius); }
.thumb { width: 100%; height: 150px; object-fit: cover; border-radius: var(--radius); margin-bottom: 12px; }

/* ───────────────── 用户菜单 / 徽章 ───────────────── */
.user-menu { padding: 14px; border-radius: var(--radius-lg); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.user-menu a { padding: 8px 14px; border-radius: 50px; background: #e6f7ff; color: var(--primary); font-weight: 700; }
.user-menu a:hover { background: var(--primary); color: #fff; }
.badge { display: inline-flex; padding: 4px 10px; border-radius: 50px; font-weight: 700; font-size: 13px; }
.badge.yellow { background: #fffbe6; color: #ad6800; }
.badge.green { background: #f6ffed; color: #389e0d; }
.badge.red, .danger-link { background: #fff1f0; color: #cf1322; }

/* ───────────────── 表格 ───────────────── */
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th, td { padding: 12px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
th { color: var(--text-strong); font-weight: 700; background: #fafafa; }
tbody tr:hover { background: #fafafa; }
code { background: #f0f5ff; padding: 3px 7px; border-radius: var(--radius); color: #0756d8; font-size: .85em; }

/* ───────────────── 广告 ───────────────── */
.ad-grid { display: grid; grid-template-columns: repeat(6, minmax(118px, 1fr)); gap: 10px; margin: 20px 0; max-width: 100%; }
.text-ad { min-width: 0; height: 42px; display: flex; align-items: center; justify-content: center; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); color: var(--text); font-size: 15px; font-weight: 700; line-height: 1; text-align: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; box-shadow: var(--shadow); }
.text-ad:hover { color: var(--primary); border-color: var(--primary); }
.ad-banner-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 10px 0; }
.img-ad { display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-soft); background: var(--card); box-shadow: var(--shadow); transition: transform .15s; }
.img-ad:hover { transform: translateY(-2px); }
.img-ad img { display: block; width: 100%; height: auto; object-fit: contain; }
.img-ad.text-only { display: flex; align-items: center; justify-content: center; height: 80px; padding: 10px 14px; color: var(--primary); font-weight: 700; font-size: 16px; text-align: center; }

/* 后台广告管理网格 */
.ad-admin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0; }
.ad-admin-item, .mini-form { display: grid; gap: 8px; }

/* ───────────────── 弹窗 ───────────────── */
.modal-mask { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0, 21, 41, .5); }
.modal { max-width: 460px; width: 100%; padding: 26px; border-radius: var(--radius-lg); background: #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, .4); }
.modal h3 { margin-top: 0; color: var(--primary); }

/* ───────────────── 购买成功页（rizhuti 风格扁平化）───────────────── */
.success-hero { display: grid; grid-template-columns: 1fr 120px; gap: 20px; align-items: center; padding: 26px; margin-bottom: 18px; border-radius: var(--radius-lg); color: #0c4a8a; background: #e6f7ff; border: 1px solid #91d5ff; }
.success-kicker { display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 50px; background: var(--primary); color: #fff; font-weight: 700; font-size: .8125rem; }
.success-hero h2 { margin: 12px 0 8px; font-size: clamp(22px, 4vw, 34px); color: var(--text-strong); }
.success-hero p { margin: 0; color: #0c4a8a; }
.success-seal { width: 110px; height: 110px; display: grid; place-items: center; border-radius: 50%; border: 2px dashed var(--primary); color: var(--primary); font-weight: 700; letter-spacing: 2px; transform: rotate(-12deg); }
.success-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; }
.success-info h2 { margin-top: 0; }
.info-list { display: grid; gap: 10px; }
.info-list p { display: flex; justify-content: space-between; gap: 14px; margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.info-list b { color: var(--text-strong); }

/* ───────────────── 安装页 ───────────────── */
.install-wrap { max-width: 920px; }
.install-card { margin: 28px auto; }
.install-card h1 { margin-top: 0; font-size: clamp(28px, 5vw, 44px); }
.agree-line { display: flex; gap: 10px; align-items: center; margin: 18px 0; font-weight: 700; }

/* ───────────────── 移动端底部导航栏（默认隐藏，仅 ≤768px 显示）───────────────── */
.mbottombar { display: none; }

/* ───────────────── 后台（保持蓝调，仅对齐主色）───────────────── */
.admin-body { background: #f0f2f5; }
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.admin-sidebar { position: sticky; top: 0; height: 100vh; padding: 22px 18px; background: linear-gradient(180deg, #0746b5, #078cff 62%, #12c8ff); color: #fff; overflow-y: auto; box-shadow: 18px 0 50px rgba(7, 86, 216, .18); }
.admin-logo { font-size: 22px; font-weight: 900; letter-spacing: 1px; }
.admin-sub { margin: 6px 0 22px; color: #d9f8ff; font-size: 13px; }
.menu-group { margin: 18px 0 4px; padding: 8px 6px 8px 8px; font-size: 13px; font-weight: 900; letter-spacing: 2px; color: rgba(255, 255, 255, .75); cursor: pointer; user-select: none; border-radius: 12px; transition: background .2s; }
.menu-group:hover { background: rgba(255, 255, 255, .08); }
.menu-arrow { display: inline-block; font-size: 10px; margin-right: 6px; transition: transform .25s; }
.menu-arrow.open { transform: rotate(90deg); }
.menu-group-body { display: grid; gap: 4px; margin: 2px 0 2px 14px; padding-left: 8px; border-left: 2px solid rgba(255, 255, 255, .15); }
.admin-sidebar nav { display: grid; gap: 8px; }
.admin-sidebar a { position: relative; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, .1); color: #fff; font-weight: 900; }
.admin-sidebar a:hover { background: rgba(255, 255, 255, .2); }
.admin-bottom-nav { margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .18); display: grid; gap: 8px; }
.menu-dot { position: absolute; top: 8px; right: 8px; width: 10px; height: 10px; border-radius: 50%; background: #ff4d6d; box-shadow: 0 0 0 2px rgba(255, 255, 255, .24); }
.admin-main { min-width: 0; padding: 24px; }
.admin-main .panel, .admin-main .stats > div { box-shadow: 0 1px 3px rgba(0, 0, 0, .06); }
.admin-copy { padding: 12px 24px; margin-left: 238px; color: var(--text-muted); font-size: 13px; text-align: center; }

/* ───────────────── 动画 ───────────────── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ───────────────── 响应式 ───────────────── */
@media (max-width: 768px) {
  .header-inner { height: auto; align-items: center; padding: 6px 15px; }
  .logo { margin-right: 12px; font-size: 1.1rem; }
  .wel { margin-left: auto; }
  /* 移动端：汉堡按钮显示，横排菜单收进下拉面板（2026-08-22 改为汉堡菜单，替代横滑） */
  .nav-toggle { display: flex; }
  .site-nav {
    order: 3; flex-basis: auto; overflow: hidden;
    position: absolute; top: 100%; left: 0; right: 0;
    margin-top: 0; background: var(--header-bg);
    box-shadow: 0 8px 16px rgba(0, 0, 0, .12);
    max-height: 0; visibility: hidden; opacity: 0;
    transition: max-height .28s ease, opacity .28s ease, visibility .28s;
  }
  /* 点开汉堡后：显示完整菜单（纵向列表），永远不横向滚动 */
  .site-header.nav-open .site-nav { max-height: 400px; visibility: visible; opacity: 1; }
  .site-nav > ul { flex-wrap: wrap; flex-direction: column; width: 100%; }
  .site-nav > ul > li { width: 100%; }
  .site-nav > ul > li > a {
    display: block; height: auto; line-height: 1.4; padding: 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, .08); white-space: normal;
  }
  .site-nav > ul > li:first-child > a { border-top: 0; }
  .focusbox { padding: 34px 0; }
  .focusbox .focusbox-title { font-size: 1.3rem; }
  .search, .two-col, .detail, .success-grid, .success-hero { grid-template-columns: 1fr; display: grid; }
  .grid, .stats { grid-template-columns: 1fr; }
  /* 首页资源一行 4 个，移动端必须改单列（双类选择器优先级更高，必须用同样的双类选择器覆盖） */
  .grid.home-grid { grid-template-columns: 1fr; }
  /* 首页统计公告卡片：移动端公告占整行、4 个统计药丸 2x2 网格，避免横向滚动 */
  .stats-box { align-items: stretch; gap: 10px; }
  .stats-left { flex: 1 1 100%; }
  .stats-right { flex: 1 1 100%; flex-wrap: wrap; }
  .stat-pill { flex: 1 1 calc(50% - 4px); justify-content: space-between; padding: 8px 10px; }
  .resource h3 { min-height: 0; font-size: 1rem; line-height: 1.4; word-break: break-word; overflow-wrap: anywhere; }
  .resource .cover { aspect-ratio: 16 / 10; }
  .ad-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-admin-grid { grid-template-columns: 1fr; }
  .inline { flex-direction: column; }
  .footer-cols { padding: 24px 0 16px; }
  .admin-shell { grid-template-columns: 1fr; }
  /* 详情页 section.detail 的 padding 会挤窄图片渲染宽度，移动端去掉让它铺满 */
  section.detail { padding: 0; }
  /* 移动端详情内容容器加左右呼吸空间，避免标题/标签/说明文字贴卡片边界 */
  .detail > div { padding: 0 14px; box-sizing: border-box; }
  /* 资源正文容器：负 margin 抵消内容容器 padding，让图片仍能撑满 100%，同时保留白底卡片呼吸感 */
  .resource-body { margin: 18px -14px; padding: 14px; background: #fff; }
  /* 移动端隐藏大块页脚（footer-cols），只保留 copyright 行（含备案号+网站地图） */
  .site-footer .footer-cols { display: none; }
  .footer-copyright { text-align: center; padding-bottom: 40px; }
  /* 移动端底部导航栏 */
  .mbottombar {
    display: flex;
    position: fixed; left: 0; right: 0; bottom: 0;
    background: #fff; border-top: 1px solid #eee;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
    padding: 6px 0 calc(6px + env(safe-area-inset-bottom, 0));
    z-index: 998;
    justify-content: space-around; align-items: center;
  }
  .mbottombar a {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; gap: 2px;
    color: #666; font-size: 11px; text-decoration: none;
    padding: 4px 0;
  }
  .mbottombar a svg { width: 22px; height: 22px; }
  .mbottombar a.mbottombar-add {
    background: #0b86ff; border-radius: 50%;
    width: 48px; height: 48px;
    margin: -16px 6px 0; flex: 0 0 auto;
    color: #fff;
    box-shadow: 0 4px 10px rgba(11,134,255,0.4);
  }
  .mbottombar a.mbottombar-add svg { width: 24px; height: 24px; margin-top: 12px; }
  body { padding-bottom: 64px; }
  /* 后台 sidebar 在移动端改成顶部小条 + 折叠菜单，避免占用整屏导致主内容看不见 */
  .admin-sidebar { position: relative; height: auto; padding: 12px 14px; }
  .admin-logo { font-size: 18px; }
  .admin-sub { display: none; }
  .admin-sidebar nav { display: flex; flex-wrap: wrap; gap: 6px; }
  .menu-group { display: none; } /* 隐藏分组标题 */
  .menu-group-body { display: flex !important; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; border: none; }
  .admin-sidebar a { padding: 8px 12px; font-size: 13px; font-weight: 700; }
  .menu-dot { display: none; }
  .admin-bottom-nav { display: none; } /* 底部链接移到顶部菜单里 */
  .admin-main { padding: 16px; }
  .admin-copy { margin-left: 0; }
  /* AI 客服浮动按钮：移动端上移避开底部导航栏（chat.css 里 bottom:16px 贴底会挡「我的」） */
  .cs-btn { bottom: 80px !important; right: 12px !important; width: 52px !important; height: 52px !important; }
  .cs-btn svg { width: 24px !important; height: 24px !important; }
}
@media (min-width: 769px) and (max-width: 1024px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ───────────────── 自定义滚动条（rizhuti 蓝）───────────────── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }
html { scrollbar-color: #c1c1c1 #f1f1f1; scrollbar-width: thin; }

/* ───────────────── 头部搜索下拉（rizhuti .header-search-dropdown）───────────────── */
.wel .wel-search { display: inline-flex; align-items: center; }
.wel .wel-search > a {
  display: inline-flex; align-items: center; justify-content: center;
  height: 64px; padding: 0 12px; color: #fff; font-size: 18px;
}
.wel .wel-search > a:hover { color: var(--primary); }
.header-search-dropdown {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 90;
  display: none; padding: 14px 0; background: #fafafa;
  box-shadow: 0 3px 2px 0 rgba(0, 0, 0, .03), 0 1px 0 0 rgba(0, 0, 0, .04);
}
.header-search-dropdown.is-active { display: block; animation: fadeIn .4s; }
.header-search-dropdown .container { max-width: 760px; }
.search-form--horizontal { display: flex; align-items: center; }
.search-form__input-wrap { flex: 1 1 auto; }
.search-form__input { height: 46px; border: 1px solid var(--line); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); }
.search-form__submit-wrap { flex: 0 0 auto; }
.search-form__submit { height: 46px; padding: 0 28px; border-radius: 0 var(--radius) var(--radius) 0; }

/* ───────────────── 头像下拉菜单（rizhuti .wel .has-sub-menu）───────────────── */
.wel-item { position: relative; display: inline-flex; align-items: center; }
.wel-item.has-sub-menu > a {
  display: inline-flex; align-items: center; gap: 8px;
  height: 64px; padding: 0 8px; color: #fff;
}
.wel-item.has-sub-menu > a:hover { color: var(--primary); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.wel-name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-menu {
  position: absolute; top: 100%; right: 0; min-width: 150px; z-index: 95;
  visibility: hidden; opacity: 0; transform: translateY(8px);
  transition: opacity .25s, transform .25s, visibility .25s;
}
.wel-item.has-sub-menu:hover .sub-menu, .wel-item.has-sub-menu.open .sub-menu { visibility: visible; opacity: 1; transform: translateY(0); }
.sub-menu ul { list-style: none; margin: 8px 0 0; padding: 6px 0; background: #fff; border-radius: var(--radius); box-shadow: 0 6px 20px rgba(0, 0, 0, .15); }
.sub-menu li a { display: block; padding: 10px 18px; color: var(--text); font-size: .875rem; }
.sub-menu li a:hover { background: #f2f2f4; color: var(--primary); }

/* ───────────────── 登录 / 注册 / 找回（rizhuti 登录风格）───────────────── */
.auth-page { display: flex; flex-direction: column; min-height: 100vh; background: var(--navy); }
/* 保留顶部菜单，只隐藏首页大标题/广告位/页脚 */
.auth-page .focusbox, .auth-page .top-ad, .auth-page .site-footer { display: none !important; }
/* 登录卡片区域：占满剩余高度并垂直居中 */
.auth-page main.container { flex: 1; display: flex; flex-direction: column; justify-content: center; align-self: center; width: 100%; max-width: 400px; padding: 40px 15px; }
.auth-page .panel.form {
  width: 100%; max-width: 100%; background: #fff; border: none; border-radius: var(--radius-lg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .25); padding: 34px 30px; position: relative; overflow: hidden;
}
.auth-page .panel.form::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--primary); }
.auth-page .panel.form h2 { text-align: center; margin: 0 0 22px; font-size: 1.4rem; }
.auth-page .panel.form .muted { text-align: center; font-size: .8125rem; }
.auth-page .panel.form .inline { display: flex; gap: 8px; }
.auth-page .panel.form .inline input { flex: 1; width: auto; }
.auth-page .panel.form .inline button { flex: 0 0 auto; width: auto; padding: 0 16px; }
.auth-page .panel.form hr { border: none; border-top: 1px solid var(--line-soft); margin: 16px 0; }

/* ───────────────── 聚合登录（QQ/微信）───────────────── */
.oauth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0 10px; color: var(--text-muted); font-size: .8125rem; }
.oauth-divider::before, .oauth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.oauth-row { display: flex; gap: 10px; }
.oauth-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 12px; border-radius: 8px; border: 1px solid var(--line); background: #fff;
  font-size: .875rem; font-weight: 600; color: var(--text); transition: all .2s; text-decoration: none;
}
.oauth-btn img { width: 20px; height: 20px; flex: 0 0 auto; }
.oauth-btn:hover { border-color: var(--primary); color: var(--primary); }
.oauth-btn.oauth-qq:hover { border-color: #12b7f5; color: #12b7f5; background: #f0faff; }
.oauth-btn.oauth-wx:hover { border-color: #07c160; color: #07c160; background: #f0fbf4; }

/* 绑定/注册选择页的第三方身份卡片 */
.oauth-userinfo { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 8px; }
.oauth-userinfo img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.oauth-userinfo span { font-weight: 700; font-size: .9375rem; }

/* 用户中心：第三方绑定状态 */
.oauth-binds { display: flex; flex-direction: column; gap: 10px; }
.oauth-bind-item {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fafbfc;
}
.oauth-bind-icon { width: 24px; height: 24px; flex: 0 0 auto; }
.oauth-bind-name { font-weight: 700; min-width: 40px; }
.oauth-bind-nick { color: var(--text-muted); font-size: .8125rem; flex: 1; }
.oauth-bind-item form { margin: 0; }

/* ───────────────── 会员页等级卡（rizhuti .vip-row .radio-box）───────────────── */
.vip-card { position: relative; border: 1px solid var(--line); transition: box-shadow .3s, transform .3s, border-color .3s; overflow: hidden; }
.vip-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: var(--primary); }
.vip-card.is-current { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(24, 144, 255, .25); }
.vip-card .price { font-size: 1.6rem; }
.vip-card .discount { color: var(--primary); font-weight: 700; }
.vip-card .tips-box {
  position: absolute; top: 14px; right: -34px; width: 120px; height: 30px;
  background: var(--primary); color: #fff; line-height: 30px; text-align: center;
  transform: rotate(45deg); font-size: .75rem; box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
}

/* ───────────────── 后台广告点击日志（一行 5 个紧凑卡片，2026-09-03）───────────────── */
.click-log-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.click-log-item {
  position: relative; padding: 6px 8px 6px 26px;
  border: 1px solid var(--line); border-radius: 6px; background: #fafbfc;
  font-size: .75rem; line-height: 1.4; overflow: hidden;
}
.click-log-item:hover { border-color: var(--primary); background: #f0f9ff; }
.click-log-no {
  position: absolute; top: 6px; left: 7px; min-width: 15px; height: 15px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: var(--primary); color: #fff; font-size: .625rem; font-weight: 700;
}
.click-log-line { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.click-log-pos { color: var(--text-strong); font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.click-log-time { color: var(--text-muted); font-size: .6875rem; flex: 0 0 auto; }
.click-log-url { display: block; color: var(--text-muted); font-size: .6875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.click-log-ip { display: block; color: var(--text-muted); font-size: .6875rem; }
@media (max-width: 1500px) { .click-log-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1200px) { .click-log-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .click-log-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .click-log-grid { grid-template-columns: 1fr; } }

/* ───────────────── 广告跳转中间页（go.php，2026-09-03）───────────────── */
.go-body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  padding: 20px;
}
.go-wrap { width: 100%; max-width: 440px; }
.go-card {
  padding: 36px 32px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
  border-radius: var(--radius-lg);
}
.go-card::before { content: ""; display: block; height: 4px; margin: -36px -32px 22px; border-radius: 0 0 0 0; background: var(--primary); }
.go-shield {
  width: 58px; height: 58px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #f0f9ff; color: var(--primary);
}
.go-shield svg { width: 32px; height: 32px; fill: currentColor; }
.go-card h2 { margin: 0 0 10px; color: var(--text-strong); font-size: 1.3rem; }
.go-host { margin: 0 0 12px; font-size: .875rem; line-height: 1.7; color: var(--text-muted); }
.go-host strong {
  display: inline-block; margin-top: 4px; padding: 4px 14px;
  font-size: 1.05rem; color: var(--primary); background: #f0f9ff;
  border-radius: 50px; word-break: break-all;
}
.go-tip { margin: 0 0 16px; padding: 10px 14px; font-size: .8125rem; line-height: 1.7; color: #0c4a8a; background: #e6f7ff; border: 1px solid #91d5ff; border-radius: var(--radius); text-align: left; }
.go-count { margin: 0 0 18px; font-size: .875rem; color: var(--text); }
.go-count b { color: var(--price); font-size: 1.1rem; }
.go-actions { display: flex; gap: 12px; justify-content: center; }
.go-actions .btn { flex: 1; max-width: 160px; }
.go-copy { margin: 16px 0 0; font-size: .75rem; color: var(--text-muted); }
