/* ─── 基础组件 ────────────────────────────────────────────────── */

/* 布局容器 */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* ─── 价格标签 ─────────────────────────────────────────────────── */
.price-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.price-badge--free {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
}

.price-badge--freemium {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
}

.price-badge--paid {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}

/* ─── 模块卡片 ─────────────────────────────────────────────────── */
.module-card {
  background: var(--bg2);
  border-radius: 14px;
  padding: 20px 20px 12px;
  border: 1px solid var(--border);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  cursor: default;
}

.module-card:hover {
  border-color: var(--card-hover-border, var(--border2));
  box-shadow: var(--card-hover-shadow, none);
}

.module-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.module-card__icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.module-card__name {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}

.module-card__count {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.module-card__links {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

/* ─── 链接行 ───────────────────────────────────────────────────── */
.link-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background 0.12s ease;
  min-width: 0;
}

.link-row:hover {
  background: var(--link-hover-bg, rgba(255, 255, 255, 0.04));
}

.link-row__dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: 0.6;
}

.link-row__label {
  flex: 1;
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.link-row__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* ─── 按钮：查看详情 ────────────────────────────────────────────── */
.btn-detail {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  cursor: pointer;
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--text-muted);
  transition: all 0.12s ease;
  flex-shrink: 0;
}

.btn-detail:hover {
  background: var(--btn-detail-hover-bg, rgba(255, 255, 255, 0.08));
  border-color: var(--btn-detail-hover-border, var(--border2));
  color: var(--btn-detail-hover-color, var(--text-sub));
}

/* ─── 搜索框 ───────────────────────────────────────────────────── */
.search-wrap {
  position: relative;
  max-width: 480px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 12px 16px 12px 42px;
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: var(--text-muted);
  pointer-events: none;
}

/* ─── 动画 ─────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

.anim-fade-in {
  animation: fadeIn 0.12s ease;
}

.anim-slide-up {
  animation: slideUp 0.2s ease;
}

/* ─── 网格布局 ─────────────────────────────────────────────────── */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

/* ─── 面包屑 ───────────────────────────────────────────────────── */
.breadcrumb {
  padding: 20px 0 32px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb__back {
  background: none;
  border: none;
  color: var(--text-sub);
  cursor: pointer;
  font-size: 13px;
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.12s;
}

.breadcrumb__back:hover {
  color: var(--text);
}

.breadcrumb__sep,
.breadcrumb__item {
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumb__item--active {
  color: var(--text-sub);
}

/* ─── 详情页卡片 ───────────────────────────────────────────────── */
.detail-card {
  background: var(--bg2);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  animation: scaleIn 0.2s ease;
}

.detail-card__header {
  padding: 28px 32px 24px;
  border-bottom: 1px solid var(--border);
}

.detail-card__body {
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
}

.detail-card__body:last-child {
  border-bottom: none;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.section-label__bar {
  width: 3px;
  height: 16px;
  border-radius: 2px;
}

.section-label__text {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.section-desc {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.8;
  margin: 0;
}

/* ─── 步骤列表 ─────────────────────────────────────────────────── */
.step-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.step-item--even {
  background: var(--bg);
}

.step-item__num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
}

.step-item__text {
  font-size: 14px;
  color: var(--text);
  line-height: 1.7;
  padding-top: 2px;
}

/* ─── 价格说明块 ───────────────────────────────────────────────── */
.price-info-block {
  background: var(--price-block-bg, rgba(16, 185, 129, 0.08));
  border: 1px solid var(--price-block-border, rgba(16, 185, 129, 0.3));
  border-radius: 12px;
  padding: 14px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: slideUp 0.2s ease 0.1s both;
}

.price-info-block__icon {
  font-size: 18px;
  line-height: 1.5;
}

.price-info-block__title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}

.price-info-block__desc {
  font-size: 12px;
  color: var(--text-sub);
}

/* ─── 无结果 ───────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 0;
  color: var(--text-muted);
  font-size: 15px;
}

/* ─── 骨架屏 ───────────────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg3) 25%, var(--border2) 50%, var(--bg3) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 6px;
}

.skeleton--icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  flex-shrink: 0;
}

.skeleton--title {
  height: 16px;
  width: 80px;
}

.skeleton--row {
  height: 14px;
  border-radius: 4px;
  margin: 6px 0;
}

.skeleton-card {
  padding: 20px 20px 12px;
}

.skeleton-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.skeleton-card__links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
