/*
 * profile.css - 个人档案 (profile.html), on top of css/section-page.css.
 */

.profile-page .section-shell { width: min(1080px, 100%); }
.profile-root { margin-top: 30px; }
.profile-root > .top-skeleton { min-height: 160px; border-radius: 22px; margin-bottom: 14px; }

/* ---------- buttons ---------- */
.profile-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border: 1px solid rgba(186, 134, 255, .36);
  border-radius: 999px;
  background: rgba(186, 134, 255, .1);
  color: #eadcff;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--dur-s) var(--ease-out),
    background-color var(--dur-s) var(--ease-out),
    border-color var(--dur-s) var(--ease-out);
}
.profile-button .icon { font-size: 14px; }
.profile-button.is-primary {
  border-color: transparent;
  background: linear-gradient(135deg, #9257ff, #ba86ff);
  color: #fff;
}
@media (hover: hover) {
  .profile-button:hover { transform: scale(1.04); background-color: rgba(186, 134, 255, .22); border-color: rgba(216, 180, 255, .6); }
}
.profile-button:active { transform: scale(.96); }
.profile-button:disabled { opacity: .5; cursor: progress; }

/* ---------- who you are ---------- */
.profile-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "avatar id stats"
    "actions actions actions";
  align-items: center;
  gap: 18px 24px;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 12% 0, rgba(186, 134, 255, .18), transparent 40%),
    var(--panel);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .26);
  animation: top-rise-in var(--dur-l) var(--ease-out) both;
}
.profile-avatar {
  grid-area: avatar;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: linear-gradient(135deg, #9257ff, #d8b4ff);
  box-shadow: 0 0 0 5px rgba(186, 134, 255, .16);
  color: #fff;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 32px;
  font-weight: 600;
  animation: top-scale-in var(--dur-l) var(--ease-spring) both;
}
.profile-id { grid-area: id; min-width: 0; }
.profile-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.profile-name h2 {
  margin: 0;
  overflow-wrap: anywhere;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
}
.profile-badge {
  padding: 3px 10px;
  border: 1px solid rgba(216, 180, 255, .5);
  border-radius: 999px;
  color: #eadcff;
  font-size: 11px;
  letter-spacing: .1em;
}
.profile-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 13px;
}
.profile-facts li { display: inline-flex; align-items: center; gap: 6px; }
.profile-facts .icon { color: var(--purple); }

.profile-stats { grid-area: stats; display: flex; gap: 10px; }
.profile-stat {
  display: grid;
  justify-items: center;
  min-width: 86px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(10, 6, 18, .4);
}
.profile-stat strong {
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: 26px;
  font-weight: 500;
  line-height: 1.1;
}
.profile-stat span { margin-top: 4px; color: var(--muted); font-size: 11px; letter-spacing: .06em; }
.profile-actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* ---------- collection ---------- */
.profile-section {
  margin-top: 40px;
  animation: top-rise-in var(--dur-l) var(--ease-out) .12s both;
}
.profile-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.profile-section-head h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 22px;
  font-weight: 600;
}
.profile-section-head h2 .icon { color: var(--purple); }
.profile-section-head > span { color: var(--muted); font-size: 12px; }

.profile-groups { display: grid; gap: 14px; }
.profile-group {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  transition: border-color var(--dur-m) var(--ease-out);
}
@media (hover: hover) { .profile-group:hover { border-color: rgba(193, 145, 255, .38); } }
.profile-group-head {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}
.profile-group-cover {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(186, 134, 255, .1);
}
.profile-group-cover.is-empty { display: grid; place-items: center; color: var(--purple); font-size: 24px; }
.profile-group-copy { min-width: 0; }
.profile-group-copy h3 {
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-group-copy small { display: block; margin-top: 2px; color: var(--purple); font-size: 11px; letter-spacing: .08em; }
.profile-meter {
  height: 5px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
}
.profile-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #9257ff, #d8b4ff);
  transform-origin: left center;
  animation: profileMeter .9s var(--ease-out) .2s both;
}
.profile-group-count { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.profile-group-count b { color: var(--text); font-weight: 650; }
.profile-group-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #eadcff;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.profile-group-link .icon { transition: transform var(--dur-s) var(--ease-out); }
.profile-group-link:hover .icon { transform: translateX(3px); }

.profile-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.profile-thumb {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  text-decoration: none;
  transition: transform var(--dur-s) var(--ease-out);
}
.profile-thumb img {
  width: 100%;
  aspect-ratio: 5 / 7;
  border: 1px solid var(--line);
  border-radius: 10px;
  object-fit: cover;
  background: rgba(186, 134, 255, .08);
}
.profile-thumb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) { .profile-thumb:hover { transform: translateY(-3px); } }
.profile-thumb:active { transform: scale(.96); }

.profile-more {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  padding: 4px 2px;
  border: 0;
  background: none;
  color: var(--purple);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}
.profile-more .icon { transition: transform var(--dur-m) var(--ease-out); }
.profile-more.is-open .icon { transform: rotate(180deg); }

