/* =====================================================
   detail.css — 站点详情页样式
   ===================================================== */

.detail-main { padding-top: 28px; }

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-3);
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--text-2); transition: color .2s; }
.breadcrumb a:hover { color: var(--primary); }
.crumb-sep { color: var(--text-3); opacity: .6; }
#crumbSite { color: var(--text-2); }

/* ---------- 详情头部 ---------- */
.detail-hero {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 32px;
  margin-bottom: 32px;
  transition: background .3s, border-color .3s;
}

.detail-head-row {
  display: flex;
  align-items: center;
  gap: 22px;
}

.detail-avatar {
  position: relative;
  width: 88px; height: 88px;
  border-radius: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-grad);
  color: #fff;
  font-size: 38px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 10px 28px rgba(99, 102, 241, .35);
  overflow: hidden;
}
/* 详情页站点 logo（加载失败露出首字） */
.detail-logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
  background: #ffffff;
  border-radius: 22px;
  box-sizing: border-box;
}

.detail-head-info h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.detail-desc {
  color: var(--text-2);
  font-size: 15px;
  margin-top: 4px;
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* 星级 */
.rating { display: inline-flex; align-items: center; gap: 3px; }
.rating .star { color: var(--text-3); opacity: .35; font-size: 16px; line-height: 1; }
.rating .star.full { color: #f59e0b; opacity: 1; }
.rating .star.half {
  color: #f59e0b; opacity: 1;
  -webkit-mask: linear-gradient(90deg, #000 50%, transparent 50%);
          mask: linear-gradient(90deg, #000 50%, transparent 50%);
}
.rating em {
  font-style: normal;
  font-weight: 700;
  color: #f59e0b;
  margin-left: 6px;
  font-size: 15px;
}

/* 分类徽章 */
.cat-badge {
  display: inline-block;
  padding: 3px 14px;
  border-radius: 999px;
  background: rgba(99, 102, 241, .1);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  transition: background .2s;
}
.cat-badge:hover { background: rgba(99, 102, 241, .18); }

/* 标签 */
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.tag {
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--bg);
  color: var(--text-2);
  font-size: 13px;
  transition: background .3s, border-color .3s;
}

/* 操作按钮 */
.detail-actions {
  display: flex;
  gap: 14px;
  margin-top: 26px;
  flex-wrap: wrap;
}
.btn-primary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 26px;
  border-radius: 13px;
  font-size: 15px;
  font-weight: 600;
  transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
}
.btn-primary {
  background: var(--primary-grad);
  color: #fff;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(99, 102, 241, .38); }
.btn-primary svg, .btn-ghost svg { width: 17px; height: 17px; }

.btn-ghost {
  border: 1px solid var(--card-border);
  background: var(--bg);
  color: var(--text-2);
}
.btn-ghost:hover { color: var(--primary); border-color: rgba(99, 102, 241, .4); }

/* ---------- 详情区块 ---------- */
.detail-section {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 24px;
  transition: background .3s, border-color .3s;
}

.detail-h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 18px;
}
.detail-h2 .cat-icon { width: 34px; height: 34px; }
.detail-h2 .cat-icon svg { width: 17px; height: 17px; }

.detail-intro {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.9;
  text-indent: 2em;
}

.detail-url {
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--text-3);
}
.detail-url a {
  color: var(--primary);
  word-break: break-all;
}
.detail-url a:hover { text-decoration: underline; }

/* ---------- 核心功能列表 ---------- */
.feature-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px 28px;
}
.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.7;
}
.feat-check {
  width: 20px; height: 20px;
  border-radius: 6px;
  background: var(--primary-grad);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 3px;
}
.feat-check svg { width: 11px; height: 11px; }

/* ---------- 同类推荐（复用 .site-card） ---------- */
.detail-section .card-grid { margin-top: 4px; }

/* ---------- 找不到站点 ---------- */
.detail-empty {
  text-align: center;
  padding: 90px 0;
  color: var(--text-2);
  font-size: 15.5px;
}
.detail-empty .btn-primary { margin-top: 22px; }

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  .detail-hero { padding: 22px 20px; }
  .detail-head-row { gap: 16px; }
  .detail-avatar { width: 64px; height: 64px; font-size: 28px; border-radius: 18px; }
  .detail-head-info h1 { font-size: 22px; }
  .detail-section { padding: 22px 20px; }
  .feature-list { grid-template-columns: 1fr; }
  .btn-primary, .btn-ghost { height: 42px; padding: 0 20px; flex: 1; justify-content: center; }
}

@media (max-width: 480px) {
  .detail-head-row { flex-direction: row; }
  .detail-desc { font-size: 14px; }
}
