/* HueCub Series page styles — v28 极简 design system */

/* ── Variables ── */
:root {
  --ink: #0C2418;
  --sage: #6B8F71;
  --accent: #DC2626;
  --green: #047857;
  --bg: #FDFDFC;
  --divider: #D1DDD3;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

/* ── Layout ── */
.series-main {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Nunito', 'Noto Sans SC', sans-serif;
  min-height: 100vh;
}

.section-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Series Header ── */
.series-header {
  padding: 56px 24px 48px;
  border-bottom: 1px solid var(--divider);
}

.series-header-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

/* Cover art */
.series-cover {
  flex-shrink: 0;
  width: 280px;
  height: 280px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #fce7f3 0%, #d1fae5 50%, #fef9c3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.series-cover-art {
  font-size: 96px;
  line-height: 1;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,0.10));
}

/* Series info */
.series-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.series-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  line-height: 1.2;
}

/* Artist row */
.series-artist-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.artist-avatar-sm {
  font-size: 22px;
  line-height: 1;
}

.artist-name-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--green);
  text-decoration: none;
}

.artist-name-link:hover {
  text-decoration: underline;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.badge-commission {
  background: #f0fdf4;
  color: var(--green);
  border: 1px solid #bbf7d0;
}

.badge-license {
  background: #f0fdf4;
  color: var(--green);
  border: 1px solid #bbf7d0;
}

.badge-original {
  background: #fef9c3;
  color: #92400e;
  border: 1px solid #fde68a;
  font-size: 0.72rem;
}

/* Bio + description */
.series-bio {
  font-size: 0.88rem;
  color: var(--sage);
  margin: 0;
  line-height: 1.5;
}

.series-description {
  font-size: 0.95rem;
  color: var(--ink);
  margin: 0;
  line-height: 1.7;
  opacity: 0.85;
}

/* Stats */
.series-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--sage);
  font-weight: 500;
}

.stat-dot {
  color: var(--divider);
}

/* Action buttons */
.series-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s, box-shadow 0.15s;
  border: none;
  line-height: 1;
}

.btn:hover {
  opacity: 0.88;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--divider);
}

.btn-outline:hover {
  border-color: var(--sage);
}

/* License row */
.series-license {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.license-note {
  font-size: 0.82rem;
  color: var(--sage);
}

/* ── Remix Tree ── */
.remix-tree-section {
  padding: 48px 24px;
  border-bottom: 1px solid var(--divider);
}

.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 24px;
}

.remix-tree {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Tree node base */
.tree-node {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  transition: background 0.15s;
}

.tree-node:hover {
  background: #f6f9f6;
}

/* Root node highlight */
.tree-node--root {
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  margin-bottom: 4px;
}

.tree-node--root:hover {
  background: #e8fdf0;
}

/* Children container — indented with left border line */
.tree-children {
  margin-left: 28px;
  padding-left: 20px;
  border-left: 2px solid var(--divider);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tree-node--child {
  position: relative;
}

.tree-node--child::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 50%;
  width: 16px;
  height: 1px;
  background: var(--divider);
}

/* Node parts */
.node-avatar {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.node-content {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.node-work-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}

.node-separator {
  font-size: 0.8rem;
  color: var(--sage);
}

.node-artist-link {
  font-size: 0.88rem;
  color: var(--green);
  text-decoration: none;
  font-weight: 500;
}

.node-artist-link:hover {
  text-decoration: underline;
}

/* ── Illustrations Grid ── */
.illustrations-section {
  padding: 48px 24px 72px;
}

.illustrations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

/* Illustration card */
.illus-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--divider);
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.18s, transform 0.18s;
}

.illus-card:hover {
  box-shadow: 0 4px 20px rgba(12,36,24,0.09);
  transform: translateY(-2px);
}

/* Cover — 1:1 aspect ratio */
.illus-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--cover-bg, #f3f4f6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  line-height: 1;
}

/* Card info */
.illus-info {
  padding: 10px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.illus-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Action buttons row */
.illus-actions {
  display: flex;
  gap: 4px;
}

.illus-btn {
  flex: 1;
  background: transparent;
  border: 1px solid var(--divider);
  border-radius: var(--radius-sm);
  padding: 5px 0;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.13s, border-color 0.13s;
  line-height: 1;
  text-align: center;
}

.illus-btn:hover {
  background: #f6f9f6;
  border-color: var(--sage);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .series-header-inner {
    flex-direction: column;
    align-items: center;
    gap: 28px;
  }

  .series-cover {
    width: 220px;
    height: 220px;
  }

  .series-cover-art {
    font-size: 72px;
  }

  .series-info {
    width: 100%;
  }

  .series-title {
    font-size: 1.6rem;
    text-align: center;
  }

  .series-artist-row {
    justify-content: center;
  }

  .series-stats {
    justify-content: center;
  }

  .series-actions {
    justify-content: center;
  }

  .series-license {
    justify-content: center;
  }

  .illustrations-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
  }

  .illus-cover {
    font-size: 40px;
  }
}

@media (max-width: 480px) {
  .series-header {
    padding: 32px 16px 32px;
  }

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

  .btn {
    justify-content: center;
  }

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