/* ==========================================================================
   components.css — 按钮 / 标签 / 图标块 / 作品卡 / 数据格子
   只放「跨页面复用的小件」，区块级组合去 blocks.css。
   ========================================================================== */

/* 按钮 ------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 15px 26px;
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}

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

.btn--primary:hover {
  background: #bd2b51;
}

/* 描边款用 inset 阴影，不用 border：1px 实边框会把按钮撑高 2px，与实心款对不齐 */
.btn--ghost {
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 0 0 1px #efdde3;
}

.btn--ghost:hover {
  box-shadow: inset 0 0 0 1px #d9c2ca;
}

.btn--ghost[aria-pressed='true'] {
  background: var(--brand-surface);
  color: var(--brand-ink);
  box-shadow: inset 0 0 0 1px #f0c9d4;
}

.btn--sm {
  padding: 13px 22px;
  font-size: 14.5px;
}

.btn__icon {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
}

/* 按钮排 ---------------------------------------------------------------- */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3);
}

/* 眉标 ------------------------------------------------------------------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: var(--f-2xs);
  font-weight: 500;
  letter-spacing: 1.4px;
  color: var(--text-muted);
}

.eyebrow__dot {
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-mark);
}

/* 小药丸 ---------------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: var(--brand-surface);
  font-size: var(--f-2xs);
  font-weight: 500;
  color: var(--brand-ink);
}

.pill__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand-mark);
}

/* 图标块 ---------------------------------------------------------------- */
.icon-tile {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  background: var(--brand-surface);
}

.icon-tile svg {
  width: 24px;
  height: 24px;
}

.icon-tile--dark {
  background: #2e2733;
}

/* 筛选片 ---------------------------------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-body);
  transition: color 0.16s var(--ease), background-color 0.16s var(--ease);
}

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

.chip[aria-pressed='true'] {
  background: var(--text);
  color: #fff;
  box-shadow: none;
}

/* 作品卡 ---------------------------------------------------------------- */
.work {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.work__cover {
  display: block;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--brand-surface);
  aspect-ratio: 299 / 430;
}

.work__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s var(--ease);
}

.work:hover .work__cover img {
  transform: scale(1.03);
}

.work__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.work__meta {
  font-size: var(--f-xs);
  color: var(--text-muted);
}

/* 数据格子 -------------------------------------------------------------- */
.stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stat__value {
  font-family: var(--font-num);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}

.stat--accent .stat__value {
  color: var(--brand-ink);
}

.stat__label {
  font-size: var(--f-2xs);
  color: var(--text-muted);
}

/* 头像（渐变占位，真实头像接后端时直接换 img） ---------------------------- */
.avatar {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #bf4063, #f29ba6);
}

.avatar--warm {
  background: linear-gradient(135deg, #edb899, #d98085);
}

.avatar--dusk {
  background: linear-gradient(135deg, #4d4561, #9e80a8);
}

/* 轻提示 ---------------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  z-index: 60;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  background: var(--surface-dark-2);
  color: #fff;
  font-size: 13.5px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
  pointer-events: none;
}

.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 560px) {
  .toast {
    right: 20px;
    bottom: 20px;
    left: 20px;
    transform: translateY(12px);
    text-align: center;
  }

  .toast.is-on {
    transform: translateY(0);
  }
}