/* ---------- 踢屁屁语录 ---------- */
.whisper-section { --night: #a99bff; --morning: #ffd27a; }
.whisper-progress-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.whisper-progress {
  --tone: var(--night);
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--tone) 16%, transparent), transparent 55%),
    var(--panel);
  transition: border-color var(--dur-s) var(--ease-out), transform var(--dur-s) var(--ease-out);
}
.whisper-progress.is-morning { --tone: var(--morning); }
@media (hover: hover) { .whisper-progress:hover { border-color: color-mix(in srgb, var(--tone) 45%, transparent); transform: translateY(-2px); } }
.whisper-progress-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--tone) 16%, transparent);
  color: var(--tone);
}
.whisper-progress-icon svg { width: 24px; height: 24px; }
.whisper-progress-copy h3 { margin: 0; font-size: 14px; font-weight: 650; letter-spacing: .06em; }
.whisper-progress-count { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.whisper-progress-count b { color: var(--text); font-family: "Noto Serif SC", "Songti SC", serif; font-size: 26px; font-weight: 600; }
.whisper-progress .profile-meter span { background: linear-gradient(90deg, color-mix(in srgb, var(--tone) 55%, #9257ff), var(--tone)); }
.whisper-progress-split {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 9px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 11px;
  list-style: none;
}
.whisper-progress-split li { display: inline-flex; align-items: center; gap: 4px; }
.whisper-progress-split svg { width: 13px; height: 13px; }
.whisper-progress-split .is-found { color: var(--tone); }

.whisper-stage-wrap { display: grid; justify-items: center; gap: 14px; margin-top: 18px; scroll-margin-top: 90px; }
.whisper-stage { display: grid; width: min(560px, 100%); }
.whisper-stage > * { grid-area: 1 / 1; }
.whisper-card {
  --tone: var(--night);
  position: relative;
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 24px 26px 22px;
  border: 1px solid color-mix(in srgb, var(--tone) 34%, transparent);
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--tone) 20%, transparent), transparent 50%),
    linear-gradient(160deg, rgba(40, 26, 62, .92), rgba(20, 13, 31, .92));
  box-shadow: 0 22px 50px rgba(0, 0, 0, .3);
  animation: whisperIn var(--dur-l) var(--ease-spring) both;
}
.whisper-card.is-morning { --tone: var(--morning); }
.whisper-card.is-leaving { pointer-events: none; animation: whisperOut .22s var(--ease-out) both; }
.whisper-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.whisper-card-head time { margin-left: auto; color: var(--muted); font-size: 11px; }
.whisper-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px 3px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--tone) 14%, transparent);
  color: var(--tone);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .06em;
}
.whisper-tag svg { width: 14px; height: 14px; }
.whisper-tag.is-voice { background: linear-gradient(135deg, rgba(146, 87, 255, .35), rgba(216, 180, 255, .25)); color: #f3e8ff; }
.whisper-card-title { margin: 0; font-family: "Noto Serif SC", "Songti SC", serif; font-size: 18px; font-weight: 600; }
.whisper-card-text {
  margin: 0;
  color: #f6efff;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 16px;
  line-height: 1.9;
  white-space: pre-line;
}
.whisper-card-sign { margin: 0; color: var(--muted); font-size: 12px; text-align: right; }
.whisper-card.is-empty { justify-items: center; color: var(--muted); font-size: 13px; line-height: 1.8; text-align: center; }
.whisper-card.is-empty p { margin: 0; max-width: 380px; }
.whisper-empty-icon { display: inline-flex; gap: 10px; color: var(--night); }
.whisper-empty-icon svg { width: 28px; height: 28px; }
.whisper-empty-icon svg + svg { color: var(--morning); }
.whisper-shuffle svg { width: 15px; height: 15px; transition: transform var(--dur-m) var(--ease-out); }
.whisper-shuffle:active svg { transform: rotate(180deg); }

.whisper-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.whisper-filter {
  appearance: none;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition:
    transform var(--dur-s) var(--ease-out),
    background-color var(--dur-s) var(--ease-out),
    color var(--dur-s) var(--ease-out),
    border-color var(--dur-s) var(--ease-out);
}
.whisper-filter small { opacity: .7; }
@media (hover: hover) { .whisper-filter:hover { color: var(--text); transform: scale(1.04); } }
.whisper-filter:active { transform: scale(.95); }
.whisper-filter.is-active { border-color: rgba(216, 180, 255, .55); background: rgba(186, 134, 255, .16); color: #f3e8ff; }

.whisper-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin-top: 12px; }
.whisper-list .profile-more { grid-column: 1 / -1; justify-self: start; margin-top: 4px; }
.whisper-list-empty { grid-column: 1 / -1; margin: 6px 0; color: var(--muted); font-size: 12px; }
.whisper-item {
  --tone: var(--night);
  appearance: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(23, 15, 34, .6);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition:
    transform var(--dur-s) var(--ease-out),
    border-color var(--dur-s) var(--ease-out),
    background-color var(--dur-s) var(--ease-out);
}
.whisper-item.is-morning { --tone: var(--morning); }
.whisper-item-icon { flex: none; display: grid; place-items: center; color: var(--tone); }
.whisper-item-icon svg { width: 17px; height: 17px; }
.whisper-item.has-audio .whisper-item-icon { color: #e3ccff; }
.whisper-item-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) { .whisper-item:hover { border-color: color-mix(in srgb, var(--tone) 45%, transparent); transform: translateY(-2px); } }
.whisper-item:active { transform: scale(.97); }
.whisper-item.is-active {
  border-color: color-mix(in srgb, var(--tone) 60%, transparent);
  background: color-mix(in srgb, var(--tone) 12%, rgba(23, 15, 34, .8));
}

/* voice player (js/audio-clip.js), the same look as in css/concerts.css */
.whisper-card .audio-clip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 14px 7px 7px;
  border: 1px solid rgba(186, 134, 255, .3);
  border-radius: 999px;
  background: rgba(23, 15, 34, .7);
  animation: top-fade-in var(--dur-m) var(--ease-out) both;
}
.whisper-card .audio-clip-play {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #ba86ff, rgba(216, 180, 255, .9));
  color: #fff;
  cursor: pointer;
  transition: transform var(--dur-s) var(--ease-out), box-shadow var(--dur-s) var(--ease-out);
}
.whisper-card .audio-clip-play svg { width: 15px; height: 15px; }
@media (hover: hover) { .whisper-card .audio-clip-play:hover { transform: scale(1.08); box-shadow: 0 0 0 5px rgba(186, 134, 255, .18); } }
.whisper-card .audio-clip-play:active { transform: scale(.92); }
.whisper-card .audio-clip.is-loading .audio-clip-play { animation: whisperPulse 1s ease-in-out infinite; }
.whisper-card .audio-clip.is-error .audio-clip-play { background: rgba(251, 247, 255, .2); cursor: not-allowed; }
.whisper-card .audio-clip-main { flex: 1; min-width: 0; display: grid; gap: 5px; }
.whisper-card .audio-clip-track {
  position: relative;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(251, 247, 255, .14);
  cursor: pointer;
}
.whisper-card .audio-clip-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #ba86ff, #d8b4ff);
}
.whisper-card .audio-clip-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.whisper-card .audio-clip-time { color: rgba(251, 247, 255, .6); font-size: 11px; font-variant-numeric: tabular-nums; }
.whisper-card .audio-clip-volume { display: inline-flex; align-items: center; gap: 6px; color: rgba(251, 247, 255, .65); }
.whisper-card .audio-clip-volume-icon svg { display: block; width: 14px; height: 14px; }
.whisper-card .audio-clip-volume input {
  width: 72px;
  height: 4px;
  margin: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #ba86ff var(--pct, 100%), rgba(251, 247, 255, .16) var(--pct, 100%));
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.whisper-card .audio-clip-volume input::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: #ba86ff;
  -webkit-appearance: none;
}
.whisper-card .audio-clip-volume input::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #ba86ff; }

