/* ============================================================
   网址详情页样式
   由 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; }

  /* 头部：logo + 搜索 + 返回（与分类页一致） */
  .cat-header { background: #fff; border-bottom: 1px solid #e6e6e6; }
  .cat-header .cw { display: flex; align-items: center; gap: 24px; padding: 16px 0; }
  .cat-logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; text-decoration: none; }
  .cat-logo .lg-mark { width: 34px; height: 34px; border-radius: 7px; background: #1b5bd5; display: flex; align-items: center; justify-content: center; }
  .cat-logo .lg-mark svg { width: 34px; height: 34px; }
  .cat-logo .lg-txt { display: flex; flex-direction: column; line-height: 1.25; }
  .cat-logo .lg-txt .t { font-size: 17px; font-weight: 700; color: #333; letter-spacing: .5px; }
  .cat-logo .lg-txt .u { font-size: 11px; color: #aaa; }
  .cat-logo img.lg-img { max-height: 46px; display: block; }
  .cat-search { flex: 1; max-width: 560px; }
  .cat-search form { display: flex; height: 40px; border: 2px solid #1b5bd5; border-radius: 8px; overflow: hidden; }
  .cat-search input { flex: 1; border: none; outline: none; padding: 0 14px; font-size: 14px; color: #333; min-width: 0; }
  .cat-search input::placeholder { color: #aaa; }
  .cat-search button { border: none; background: #1b5bd5; color: #fff; padding: 0 22px; font-size: 14px; letter-spacing: 2px; cursor: pointer; transition: background .15s; }
  .cat-search button:hover { background: #1749b0; }
  .cat-home-btn { margin-left: auto; flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: #555; text-decoration: none; padding: 7px 14px; border: 1px solid #e2e5ea; border-radius: 6px; transition: all .15s; }
  .cat-home-btn:hover { color: #1b5bd5; border-color: #1b5bd5; background: #f4f8ff; }

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

  /* 面包屑 */
  .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; }
  .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: 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-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; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

  /* 分类标签行 */
  .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-cat { color: #7a5af0; background: #f2effe; border: 1px solid #e2dbfb; }
  .ud-tag-cat:hover { background: #ebe6fd; border-color: #d3c8f7; }
  .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: 16px; }
  .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: 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 { width: 100%; height: 100%; object-fit: cover; }
  .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); }
    .cat-header .cw { flex-wrap: wrap; gap: 12px; }
    .cat-search { order: 3; max-width: 100%; flex-basis: 100%; }
    .cat-home-btn { margin-left: 0; }
    .ud-hero-top { gap: 14px; }
    .ud-ico { width: 60px; height: 60px; min-width: 60px; border-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; } }
