/* ===== 详情页两栏布局 ===== */
.detail-page {
  padding-top: 20px;
  padding-bottom: 48px;
}

.detail-page .container {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 12px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 16px;
  align-items: start;
}

/* ===== 主内容区 ===== */
.detail-main {
  min-width: 0;
}

/* 工具信息卡片 */
.tool-info-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  margin-bottom: 16px;
}

/* 安全免责声明 */
.safety-disclaimer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  border: 1px solid #fcd34d;
  border-radius: 8px;
  margin-bottom: 16px;
  position: relative;
}

.disclaimer-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.disclaimer-content {
  flex: 1;
  min-width: 0;
}

.disclaimer-title {
  font-size: 14px;
  font-weight: 600;
  color: #b45309;
  margin-right: 8px;
}

.disclaimer-text {
  font-size: 13px;
  color: #92400e;
  line-height: 1.5;
}

.disclaimer-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
}

.disclaimer-close:hover {
  background: rgba(0,0,0,0.05);
}

.disclaimer-close svg {
  display: block;
}

/* 深色模式 */
[data-theme="dark"] .safety-disclaimer {
  background: linear-gradient(135deg, #422006 0%, #451a03 100%);
  border-color: #78350f;
}

[data-theme="dark"] .disclaimer-icon {
  background: #78350f;
}

[data-theme="dark"] .disclaimer-title {
  color: #fbbf24;
}

[data-theme="dark"] .disclaimer-text {
  color: #d97706;
}

[data-theme="dark"] .disclaimer-close:hover {
  background: rgba(255,255,255,0.1);
}

.tool-info-body {
  display: flex;
  gap: 20px;
}

/* 左侧信息区 */
.tool-info-left {
  flex: 1;
  min-width: 0;
}

.tool-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.tool-logo {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.tool-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tool-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.3px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 3px;
}

.badge-access {
  background: rgba(34,197,94,0.1);
  color: #16a34a;
  border: 1px solid rgba(34,197,94,0.2);
}

.badge-domestic {
  background: rgba(59,130,246,0.1);
  color: #2563eb;
  border: 1px solid rgba(59,130,246,0.2);
}

/* 元信息行 */
.tool-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.meta-label {
  color: var(--text-secondary);
}

.tool-meta .meta-item {
  display: inline-flex;
  align-items: center;
}

/* 所属公司 */
.tool-company {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* 收录网址 */
.tool-url {
  font-size: 13px;
  margin-bottom: 14px;
  word-break: break-all;
}

.tool-url span {
  color: var(--text-secondary);
}

/* 网站介绍 */
.intro-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.intro-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin: 0 0 14px 0;
  word-break: break-all;
}

/* 标签 */
.tool-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.detail-tag {
  display: inline-block;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--primary);
  background: rgba(99,102,241,0.08);
  border-radius: 4px;
}

/* 右侧缩略图+按钮 */
.tool-info-right {
  width: 340px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 缩略图 */
.tool-thumb {
  width: 100%;
  border-radius: 12px;
  border: 3px solid #e0e0e6;
  overflow: hidden;
  transition: all 0.3s;
  background: var(--card-bg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.tool-thumb:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(99,102,241,0.15);
}

.tool-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

/* 操作按钮 */
.tool-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.btn-visit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: var(--primary);
  border-radius: 6px;
  border: 1px solid var(--primary);
  text-decoration: none;
  transition: all 0.2s;
}

.btn-visit:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99,102,241,0.25);
}

.btn-report {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-report:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(99,102,241,0.04);
}

/* ===== 网站缩略图区域 ===== */
.screenshot-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}

.screenshot-section .section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.screenshot-wrapper {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.screenshot-wrapper:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(99,102,241,0.12);
}

.screenshot-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

/* ===== 安全提示区域 ===== */
.safety-tips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.tip-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  transition: all 0.2s;
}

.tip-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 10px rgba(99,102,241,0.06);
}

.tip-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tip-icon-green {
  background: rgba(34,197,94,0.1);
  color: #22c55e;
}

.tip-icon-orange {
  background: rgba(249,115,22,0.1);
  color: #f97316;
}

.tip-icon-blue {
  background: rgba(59,130,246,0.1);
  color: #3b82f6;
}

.tip-content {
  min-width: 0;
}

.tip-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.tip-desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===== 同类网站 ===== */
.similar-section,
.experience-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.experience-section {
  margin-top: 18px;
}