@keyframes whisperIn { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes whisperOut { to { opacity: 0; transform: translateY(-10px) scale(.97); } }
@keyframes whisperPulse { 50% { opacity: .55; transform: scale(.94); } }

/* ---------- empty / locked ---------- */
.profile-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 44px 24px;
  border: 1px dashed rgba(201, 166, 243, .3);
  border-radius: 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
  text-align: center;
  animation: top-fade-in var(--dur-m) var(--ease-out) both;
}
.profile-empty strong { color: var(--text); font-size: 16px; font-weight: 600; }
.profile-empty p { margin: 0; max-width: 420px; }
.profile-empty .profile-button { margin-top: 6px; }
.profile-empty-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(186, 134, 255, .14);
  color: var(--purple);
  font-size: 22px;
}

@keyframes profileMeter { from { transform: scaleX(0); } }

@media (max-width: 760px) {
  .profile-card {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "avatar id"
      "stats stats"
      "actions actions";
    padding: 20px;
  }
  .profile-avatar { width: 60px; height: 60px; font-size: 26px; }
  .profile-stats { justify-content: stretch; }
  .profile-stat { flex: 1; min-width: 0; }
  .profile-group { padding: 14px; }
  .profile-group-head { grid-template-columns: 52px minmax(0, 1fr); }
  .profile-group-cover { width: 52px; height: 52px; }
  .profile-group-link { grid-column: 1 / -1; justify-self: start; }
  .profile-thumbs { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
  .whisper-progress-row { grid-template-columns: minmax(0, 1fr); }
  .whisper-progress { padding: 15px 16px; }
  .whisper-card { padding: 20px 18px 18px; }
  .whisper-card-text { font-size: 15px; }
  .whisper-card .audio-clip-volume input { width: 56px; }
  .whisper-list { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .profile-card, .profile-avatar, .profile-section, .profile-meter span, .whisper-card { animation: none; }
  .whisper-card.is-leaving { display: none; }
}
