/* ========================================================================
   组件样式
   ======================================================================== */

/* ---------- 顶部导航 ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 241, 236, 0.88);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--c-line);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 54px;
}

.nav__brand {
  font-family: var(--ff-serif);
  font-size: var(--fs-h3);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.nav__brand small {
  font-family: var(--ff-sans);
  font-size: var(--fs-caption);
  color: var(--c-ink-mute);
  margin-left: var(--sp-2);
  font-weight: 400;
}

.nav__cta {
  font-size: var(--fs-small);
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: var(--c-ink);
  color: var(--c-bg);
  transition: opacity 0.2s;
}

.nav__cta:active {
  opacity: 0.7;
}

/* ---------- Hero（首屏：艺人形象 + 一句话定位） ---------- */
.hero {
  padding: var(--sp-7) 0 var(--sp-6);
  text-align: center;
}

.hero__photo {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  margin: 0 auto var(--sp-5);
  background: linear-gradient(135deg, var(--c-mist-rose), var(--c-mist-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-serif);
  font-size: 2.6rem;
  color: var(--c-bg-card);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;          /* 让图片被裁成圆形 */
}

/* 图片加载失败时的兜底文字（默认在图片下方，被图片盖住） */
.hero__photo-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-serif);
  font-size: 2.6rem;
  color: var(--c-bg-card);
}

/* 圆形头像图片：铺满整个圆，盖在兜底文字上面 */
.hero__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  z-index: 1;                /* 盖住 fallback 文字 */
}

.hero__photo::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid var(--c-mist-rose);
  opacity: 0.5;
}

.hero__name {
  font-family: var(--ff-serif);
  font-size: var(--fs-display);
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-2);
}

.hero__tagline {
  color: var(--c-ink-soft);
  font-size: var(--fs-body);
  margin-bottom: var(--sp-5);
}

.hero__quick {
  /* 导演快速入口：突出但克制 */
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-small);
  color: var(--c-ink-soft);
  padding: 8px var(--sp-4);
  border: 1px solid var(--c-line);
  border-radius: var(--r-pill);
  background: var(--c-bg-card);
}

.hero__quick b {
  color: var(--c-accent);
  font-weight: 600;
}

/* ---------- 资料卡（给导演的核心：casting 信息） ---------- */
.profile-card {
  background: var(--c-bg-card);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  box-shadow: var(--shadow-sm);
}

.profile-card__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--c-line);
}

.profile-card__title {
  font-family: var(--ff-serif);
  font-size: var(--fs-h3);
  font-weight: 600;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3) var(--sp-4);
}

.profile-grid__item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-grid__item .label {
  font-size: var(--fs-caption);
  color: var(--c-ink-mute);
  letter-spacing: 0.05em;
}

.profile-grid__item .value {
  font-size: var(--fs-body);
  color: var(--c-ink);
}

.profile-grid__item--full {
  grid-column: 1 / -1;
}

/* ---------- 标签（才艺/戏路） ---------- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.tag {
  font-size: var(--fs-small);
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: var(--c-mist-blue);
  color: var(--c-ink);
  background: color-mix(in srgb, var(--c-mist-blue) 55%, var(--c-bg-card));
}

.tag--rose {
  background: color-mix(in srgb, var(--c-mist-rose) 60%, var(--c-bg-card));
}

.tag--green {
  background: color-mix(in srgb, var(--c-mist-green) 55%, var(--c-bg-card));
}

.tag--mocha {
  background: color-mix(in srgb, var(--c-mocha) 55%, var(--c-bg-card));
}

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

.work-card {
  background: var(--c-bg-card);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.work-card__cover {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--c-mist-blue), var(--c-mist-rose));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* 封面图片铺满，加载失败时 onerror 隐藏、露出渐变底色 */
.work-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.work-card__cover.playable::after {
  content: "▶";
  position: absolute;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  color: var(--c-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  padding-left: 3px;
  backdrop-filter: blur(4px);
}

.work-card__body {
  padding: var(--sp-4);
}

.work-card__title {
  font-family: var(--ff-serif);
  font-size: var(--fs-h3);
  font-weight: 600;
  margin-bottom: 2px;
}

.work-card__role {
  font-size: var(--fs-small);
  color: var(--c-ink-soft);
  margin-bottom: var(--sp-2);
}

.work-card__meta {
  font-size: var(--fs-caption);
  color: var(--c-ink-mute);
  display: flex;
  gap: var(--sp-3);
}

/* ---------- 时间轴（成长足迹，粉丝+导演一鱼两吃） ---------- */
.timeline {
  position: relative;
  padding-left: var(--sp-5);
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: var(--c-mist-rose-deep);
  opacity: 0.4;
}

.timeline__item {
  position: relative;
  padding-bottom: var(--sp-5);
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__dot {
  position: absolute;
  left: calc(-1 * var(--sp-5) + 1px);
  top: 4px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c-bg);
  border: 2px solid var(--c-accent);
}

.timeline__date {
  font-size: var(--fs-caption);
  color: var(--c-accent);
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.timeline__title {
  font-family: var(--ff-serif);
  font-size: var(--fs-body);
  font-weight: 600;
}

.timeline__desc {
  font-size: var(--fs-small);
  color: var(--c-ink-soft);
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-size: var(--fs-body);
  padding: 12px var(--sp-5);
  border-radius: var(--r-pill);
  transition: transform 0.15s, opacity 0.2s;
  width: 100%;
}

.btn--primary {
  background: var(--c-ink);
  color: var(--c-bg);
}

.btn--ghost {
  background: transparent;
  border: 1px solid var(--c-line);
  color: var(--c-ink);
}

.btn:active {
  transform: scale(0.98);
  opacity: 0.85;
}

/* ---------- 表单（合作邀约） ---------- */
.form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field label {
  font-size: var(--fs-small);
  color: var(--c-ink-soft);
}

.field input,
.field textarea,
.field select {
  font: inherit;
  font-size: var(--fs-body);
  padding: 11px var(--sp-4);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-bg-card);
  color: var(--c-ink);
  outline: none;
  transition: border-color 0.2s;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--c-accent);
}

