/* ============================================================
   网址详情页样式
   由 url.php 内联 <style> 抽离而来（样式与程序分离）。
   动态主题色经由页面根元素的 inline style 注入 CSS 变量。
   ============================================================ */
  /* ===== 网址详情页（紧扣分类页 / 首页主题：蓝 #1b5bd5 / 橙 #f25d30 / 1200 居中 / 白卡片） ===== */

  .udpage-wrap { min-height: 100vh; display: flex; flex-direction: column; }
  .cw { width: 1200px; max-width: calc(100% - 24px); margin: 0 auto; }

  /* 主体 */
  .ud-main { flex: 1; padding: 20px 0 0px; }

  /* 面包屑 */
  .cat-crumb { font-size: 13px; color: #999; padding: 4px 2px 14px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
  .cat-crumb a { color: #888; text-decoration: none; }
  .cat-crumb a:hover { color: #1b5bd5; }
  .cat-crumb .sep { color: #ccc; }
  .cat-crumb .cur { color: #1b5bd5; font-weight: 600; }

  /* 详情主卡 */
  .ud-hero { background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.05); padding: 26px 28px; margin-bottom: 16px; }
  .ud-hero-flex { display: flex; align-items: stretch; gap: 26px; }
  .ud-hero-left { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .ud-hero-right { flex: 0 0 300px; max-width: 300px; display: flex; flex-direction: column; gap: 8px; }
  .ud-correct { align-self: flex-end; display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: #9aa0a8; text-decoration: none; padding: 3px 4px; transition: color .15s; }
  .ud-correct svg { flex-shrink: 0; }
  .ud-correct:hover { color: var(--ud-accent, #1b5bd5); }
  .ud-hero-top { display: flex; align-items: center; gap: 20px; }

  /* 首页预览面板（浏览器窗口样式） */
  .ud-preview { width: 100%; min-height: 220px; display: flex; flex-direction: column; border: 1px solid #e9edf3; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 3px 12px rgba(0,0,0,.05); }
  .ud-preview-bar { height: 30px; flex-shrink: 0; display: flex; align-items: center; gap: 6px; padding: 0 12px; background: #f6f8fb; border-bottom: 1px solid #eef0f4; }
  .ud-preview-bar .dot { width: 8px; height: 8px; border-radius: 50%; background: #e2e6ec; }
  .ud-preview-bar .dot.rd { background: #ff6159; }
  .ud-preview-bar .dot.yl { background: #ffbd2e; }
  .ud-preview-bar .dot.gr { background: #28c840; }
  .ud-preview-host { margin-left: 8px; font-size: 11.5px; color: #b6bcc4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ud-preview-shot { position: relative; flex: 1; min-height: 180px; display: block; background: #f6f8fb; overflow: hidden; }
  .ud-preview-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #c0c4cc; letter-spacing: .5px; }
  .ud-preview-shot img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
  .ud-preview-shot::after { content: ''; position: absolute; z-index: 2; inset: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.02); pointer-events: none; }
  .ud-ico { width: 76px; height: 76px; min-width: 76px; border-radius: var(--ud-ico-radius, 18px); display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; color: #fff; overflow: hidden; position: relative; box-shadow: 0 6px 16px rgba(0,0,0,.12); }
  .ud-ico.r { border-radius: 50%; }
  .ud-ico .site-favicon { width: 100%; height: 100%; object-fit: cover; }
  .ud-meta { min-width: 0; flex: 1; }
  .ud-meta h1 { margin: 0; font-size: 24px; font-weight: 700; color: #222; letter-spacing: .5px; line-height: 1.25; }
  .ud-title-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
  .ud-updated { flex-shrink: 0; font-size: 12.5px; font-weight: 400; letter-spacing: 0; color: #9aa0a8; line-height: 1.6; white-space: nowrap; }
  /* 头部资料：统计行 + 一句话简介 */
  .ud-stats { margin-top: 10px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
  .ud-stat { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #9aa0a8; }
  .ud-stat svg { color: #b6bcc4; flex-shrink: 0; }
  .ud-stat b { color: #f25d30; font-weight: 700; margin: 0 1px; }
  .ud-tagline { margin-top: 12px; font-size: 14px; line-height: 1.7; color: #5a6270; white-space: pre-line; word-break: break-word; }

  /* 分类标签行 */
  .ud-tagrow { margin-top: 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .ud-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; text-decoration: none; padding: 4px 12px; border-radius: 15px; transition: all .15s; white-space: nowrap; }
  .ud-tag svg { flex-shrink: 0; }
  .ud-tag-sub { color: #6b7480; background: #f4f6f8; border: 1px solid #eceef1; }
  .ud-tag-sub:hover { color: var(--ud-accent); border-color: #cddbf5; background: #f4f8ff; }

  /* 操作按钮（打开网站 / 手机查看 / 安全） */
  .ud-actions { margin-top: 22px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 22px; border-top: 1px dashed #eef0f4; }
  .ud-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; border-radius: 10px; font-size: 15px; font-weight: 600; letter-spacing: .5px; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: all .15s; }
  .ud-btn svg { flex-shrink: 0; }
  .ud-btn-primary { padding: 0 30px; background: var(--ud-accent); color: #fff; box-shadow: 0 4px 12px rgba(27,91,213,.28); }
  .ud-btn-primary svg { stroke: #fff; }
  .ud-btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(27,91,213,.34); }
  .ud-btn-outline { padding: 0 22px; background: #fff; color: var(--ud-accent); border-color: var(--ud-accent); }
  .ud-btn-outline svg { stroke: var(--ud-accent); }
  .ud-btn-outline:hover { background: #f4f8ff; }
  .ud-btn-ico { width: 46px; padding: 0; background: #fff; color: #9aa0a8; border-color: #e6e9ef; }
  .ud-btn-ico svg { stroke: #9aa0a8; }
  .ud-btn-ico:hover { color: var(--ud-accent); border-color: var(--ud-accent); background: #f4f8ff; }
  .ud-btn-ico:hover svg { stroke: var(--ud-accent); }
  .ud-btn-ico.is-fav { color: #f0a020; border-color: #f5cf8a; background: #fff8ec; }
  .ud-btn-ico.is-fav svg { stroke: #f0a020; fill: #f0a020; }
  .ud-btn-ico.is-liked { color: var(--ud-accent); border-color: #a9c4f5; background: #eef4ff; }
  .ud-btn-ico.is-liked svg { stroke: var(--ud-accent); fill: var(--ud-accent); }
  .ud-btn-ico.is-busy { opacity: .6; pointer-events: none; }
  /* 举报按钮：悬停呈警示红，与收藏（蓝/金）区分 */
  #udReportBtn:hover { color: #e0472a; border-color: #e0472a; background: #fff5f3; }
  #udReportBtn:hover svg { stroke: #e0472a; }
  .ud-fav-toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(10px); background: rgba(28,40,60,.92); color: #fff; font-size: 14px; padding: 10px 20px; border-radius: 22px; box-shadow: 0 8px 24px rgba(0,0,0,.25); opacity: 0; transition: all .25s; z-index: 9999; pointer-events: none; }
  .ud-fav-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
  .ud-copy { flex-shrink: 0; cursor: pointer; border: none; background: transparent; color: #9aa0a8; font-size: 12px; padding: 4px 8px; border-radius: 5px; transition: all .15s; }
  .ud-copy:hover { color: var(--ud-accent); background: #eef2f8; }
  .ud-copy.done { color: #16a34a; }

  /* 手机查看：二维码弹层 */
  .ud-modal { position: fixed; inset: 0; z-index: 999; display: none; align-items: center; justify-content: center; }
  .ud-modal.open { display: flex; }
  .ud-modal-mask { position: absolute; inset: 0; background: rgba(15,23,42,.5); }
  .ud-modal-card { position: relative; z-index: 1; width: 300px; max-width: calc(100% - 32px); background: #fff; border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.25); padding: 24px 22px 20px; text-align: center; }
  .ud-modal-x { position: absolute; top: 8px; right: 12px; border: none; background: transparent; color: #b6bcc4; font-size: 22px; line-height: 1; cursor: pointer; }
  .ud-modal-x:hover { color: #6b7480; }
  .ud-modal-tt { font-size: 16px; font-weight: 700; color: #333; margin-bottom: 16px; }
  .ud-qr { width: 180px; height: 180px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; background: #f6f8fb; border: 1px solid #eef0f4; border-radius: 10px; overflow: hidden; }
  .ud-qr img, .ud-qr canvas { width: 180px !important; height: 180px !important; display: block; }
  .ud-qr .qr-fallback { font-size: 12px; color: #9aa0a8; padding: 12px; word-break: break-all; line-height: 1.6; }
  .ud-modal-url { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 6px 0 12px; background: #f6f8fb; border: 1px solid #e9edf3; border-radius: 8px; margin-bottom: 10px; }
  .ud-modal-url .u { flex: 1; min-width: 0; font-size: 12.5px; color: #5a6270; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; }
  .ud-modal-tip { font-size: 12px; color: #b6bcc4; line-height: 1.6; }

  /* 通用面板（豆包有话说 / 网站评分 / 数据统计 / 相关推荐 共用） */
  .ud-panel { background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.05); padding: 20px 24px 24px; margin-bottom: 10px; }
  .ud-panel-head { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: #333; padding: 2px 2px 14px; }
  .ud-panel-head::before { content: ''; width: 3px; height: 15px; background: var(--ud-accent); border-radius: 2px; }
  .ud-desc { font-size: 14px; line-height: 1.9; color: #555; white-space: pre-wrap; word-break: break-word; }

  /* 网站评分 */
  .ud-rate { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; padding: 4px 2px 2px; }
  .ur-summary { display: flex; align-items: center; gap: 14px; }
  .ur-score { font-size: 40px; font-weight: 800; color: #ff9500; line-height: 1; letter-spacing: .5px; min-width: 58px; }
  .ur-score.empty { color: #c9ccd2; font-size: 28px; font-weight: 700; }
  .ur-sumright { display: flex; flex-direction: column; gap: 5px; }
  .ur-count { font-size: 12.5px; color: #9aa0a8; }
  .ur-count b { color: #ff9500; font-weight: 700; }
  /* 星条（只读平均分：灰底 + 金色按百分比裁切覆盖） */
  .ur-stars { position: relative; display: inline-block; font-size: 18px; line-height: 1; white-space: nowrap; color: #dcdfe4; }
  .ur-stars::before { content: '★★★★★'; letter-spacing: 3px; }
  .ur-stars-fill { position: absolute; left: 0; top: 0; width: 0; overflow: hidden; white-space: nowrap; color: #ffb400; }
  .ur-stars-fill::before { content: '★★★★★'; letter-spacing: 3px; }
  .ur-divider { width: 1px; align-self: stretch; min-height: 44px; background: #eef0f4; }
  /* 打分区 */
  .ur-action { display: flex; flex-direction: column; gap: 6px; }
  .ur-action-label { font-size: 13px; color: #606770; }
  .ur-input { display: inline-flex; gap: 4px; }
  .ur-istar { font-size: 30px; line-height: 1; color: #dcdfe4; cursor: pointer; transition: color .12s, transform .08s; user-select: none; }
  .ur-istar:hover { transform: scale(1.12); }
  .ur-istar.on { color: #ffb400; }
  .ur-input.locked .ur-istar { cursor: default; }
  .ur-input.locked .ur-istar:hover { transform: none; }
  .ur-hint { font-size: 12px; min-height: 15px; color: #21a366; }
  .ur-hint.err { color: #e8534e; }
  @media (max-width: 640px) {
    .ud-rate { gap: 16px; }
    .ur-divider { display: none; }
    .ur-score { font-size: 34px; }
    .ur-istar { font-size: 27px; }
  }

  /* 数据统计图表 */
  .ud-chart { width: 100%; }
  .ud-chart-legend { display: flex; justify-content: center; gap: 22px; margin: 2px 0 8px; }
  .ud-chart-legend .lg { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #6b7480; }
  .ud-chart-legend .sq { width: 11px; height: 11px; border-radius: 2px; display: inline-block; }
  .ud-chart-legend .ln { width: 16px; height: 3px; border-radius: 2px; display: inline-block; }
  .ud-chart-svg { width: 100%; height: auto; display: block; }
  .ud-chart-svg rect, .ud-chart-svg circle { transition: opacity .15s; }
  .ud-chart-svg rect:hover, .ud-chart-svg circle:hover { opacity: .75; }

  /* 相关推荐网格（复用分类页卡片风格） */
  .cu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .cu-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid #eef0f3; border-radius: 10px; background: #fff; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; min-width: 0; }
  .cu-card:hover { border-color: #cddbf5; box-shadow: 0 6px 16px rgba(27,91,213,.12); transform: translateY(-2px); }
  .cu-ico { width: 40px; height: 40px; min-width: 40px; border-radius: var(--cu-ico-radius, 9px); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #fff; overflow: hidden; position: relative; }
  .cu-ico.r { border-radius: 50%; }
  .cu-ico .site-favicon { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; background: #fff; transform: scale(1.12); }
  .cu-body { min-width: 0; flex: 1; overflow: hidden; }
  .cu-name { display: block; font-size: 14px; font-weight: 600; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .15s; }
  .cu-card:hover .cu-name { color: #1b5bd5; }
  .cu-desc { display: block; font-size: 12px; color: #9aa0a8; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* 网址不存在 */
  .cat-404 { background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.05); text-align: center; padding: 70px 20px; }
  .cat-404 .big { font-size: 46px; margin-bottom: 12px; }
  .cat-404 h2 { margin: 0 0 8px; font-size: 20px; color: #333; }
  .cat-404 p { color: #999; font-size: 14px; margin: 0 0 22px; }
  .cat-404 a { display: inline-block; padding: 9px 24px; background: #1b5bd5; color: #fff; border-radius: 6px; text-decoration: none; font-size: 14px; }
  .cat-404 a:hover { background: #1749b0; }

  @media (max-width: 1024px) { .cu-grid { grid-template-columns: repeat(3, 1fr); } }
  @media (max-width: 900px) {
    .ud-hero-flex { flex-direction: column; }
    .ud-hero-right { flex-basis: auto; max-width: 100%; }
    .ud-preview { min-height: 0; }
    .ud-preview-shot { flex: none; height: 200px; }
  }
  @media (max-width: 768px) {
    .cu-grid { grid-template-columns: repeat(2, 1fr); }
    .ud-hero-top { gap: 14px; }
    .ud-ico { width: 60px; height: 60px; min-width: 60px; border-radius: var(--ud-ico-radius, 15px); font-size: 22px; }
    .ud-meta h1 { font-size: 20px; }
    .ud-btn-primary { flex: 1; padding: 0 20px; }
    .ud-btn-outline { flex: 1; padding: 0 14px; }
  }
  @media (max-width: 480px) { .cu-grid { grid-template-columns: 1fr; } }

/* ── 网址详情页广告位 ── */
/* ① 操作按钮区右侧：占据按钮行剩余空间，广告图片自适应高度 */
.ud-actions { flex-wrap: wrap; }
.ud-action-ad { flex: 1 1 200px; min-width: 0; display: flex; align-items: center; justify-content: flex-end; }
.ud-action-ad img { max-height: 46px; max-width: 100%; border-radius: 8px; display: block; }
.ud-action-ad .ad-slot { width: 100%; display: flex; justify-content: flex-end; }
/* ② 豆包有话说下方通栏：整行展示 */
.ud-belowdesc-ad { margin: 0 0 8px; }
.ud-belowdesc-ad img { max-width: 100%; height: auto; border-radius: 10px; display: block; }
.ud-belowdesc-ad .ad-slot { width: 100%; }
@media (max-width: 640px) {
  .ud-action-ad { flex-basis: 100%; justify-content: flex-start; margin-top: 6px; }
  .ud-action-ad .ad-slot { justify-content: flex-start; }
}

/* ③ 页面底部通栏广告：相关推荐下方、页脚上方 */
.ud-bottom-ad { margin: 0px 0 0px; }
.ud-bottom-ad img { max-width: 100%; height: auto; border-radius: 10px; display: block; }
.ud-bottom-ad .ad-slot { width: 100%; }

/* ============================================================
   豆包有话说（取代原「详细介绍」板块）
   整块就是「豆包本人在页面上说了段话」：左边头像与署名，右边一枚
   带「豆包有话说」标题的白色面板，内含带小尖角的对话气泡。
   面板本身沿用 .ud-panel 的白底/圆角/阴影，与上下卡片保持一致；
   气泡自己带一层淡蓝底，豆包用蓝紫色与全站主色（--ud-accent）区分开，
   读起来才像另一个人在开口。
   ============================================================ */

/* 标题右侧的「AI 生成」小标签 */
.db-tag {
  font-size: 11px; font-weight: 600; letter-spacing: .3px; color: #6273cf;
  background: #eef3ff; border: 1px solid #e0e8ff; border-radius: 9px; padding: 1px 7px;
}

.db-say { display: flex; align-items: flex-start; gap: 14px; }

/* 左：头像 + 署名 */
.db-say-who { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 5px; width: 46px; }
.db-say-ava { display: block; border-radius: 12px; box-shadow: 0 3px 10px rgba(91,140,255,.28); }
/* 后台上传的自定义头像：无论原图什么比例，都裁成正方形，和内置徽标占位一致 */
img.db-say-ava.db-ava-img { width: 40px; height: 40px; object-fit: cover; background: #fff; }
.db-say-name { font-size: 12px; color: #98a0b0; line-height: 1; }

/* 右：对话气泡 */
.db-say-bubble {
  position: relative; flex: 1; min-width: 0;
  background: #f7faff; border: 1px solid #e6eeff; border-radius: 12px;
  padding: 15px 18px 12px;
}
/* 指向头像的小尖角：45° 旋转的方块，只留左、下两条边 */
.db-say-bubble::before {
  content: ''; position: absolute; left: -6px; top: 16px; width: 11px; height: 11px;
  background: #f7faff; border-left: 1px solid #e6eeff; border-bottom: 1px solid #e6eeff;
  transform: rotate(45deg); border-radius: 0 0 0 3px;
}
.db-say-text {
  --db-ink: #4a5160;
  font-size: 14.5px; line-height: 1.95; color: var(--db-ink);
  white-space: pre-wrap; word-break: break-word;
}
.db-say-foot {
  margin-top: 12px; padding-top: 10px; border-top: 1px dashed #e6eeff;
  font-size: 12px; color: #a9b1c1; line-height: 1.6;
}

@media (max-width: 640px) {
  .db-say { flex-direction: column; gap: 9px; }
  .db-say-who { flex-direction: row; align-items: center; gap: 8px; width: auto; }
  .db-say-bubble { width: 100%; box-sizing: border-box; padding: 13px 15px 11px; }
  /* 竖排后尖角改为朝上，继续指向头像 */
  .db-say-bubble::before {
    left: 17px; top: -6px;
    border-left: 1px solid #e6eeff; border-bottom: none;
    border-top: 1px solid #e6eeff; border-radius: 3px 0 0 0;
  }
  .db-say-text { font-size: 14px; line-height: 1.9; }
}

/* ── 「豆包有话说」出场效果（配 /style/js/doubao-say.js）──
   三种效果共用一个前提：正文由服务端直出，动画只是「先藏再放」，
   所以爬虫、读屏软件、禁用 JS 的浏览器拿到的始终是完整全文。         */

/* 效果一：打字机 —— 末尾跟一个闪烁光标 */
.db-say-text.db-typing::after {
  content: ''; display: inline-block; vertical-align: -2px;
  width: 2px; height: 1.05em; margin-left: 2px;
  background: var(--ud-accent, #5b8dff);
  animation: dbCaret .9s steps(1, end) infinite;
}
@keyframes dbCaret { 0%, 49% { opacity: 1 } 50%, 100% { opacity: 0 } }

/* 效果二：逐字渐显 —— 从淡蓝紫渐变到正文色，像一道光从头扫过
   只动 opacity 与 color：transform 对行内元素无效，改 inline-block 又会切坏英文断词 */
.db-ch { animation: dbChIn .52s both ease-out; }
@keyframes dbChIn {
  0%   { opacity: 0; color: #b9cdff; }
  55%  { opacity: 1; color: #8aa8f7; }
  100% { opacity: 1; color: var(--db-ink, #4a5160); }
}

/* 效果三：逐段淡入 —— 段落依次浮现上移
   段落改成 block，段间距用 1.95em 顶上原来那个空行的高度，动画播完与静态版一模一样 */
.db-say-text.db-faded .db-p { display: block; animation: dbPIn .62s both cubic-bezier(.22,.68,.36,1); }
.db-say-text.db-faded .db-p + .db-p { margin-top: 1.95em; }
@keyframes dbPIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 动画期间给个「可点击跳过」的暗示 */
.ud-doubao .db-say-bubble:has(.db-typing) { cursor: pointer; }

/* 系统开了「减少动态效果」：一律直接显示，不做任何动画 */
@media (prefers-reduced-motion: reduce) {
  .db-say-text.db-typing::after { display: none; }
  .db-ch, .db-say-text.db-faded .db-p { animation: none !important; opacity: 1 !important; transform: none !important; }
}
