/* ================= 全局 ================= */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  --bg: #f2dbe7;
  --grad-bg: linear-gradient(to bottom, rgba(255, 225, 239, 0.55), rgba(204, 251, 255, 0.55));
  --card-bg: rgba(255, 255, 255, 0.5);
  --card-blur: blur(14px) saturate(140%);
  --card-border: 1px solid rgba(255, 255, 255, 0.4);
  --card-shadow: 0 4px 16px rgba(120, 90, 120, 0.10);
  --text-main: #222;
  --text-sub: #5a5560;
  --text-muted: #9a9095;
  --primary: #f04b3f;
  --primary-from: #f04b3f;
  --primary-to: #f62e74;
  --primary-soft: rgba(240, 75, 63, 0.10);
}

html { font-size: 16px; }

body {
  font-family: -apple-system, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: #faf0f5; /* 纯色背景，改这里即可换色 */
  color: var(--text-main);
  line-height: 1.6;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

/* 手机壳：桌面上居中模拟手机宽度 */
.shell {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ================= 顶部横幅图（悬浮玻璃卡片式） ================= */
.top-banner {
  display: block;
  width: calc(100% - 28px);
  height: auto;
  aspect-ratio: 1080 / 360; /* 与占位图比例一致，替换图片后自动适配 */
  object-fit: cover;
  background: rgba(255, 255, 255, 0.5);
  margin: 14px 14px 4px;
  border-radius: 22px;
  box-shadow:
    0 10px 30px rgba(180, 110, 150, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.page-content { position: relative; z-index: 1; }

/* ================= 双列卡片网格 ================= */
.grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 6px 14px 30px;
}
.gcard {
  position: relative;
  width: 48.6%;
  height: 250px;
  margin-bottom: 14px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 10px 28px rgba(180, 110, 150, 0.20),
    0 2px 6px rgba(180, 110, 150, 0.10);
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s;
}
/* 苹果式高光内描边 */
.gcard::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.38),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.45);
  pointer-events: none;
}
.gcard:active {
  transform: scale(0.96);
  box-shadow:
    0 4px 12px rgba(180, 110, 150, 0.22);
}
.poster {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.poster-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.poster-emoji { font-size: 58px; }
.poster-name { font-size: 15px; font-weight: 700; color: rgba(255,255,255,0.92); }

.heat-badge {
  position: absolute;
  top: 9px; left: 9px;
  z-index: 2;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
}
.heat-badge::before { content: "🔥 "; font-size: 10px; }

.overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px 12px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.08), rgba(0,0,0,0.26) 45%, rgba(0,0,0,0.62));
  backdrop-filter: blur(1.5px) saturate(130%);
  -webkit-backdrop-filter: blur(1.5px) saturate(130%);
}
.ov-name {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.35);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ov-meta {
  margin-top: 2px;
  font-size: 11px;
  color: rgba(255,255,255,0.85);
}
.ov-intro {
  margin-top: 6px;
  font-size: 11px;
  line-height: 1.5;
  color: rgba(255,255,255,0.88);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.ov-tags { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 4px; }
.ov-chip {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.25);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
}

.empty { text-align: center; color: var(--text-muted); padding: 60px 0; font-size: 14px; width: 100%; }

/* ================= 详情弹窗 ================= */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}
.mask.show { opacity: 1; pointer-events: auto; }
.detail-sheet {
  position: relative;
  width: 88%;
  max-width: 420px;
  max-height: 84vh;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border-radius: 28px;
  overflow: hidden;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.6),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(0.96);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mask.show .detail-sheet { transform: translateY(0) scale(1); }