.field textarea {
  resize: vertical;
  min-height: 88px;
}

.form__note {
  font-size: var(--fs-caption);
  color: var(--c-ink-mute);
  text-align: center;
}

/* ---------- 家长守护说明（信任背书） ---------- */
.guard {
  background: var(--c-bg-card);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  border: 1px solid var(--c-line);
}

.guard__head {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--ff-serif);
  font-size: var(--fs-h3);
  font-weight: 600;
  margin-bottom: var(--sp-4);
}

.guard__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.guard__list li {
  font-size: var(--fs-small);
  color: var(--c-ink-soft);
  padding-left: var(--sp-4);
  position: relative;
  line-height: 1.6;
}

.guard__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--c-mist-green-deep, var(--c-accent));
}

/* ---------- 粉丝入口卡片（首页末尾，降级展示） ---------- */
.fans-entry {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--c-mist-rose) 40%, var(--c-bg-card)),
    color-mix(in srgb, var(--c-mist-blue) 40%, var(--c-bg-card)));
  border-radius: var(--r-lg);
  padding: var(--sp-6) var(--sp-5);
  text-align: center;
}

.fans-entry__title {
  font-family: var(--ff-serif);
  font-size: var(--fs-h2);
  font-weight: 600;
  margin-bottom: var(--sp-2);
}

.fans-entry__desc {
  font-size: var(--fs-small);
  color: var(--c-ink-soft);
  margin-bottom: var(--sp-4);
}

/* ---------- 留言墙（粉丝页） ---------- */
.msg-wall {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.msg-item {
  background: var(--c-bg-card);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  box-shadow: var(--shadow-sm);
}

.msg-item__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--sp-2);
}

.msg-item__name {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--c-ink);
}

.msg-item__date {
  font-size: var(--fs-caption);
  color: var(--c-ink-mute);
}

.msg-item__text {
  font-size: var(--fs-small);
  color: var(--c-ink-soft);
  line-height: 1.6;
}

.msg-item__like {
  margin-top: var(--sp-2);
  font-size: var(--fs-caption);
  color: var(--c-accent);
}

/* ---------- 壁纸网格 ---------- */
.wallpaper-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-3);
}

.wallpaper {
  aspect-ratio: 9 / 16;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--c-mist-rose), var(--c-mocha));
  display: flex;
  align-items: flex-end;
  padding: var(--sp-3);
  font-family: var(--ff-serif);
  font-size: var(--fs-small);
  color: var(--c-bg-card);
  position: relative;
  overflow: hidden;
}

.wallpaper img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wallpaper__txt {
  position: relative;
  z-index: 1;
}

.wallpaper:nth-child(2) {
  background: linear-gradient(135deg, var(--c-mist-blue), var(--c-mist-green));
}

.wallpaper:nth-child(3) {
  background: linear-gradient(135deg, var(--c-mocha), var(--c-mist-rose-deep));
}

.wallpaper:nth-child(4) {
  background: linear-gradient(135deg, var(--c-mist-green), var(--c-mist-blue-deep));
}

/* ---------- 页脚 ---------- */
.footer {
  padding: var(--sp-6) 0 calc(var(--sp-6) + env(safe-area-inset-bottom));
  text-align: center;
  border-top: 1px solid var(--c-line);
  margin-top: var(--sp-6);
}

.footer__links {
  display: flex;
  justify-content: center;
  gap: var(--sp-5);
  margin-bottom: var(--sp-3);
  font-size: var(--fs-small);
}

.footer__links a {
  color: var(--c-ink-soft);
}

.footer__copy {
  font-size: var(--fs-caption);
  color: var(--c-ink-mute);
  line-height: 1.8;
}

/* ---------- Toast（轻提示） ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(32px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px);
  background: var(--c-ink);
  color: var(--c-bg);
  font-size: var(--fs-small);
  padding: 10px var(--sp-5);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  z-index: 100;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- 精彩视频（首屏最显眼位置） ---------- */
