/* ================================================================
   campsite.css — 我的营地：智能体卡牌展示
   设计理念：温润卡片 · 呼吸感间距 · 柔光交互
   ================================================================ */

.campsite {
  padding: var(--space-12) 0 var(--space-16);
  min-height: 70vh;
}

@media (min-width: 901px) {
  body.has-sidebar .campsite {
    padding-top: var(--space-16);
  }

  body.has-sidebar a[style*="position:fixed"] {
    left: calc(var(--sb-w, 248px) + var(--space-4)) !important;
  }
}

.campsite-head {
  text-align: center;
  margin-bottom: var(--space-12);
}

.campsite-head .kicker {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  font-weight: 700;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid rgba(var(--brand-rgb), 0.15);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}

.campsite-head h1 {
  font-size: 1.75rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  margin: 0 0 var(--space-3);
  color: var(--text);
  letter-spacing: -0.02em;
}

.campsite-head p {
  color: var(--text-2);
  max-width: 520px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.7;
}

.deck-section {
  margin-bottom: var(--space-12);
}

.deck-title-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
}

.deck-title-row h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.deck-hint {
  font-size: 0.8125rem;
  color: var(--text-soft);
}

/* 卡牌网格 */
.deck {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-5);
}

/* 单张卡牌 */
.camp-card {
  position: relative;
  width: 100%;
  min-height: 88px;
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-out);
}

.camp-card:hover {
  border-color: rgba(var(--brand-rgb), 0.3);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

/* 卡牌缩略图 */
.camp-thumb {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  background-color: var(--brand-soft);
  background-image: url('../img/0.png?v=3');
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xs);
}

.camp-thumb.space-thumb.no-bg {
  background: linear-gradient(135deg, #1e293b, #0e7490);
}

.camp-thumb.space-thumb.no-bg::after {
  content: '🪐 暂无背景';
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8125rem;
}

.camp-id {
  display: none;
}

.camp-meta {
  margin: 0;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0;
}

.camp-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.camp-go {
  margin: 0 0 0 auto;
  padding: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand);
  white-space: nowrap;
  transition: transform var(--duration-fast) var(--ease-out);
}

.camp-card:hover .camp-go {
  transform: translateX(4px);
}

/* 新建卡牌 */
.camp-card.add-card {
  align-items: center;
  justify-content: center;
  text-align: center;
  border-style: dashed;
  border-color: var(--border-2);
  background: var(--surface-2);
  cursor: pointer;
  color: var(--text-soft);
  min-height: 88px;
}

.camp-card.add-card:hover {
  color: var(--brand);
  border-color: rgba(var(--brand-rgb), 0.4);
  background: var(--brand-soft);
}

.camp-plus {
  font-size: 2.25rem;
  line-height: 1;
  margin-bottom: var(--space-2);
  color: var(--brand);
}

@media (max-width: 600px) {
  .deck {
    grid-template-columns: 1fr;
  }

  .camp-thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
  }
}

/* dock-always 常驻 */
body.campsite-page.dock-always {
  padding-bottom: 92px;
}

@media (max-width: 900px) {
  body.campsite-page.dock-always .nav {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .camp-card {
    transition: none;
  }

  .camp-card:hover {
    transform: none;
  }
}