.experience-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
  padding-left: 10px;
  border-left: 3px solid var(--primary);
}

.experience-content {
  position: relative;
  padding: 16px;
  background: var(--bg);
  border-radius: 8px;
  line-height: 1.8;
}

.experience-quote {
  position: absolute;
  top: 6px;
  left: 12px;
  font-size: 48px;
  font-family: Georgia, serif;
  color: var(--primary);
  opacity: 0.15;
  line-height: 1;
  user-select: none;
}

.experience-content p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary, #666);
  text-indent: 2em;
  line-height: 1.8;
}

.similar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
  padding-left: 10px;
  border-left: 3px solid var(--primary);
}

.similar-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.similar-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.similar-card:hover {
  border-color: var(--primary);
  background: rgba(99,102,241,0.04);
  transform: translateY(-1px);
}

.similar-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: bold;
  flex-shrink: 0;
}

.similar-info {
  min-width: 0;
}

.similar-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.similar-desc {
  font-size: 11px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== 右侧热门网站 ===== */
.detail-right-sidebar {
  position: sticky;
  top: 108px;
}

.right-sidebar-inner {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.sidebar-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.hot-site-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hot-site-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 6px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s;
}

.hot-site-item:hover {
  background: rgba(99,102,241,0.06);
}

.hot-site-rank {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: #d1d5db;
  flex-shrink: 0;
}

.hot-site-item:nth-child(1) .hot-site-rank { background: #ef4444; }
.hot-site-item:nth-child(2) .hot-site-rank { background: #f97316; }
.hot-site-item:nth-child(3) .hot-site-rank { background: #eab308; }

.hot-site-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  flex-shrink: 0;
}

.hot-site-info {
  min-width: 0;
  flex: 1;
}

.hot-site-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hot-site-cat {
  font-size: 10px;
  color: var(--text-secondary);
}

/* ===== 深色模式 ===== */
[data-theme="dark"] .badge-access {
  background: rgba(34,197,94,0.15);
  border-color: rgba(34,197,94,0.25);
}

[data-theme="dark"] .badge-domestic {
  background: rgba(59,130,246,0.15);
  border-color: rgba(59,130,246,0.25);
}

[data-theme="dark"] .btn-report {
  background: transparent;
  border-color: rgba(255,255,255,0.15);
}

[data-theme="dark"] .screenshot-wrapper {
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

[data-theme="dark"] .screenshot-wrapper:hover {
  border-color: var(--primary);
}

[data-theme="dark"] .tool-thumb {
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

[data-theme="dark"] .tool-thumb:hover {
  border-color: var(--primary);
}

[data-theme="dark"] .tip-card:hover {
  box-shadow: 0 2px 10px rgba(99,102,241,0.12);
}

[data-theme="dark"] .experience-content {
  background: rgba(255,255,255,0.03);
}

[data-theme="dark"] .experience-content p {
  color: var(--text-secondary, #999);
}

/* ===== 响应式 ===== */
@media (max-width: 1200px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-right-sidebar {
    position: static;
    order: 1;
  }

  .right-sidebar-inner {
    padding: 12px;
  }

  .hot-site-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }

  .similar-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .safety-disclaimer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .disclaimer-icon {
    width: 32px;
    height: 32px;
  }
  
  .disclaimer-title {
    display: block;
    margin-bottom: 4px;
  }
  
  .disclaimer-close {
    position: absolute;
    top: 8px;
    right: 8px;
  }

  .tool-info-body {
    flex-direction: column;
  }

  .tool-info-right {
    width: 100%;
  }

  .safety-tips {
    grid-template-columns: 1fr;
  }

  .similar-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hot-site-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .tool-info-card {
    padding: 14px;
  }

  .tool-name {
    font-size: 18px;
  }

  .detail-page {
    padding-top: 16px;
  }
}

@media (max-width: 480px) {
  .tool-info-card {
    padding: 12px;
  }

  .tool-name {
    font-size: 16px;
  }

  .tool-meta {
    flex-direction: column;
    gap: 6px;
  }

  .similar-grid {
    grid-template-columns: 1fr;
  }

  .hot-site-list {
    grid-template-columns: 1fr;
  }

  .tool-actions {
    flex-direction: column;
  }

  .btn-visit, .btn-report {
    text-align: center;
    justify-content: center;
  }
}