.video-main {
  width: 100%;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-md);
  aspect-ratio: 9 / 16;   /* 竖屏视频为主，适配手机 */
  max-height: 70vh;
  margin: 0 auto;
  display: block;
}

.video-main video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-list {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  margin-top: var(--sp-3);
  padding-bottom: var(--sp-2);
  -webkit-overflow-scrolling: touch;
}

.video-thumb {
  flex: 0 0 64px;
  height: 96px;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: linear-gradient(135deg, var(--c-mist-blue), var(--c-mist-rose));
  position: relative;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}

.video-thumb.active {
  border-color: var(--c-accent);
}

.video-thumb::after {
  content: "▶";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.18);
}

.video-empty {
  font-size: var(--fs-small);
  color: var(--c-ink-mute);
  text-align: center;
  padding: var(--sp-5) 0;
  line-height: 1.8;
}

/* ---------- 作品画廊（每个经历的图片网格） ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}

.gallery__item {
  aspect-ratio: 1 / 1;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: linear-gradient(135deg, var(--c-mist-blue), var(--c-mist-rose));
  cursor: pointer;
  position: relative;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery__item:active img {
  transform: scale(0.97);
}

/* 单图时占满宽度，更舒展 */
.gallery--single {
  grid-template-columns: 1fr;
}

.gallery--single .gallery__item {
  aspect-ratio: 16 / 9;
}

.gallery__count {
  font-size: var(--fs-caption);
  color: var(--c-ink-mute);
  margin-top: var(--sp-2);
  text-align: right;
}

/* ---------- 灯箱（点击放大） ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(30, 27, 24, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: var(--sp-4);
}

.lightbox.show {
  display: flex;
}

.lightbox__img {
  max-width: 100%;
  max-height: 82vh;
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
}

.lightbox__close {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  right: var(--sp-4);
  color: #fff;
  font-size: 1.8rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  font-size: 1.6rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__nav--prev { left: var(--sp-3); }
.lightbox__nav--next { right: var(--sp-3); }

.lightbox__index {
  position: absolute;
  bottom: calc(20px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.8);
  font-size: var(--fs-small);
}

/* ============================================================
   后台管理（admin.html）
   ============================================================ */
.admin-login {
  max-width: 360px;
  margin: var(--sp-8) auto;
  text-align: center;
}

.admin-login h1 {
  font-family: var(--ff-serif);
  font-size: var(--fs-h1);
  margin-bottom: var(--sp-2);
}

.admin-tabs {
  position: sticky;
  top: 54px;
  z-index: 40;
  display: flex;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-line);
  overflow-x: auto;
}

.admin-tab {
  flex: 1;
  text-align: center;
  padding: var(--sp-3) 0;
  font-size: var(--fs-small);
  color: var(--c-ink-soft);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  cursor: pointer;
}

.admin-tab.active {
  color: var(--c-ink);
  border-bottom-color: var(--c-accent);
  font-weight: 600;
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
}

.admin-badge {
  display: inline-block;
  font-size: var(--fs-caption);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--c-mist-rose);
  color: var(--c-ink);
}

.admin-badge--ok {
  background: var(--c-mist-green);
}

.admin-badge--wait {
  background: var(--c-mocha);
  color: #fff;
}

.admin-action {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-top: var(--sp-2);
}

.admin-action button {
  font-size: var(--fs-caption);
  padding: 5px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--c-line);
  background: var(--c-bg-card);
  color: var(--c-ink);
}

.admin-action button.primary {
  background: var(--c-ink);
  color: var(--c-bg);
  border-color: var(--c-ink);
}

.admin-action button.danger {
  color: #b56;
  border-color: #d9bcc2;
}

textarea.reply-input {
  width: 100%;
  font: inherit;
  font-size: var(--fs-small);
  padding: 8px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  margin-top: var(--sp-2);
  resize: vertical;
  min-height: 60px;
}

.file-hint {
  font-size: var(--fs-caption);
  color: var(--c-ink-mute);
  margin-top: 4px;
}

/* 上传按钮组（相册 / 拍照 二选一） */
.upload-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  border: 1px solid var(--c-line);
  background: var(--c-bg-card);
  font-size: var(--fs-small);
  color: var(--c-ink);
  cursor: pointer;
  transition: opacity 0.2s, background 0.2s;
}

.upload-btn:active {
  opacity: 0.7;
}

.upload-btn span {
  pointer-events: none;   /* 确保点击触发隐藏的 input */
}

.upload-name {
  font-size: var(--fs-caption);
  color: var(--c-ink-mute);
  flex: 1;
  min-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 弹层（Showreel） ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(61, 57, 53, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 90;
  padding: var(--sp-5);
}

.modal.show {
  display: flex;
}

.modal__box {
  background: var(--c-bg-card);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 420px;
  padding: var(--sp-5);
  text-align: center;
}

.modal__title {
  font-family: var(--ff-serif);
  font-size: var(--fs-h3);
  margin-bottom: var(--sp-3);
}

.modal__desc {
  font-size: var(--fs-small);
  color: var(--c-ink-soft);
  margin-bottom: var(--sp-4);
}
