/* ========================================
   边缘云盘 - 自定义样式
   补充 Tailwind CSS 不易表达的样式
   ======================================== */

/* ---------- 瀑布流布局 ---------- */
.waterfall {
  column-count: 1;
  column-gap: 1.5rem;
}
@media (min-width: 640px) {
  .waterfall { column-count: 2; }
}
@media (min-width: 1024px) {
  .waterfall { column-count: 3; }
}
@media (min-width: 1280px) {
  .waterfall { column-count: 4; }
}

.waterfall-item {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  display: inline-block;
  width: 100%;
}

/* ---------- 分类标签激活状态 ---------- */
.category-active {
  background-color: #3b82f6 !important;
  color: white !important;
  border-color: #3b82f6 !important;
}
.category-active i {
  color: white !important;
}

/* ---------- 详情页链接按钮隐藏状态 ---------- */
.link-hidden {
  display: none;
}

/* ---------- 平滑过渡 ---------- */
.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

/* ---------- 页面切换淡入效果 ---------- */
.fade-in {
  animation: fadeIn 0.25s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 富文本内容排版（免责声明/关于） ---------- */
.prose-custom h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #f3f4f6;
}
.prose-custom h2:first-child { margin-top: 0; }
.prose-custom p {
  color: #4b5563;
  line-height: 1.8;
  margin-bottom: 0.85rem;
}
.prose-custom ul {
  list-style: disc;
  padding-left: 1.4rem;
  color: #4b5563;
  line-height: 1.8;
  margin-bottom: 1rem;
}
.prose-custom li { margin-bottom: 0.35rem; }
.prose-custom strong { color: #1f2937; }
.prose-custom code {
  background: #f3f4f6;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  font-size: 0.875em;
  color: #be185d;
}
.prose-custom .highlight-box {
  background: #f0f9ff;
  border-left: 4px solid #3b82f6;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  margin: 1.25rem 0;
  color: #1e40af;
}

/* ---------- 详情页信息网格 ---------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}
.info-item {
  background: #f9fafb;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid #f3f4f6;
}
.info-item-label {
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 0.25rem;
}
.info-item-value {
  font-weight: 600;
  color: #1f2937;
  font-size: 0.95rem;
}

/* ---------- 标签样式 ---------- */
.tag-chip {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  font-size: 0.75rem;
  background: #eff6ff;
  color: #2563eb;
  border-radius: 9999px;
  margin-right: 0.35rem;
  margin-bottom: 0.35rem;
}

/* ---------- FAQ 列表样式 ---------- */
.faq-list {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.25rem;
  margin: 1rem 0;
  border: 1px solid #f3f4f6;
}
.faq-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid #f3f4f6;
}
.faq-item:last-child { border-bottom: none; }
.faq-question {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.4rem;
}
.faq-question::before {
  content: "Q: ";
  color: #3b82f6;
  font-weight: 700;
}
.faq-answer {
  color: #4b5563;
  line-height: 1.7;
}
.faq-answer::before {
  content: "A: ";
  color: #10b981;
  font-weight: 700;
}

/* ---------- 加载占位符 ---------- */
.skeleton {
  background: linear-gradient(90deg, #f3f4f6 0%, #e5e7eb 50%, #f3f4f6 100%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.4s ease-in-out infinite;
}
@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------- 滚动条美化 ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f3f4f6; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ---------- 选择文本颜色 ---------- */
::selection {
  background-color: #3b82f6;
  color: white;
}

/* ---------- 详情页底部推荐 ---------- */
.related-card {
  background: white;
  border-radius: 0.5rem;
  padding: 0.75rem;
  display: flex;
  gap: 0.75rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid #f3f4f6;
}
.related-card:hover {
  background: #f9fafb;
  border-color: #3b82f6;
}
.related-card img {
  width: 60px;
  height: 60px;
  border-radius: 0.375rem;
  object-fit: cover;
  flex-shrink: 0;
}

/* ---------- 面包屑导航 ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1rem;
}
.breadcrumb a {
  color: #3b82f6;
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-separator {
  margin: 0 0.5rem;
  color: #d1d5db;
}

/* ---------- 响应式微调 ---------- */
@media (max-width: 640px) {
  .waterfall { column-count: 1; }
  .info-grid { grid-template-columns: 1fr; }
}