.detail-close {
  position: absolute;
  top: 12px; right: 14px;
  z-index: 5;
  width: 32px; height: 32px;
  line-height: 30px;
  text-align: center;
  font-size: 22px;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    0 4px 10px rgba(0, 0, 0, 0.18);
  border-radius: 50%;
  cursor: pointer;
}
.detail-top {
  position: relative;
  width: 100%;
  height: 200px;
  flex-shrink: 0;
}
/* 详情头部大图 */
.detail-hero {
  position: relative;
  width: 100%;
  height: 220px;
  flex-shrink: 0;
  overflow: visible;
}
.detail-hero .detail-poster,
.detail-hero .detail-fallback { border-radius: 0; }
/* 悬浮在头像下的玻璃名片 */
.hero-name-card {
  position: absolute;
  left: 50%;
  bottom: -22px;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow:
    0 8px 24px rgba(180, 110, 150, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  white-space: nowrap;
}
.hero-emoji { font-size: 18px; }
.hero-name { font-size: 18px; font-weight: 800; color: var(--text-main); }
.hero-cat {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary-from), var(--primary-to));
  color: #fff;
  font-weight: 600;
}
.detail-poster { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-fallback { position: absolute; inset: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 70px; }
.detail-heat {
  position: absolute;
  top: 14px; left: 16px;
  padding: 4px 12px;
  font-size: 11px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 999px;
}
.detail-heat::before { content: "🔥 "; }
.detail-title {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: baseline;
  padding: 40px 18px 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.72), transparent);
}
.detail-name { color: #fff; font-size: 24px; font-weight: 800; }
.detail-cat { margin-left: 10px; color: rgba(255,255,255,0.85); font-size: 13px; }

.detail-body { overflow-y: auto; padding: 34px 16px 18px; }

/* 资料卡片（悬浮玻璃卡） */
.profile-card {
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 8px 24px rgba(180, 110, 150, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  padding: 14px;
  margin-bottom: 16px;
}

/* 分区小标题 */
.sec-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  margin: 2px 0 10px;
}
.sec-label::before {
  content: "";
  width: 4px;
  height: 14px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--primary-from), var(--primary-to));
}
.sec-count { font-size: 11px; font-weight: 500; color: var(--text-muted); }

/* 介绍文本 */
.intro-text {
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-sub);
  margin: 0;
}

/* 基本信息九宫格（毛玻璃） */
.info-grid {
  display: flex;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow:
    0 4px 14px rgba(180, 110, 150, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  overflow: hidden;
  margin-bottom: 14px;
}
.info-item {
  flex: 1;
  text-align: center;
  padding: 10px 2px;
}
.info-item + .info-item { border-left: 1px dashed rgba(240, 75, 63, 0.18); }
.info-label { font-size: 10px; color: var(--text-muted); }
.info-value { font-size: 15px; font-weight: 800; color: var(--primary); margin-top: 2px; }
.info-value small { font-size: 9px; font-weight: 400; color: var(--text-muted); margin-left: 1px; }

/* 详情行 */
.detail-row { display: flex; align-items: flex-start; margin-bottom: 12px; }
.detail-label {
  flex-shrink: 0;
  width: 62px;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 2px;
}
.detail-text { flex: 1; color: var(--text-main); font-size: 13.5px; line-height: 1.65; }
.detail-tags { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 2px 6px rgba(180, 110, 150, 0.10);
  color: var(--text-sub);
}

/* 自拍相册 */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gallery-item {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.6);
  box-shadow:
    0 4px 12px rgba(180, 110, 150, 0.14),
    inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.gallery-item:active { transform: scale(0.95); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-item .ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
}
.video-tag {
  position: absolute;
  right: 5px; bottom: 5px;
  font-size: 9px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0,0,0,0.55);
  color: #fff;
}
.no-media { color: var(--text-muted); font-size: 12px; }

/* 视频播放 */
.detail-video { width: 100%; border-radius: 12px; margin-bottom: 12px; background: #000; }

/* ================= 图片灯箱 ================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  cursor: zoom-out;
}
.lightbox.show { opacity: 1; pointer-events: auto; }
.lightbox img, .lightbox video { max-width: 94%; max-height: 88vh; border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.2); }

/* 底部提示 */
.hint { text-align: center; color: var(--text-muted); font-size: 11px; padding: 0 0 30px; opacity: 0.7; }

/* 右下角悬浮刷新按钮 */
.fab-refresh {
  position: fixed;
  bottom: 26px;
  right: max(18px, calc(50% - 240px + 18px)); /* 窄屏贴边，宽屏对齐 480px 内容区右缘 */
  z-index: 90;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  box-shadow: 0 6px 18px rgba(240, 75, 63, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fab-refresh:hover { box-shadow: 0 8px 22px rgba(240, 75, 63, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.9); }
.fab-refresh:active { transform: scale(0.88); }
.fab-refresh:disabled { opacity: 0.6; cursor: default; }
.fab-refresh.spinning { animation: fab-spin 0.9s linear infinite; }
@keyframes fab-spin { to { transform: rotate(360deg); } }

/* 轻提示 toast */
.mini-toast {
  position: fixed;
  left: 50%;
  bottom: 64px;
  transform: translateX(-50%) translateY(8px);
  z-index: 200;
  padding: 9px 20px;
  border-radius: 999px;
  background: rgba(40, 35, 40, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-size: 12px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
}
.mini-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
