/* ============================================================
 * 流光剧场 · 全局样式
 * 设计语言：流动光影风 —— 流光金 / 暖米 / 浅紫灰
 * 配色与对比：头部/页脚统一深紫灰底 + 暖米文字（高对比，杜绝重合）
 * ============================================================ */

:root {
  /* 主色 */
  --gold: #D9A63C;            /* 流光金 */
  --gold-soft: #E8C36B;
  --gold-pale: #F4E6C6;
  --plum: #332B4A;            /* 头部/页脚深紫灰 */
  --plum-deep: #2A2340;
  --plum-ink: #231D36;

  /* 背景与卡片 */
  --bg: #FBF6EC;              /* 暖米 */
  --bg-soft: #F3EBD9;
  --card: #FFFFFF;
  --purple-gray: #C7C1D6;     /* 浅紫灰 */
  --purple-gray-soft: #ECE8F3;

  /* 文字 */
  --ink: #2E2A35;
  --ink-muted: #6E6779;
  --text-on-dark: #F6F2E9;    /* 深底上的暖米文字 */
  --text-on-dark-muted: #C7C1D6;

  /* 其他 */
  --line: #E9E0CC;
  --star: #E0A83C;
  --shadow-sm: 0 4px 14px rgba(46, 42, 53, 0.06);
  --shadow: 0 12px 32px rgba(46, 42, 53, 0.10);
  --shadow-lg: 0 22px 48px rgba(46, 42, 53, 0.16);
  --radius: 14px;
  --radius-lg: 20px;
  --header-h: 72px;
  --container: 1200px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset & 基础 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI",
    system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input { font-family: inherit; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* 无障碍：跳过链接 + 焦点可见 */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: var(--gold); color: var(--plum-ink);
  padding: 10px 18px; border-radius: 0 0 10px 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* 揭示动画基础态 */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ============================================================
 * 头部（非透明、深紫灰底，与页脚统一）
 * ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--plum);
  box-shadow: 0 2px 16px rgba(35, 29, 54, 0.35);
}
.header-inner {
  max-width: var(--container); margin: 0 auto; padding: 0 20px;
  height: var(--header-h);
  display: flex; align-items: center; gap: 22px;
}

/* 品牌 —— 唯一的 h1，放完整名「流光剧场」，不拆分 */
.brand { font-size: 26px; font-weight: 800; letter-spacing: 1px; line-height: 1; }
.brand a {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text-on-dark); padding: 6px 2px;
}
.brand .brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--plum-ink); font-weight: 900; font-size: 18px;
  box-shadow: 0 4px 12px rgba(217, 166, 60, 0.4);
}

/* 导航 */
.main-nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 4px; }
.nav-link {
  position: relative; display: block; padding: 10px 14px;
  color: var(--text-on-dark); font-size: 15.5px; font-weight: 500;
  border-radius: 10px; transition: color .2s, background .2s;
}
.nav-link::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px;
  height: 3px; border-radius: 3px; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform .28s var(--ease);
}
.nav-link:hover { color: var(--gold-soft); background: rgba(255, 255, 255, 0.06); }
.nav-link.is-active { color: var(--gold-soft); font-weight: 700; }
.nav-link.is-active::after { transform: scaleX(1); }

/* 搜索 + 汉堡 */
.header-tools { display: flex; align-items: center; gap: 10px; }
.search { display: flex; align-items: center; }
.search__input {
  width: 200px; height: 40px; padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.18); border-right: none;
  border-radius: 20px 0 0 20px; background: rgba(255, 255, 255, 0.08);
  color: var(--text-on-dark); font-size: 14px; outline: none;
  transition: width .3s var(--ease), background .2s;
}
.search__input::placeholder { color: var(--text-on-dark-muted); }
.search__input:focus { background: rgba(255, 255, 255, 0.14); }
.search__btn {
  height: 40px; width: 44px; border-radius: 0 20px 20px 0;
  background: var(--gold); color: var(--plum-ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; transition: background .2s;
}
.search__btn:hover { background: var(--gold-soft); }

/* 汉堡按钮（移动端） */
.nav-toggle { display: none; flex-direction: column; gap: 5px; padding: 10px; border-radius: 10px; }
.nav-toggle span {
  width: 24px; height: 2.5px; border-radius: 2px; background: var(--text-on-dark);
  transition: transform .3s var(--ease), opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ============================================================
 * 面包屑
 * ============================================================ */
.breadcrumb { padding: 18px 0 4px; font-size: 13.5px; color: var(--ink-muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb li + li::before { content: "›"; margin-right: 8px; color: var(--purple-gray); }
.breadcrumb a { color: var(--ink-muted); transition: color .2s; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ============================================================
 * 首屏轮播
 * ============================================================ */
.hero { position: relative; overflow: hidden; background: var(--plum-ink); }
.hero-track { display: flex; transition: transform .6s var(--ease); }
.hero-slide { position: relative; flex: 0 0 100%; min-height: 460px; display: flex; align-items: flex-end; }
.hero-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-slide::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(35, 29, 54, 0.15) 0%, rgba(35, 29, 54, 0.85) 100%);
}
.hero-slide__content {
  position: relative; z-index: 2; max-width: var(--container);
  margin: 0 auto; width: 100%; padding: 40px 20px 56px; color: #fff;
}
.hero-slide__tag {
  display: inline-block; padding: 4px 12px; border-radius: 20px;
  background: var(--gold); color: var(--plum-ink); font-size: 13px; font-weight: 700;
  margin-bottom: 12px;
}
.hero-slide__title { font-size: clamp(26px, 4vw, 44px); font-weight: 800; letter-spacing: 1px; margin-bottom: 8px; }
.hero-slide__tagline { font-size: 15px; color: var(--purple-gray-soft); max-width: 560px; margin-bottom: 16px; }
.hero-slide__meta { font-size: 13.5px; color: var(--text-on-dark-muted); margin-bottom: 20px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px; border-radius: 30px; font-size: 15px; font-weight: 700;
  transition: transform .2s var(--ease), box-shadow .2s, background .2s, color .2s;
}
.btn:active { transform: scale(0.97); }
.btn--gold { background: var(--gold); color: var(--plum-ink); box-shadow: 0 8px 20px rgba(217, 166, 60, 0.4); }
.btn--gold:hover { background: var(--gold-soft); transform: translateY(-2px); }
.btn--ghost { background: rgba(255, 255, 255, 0.14); color: #fff; border: 1px solid rgba(255, 255, 255, 0.4); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.24); transform: translateY(-2px); }
.btn--outline { background: transparent; color: var(--gold); border: 2px solid var(--gold); }
.btn--outline:hover { background: var(--gold); color: var(--plum-ink); }

/* 轮播控制 */
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(35, 29, 54, 0.55); color: #fff; font-size: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.hero-arrow:hover { background: var(--gold); color: var(--plum-ink); }
.hero-arrow--prev { left: 16px; }
.hero-arrow--next { right: 16px; }
.hero-dots {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 5;
  display: flex; gap: 8px;
}
.hero-dot { width: 10px; height: 10px; border-radius: 20px; background: rgba(255, 255, 255, 0.5); transition: width .3s var(--ease), background .2s; }
.hero-dot.is-active { width: 26px; background: var(--gold); }

/* ============================================================
 * 区块 / 卡片
 * ============================================================ */
.section { padding: 44px 0 12px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
.section-head h2 { font-size: 26px; font-weight: 800; letter-spacing: 1px; position: relative; padding-left: 16px; }
.section-head h2::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 5px; border-radius: 5px; background: linear-gradient(var(--gold-soft), var(--gold));
}
.section-head .section-sub { color: var(--ink-muted); font-size: 14px; margin-top: 6px; }
.section-more { color: var(--ink-muted); font-size: 14.5px; font-weight: 600; transition: color .2s; white-space: nowrap; }
.section-more:hover { color: var(--gold); }

.card-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card__media { position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden; background: var(--purple-gray-soft); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card__media img { transform: scale(1.06); }
.card__badge {
  position: absolute; top: 8px; left: 8px; padding: 3px 9px; border-radius: 8px;
  background: rgba(35, 29, 54, 0.72); color: var(--star); font-weight: 800; font-size: 13px;
}
.card__play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(35, 29, 54, 0.25); opacity: 0; transition: opacity .3s;
}
.card__play span {
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(217, 166, 60, 0.95); color: var(--plum-ink);
  display: inline-flex; align-items: center; justify-content: center; font-size: 18px;
  transform: translateY(8px); transition: transform .3s var(--ease);
}
.card:hover .card__play { opacity: 1; }
.card:hover .card__play span { transform: translateY(0); }
.card__body { padding: 12px 14px 14px; }
.card__title { font-size: 15.5px; font-weight: 700; line-height: 1.35; margin-bottom: 4px; }
.card__title a { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; transition: color .2s; }
.card__title a:hover { color: var(--gold); }
.card__meta { font-size: 12.5px; color: var(--ink-muted); }

/* 分类区块行 */
.cat-block { margin-bottom: 34px; }
.cat-block__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.cat-block__head h3 { font-size: 19px; font-weight: 800; }
.cat-block__head .cat-desc { font-size: 13px; color: var(--ink-muted); }
.cat-block__head .cat-more { margin-left: auto; font-size: 13.5px; color: var(--ink-muted); font-weight: 600; }
.cat-block__head .cat-more:hover { color: var(--gold); }

/* ============================================================
 * 排行 / 列表
 * ============================================================ */
.rank-list { display: flex; flex-direction: column; gap: 14px; }
.rank-item {
  display: flex; align-items: center; gap: 16px;
  background: var(--card); border-radius: var(--radius); padding: 12px 16px 12px 12px;
  box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s;
}
.rank-item:hover { transform: translateX(4px); box-shadow: var(--shadow); }
.rank-no {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; color: var(--ink-muted); background: var(--bg-soft);
}
.rank-item--top .rank-no { color: var(--plum-ink); background: var(--gold); }
.rank-item--top.rank-item--1 .rank-no { background: linear-gradient(135deg, #F2D48B, var(--gold)); box-shadow: 0 4px 14px rgba(217, 166, 60, .5); }
.rank-item--2 .rank-no { background: linear-gradient(135deg, #D7DDE4, #B9C4CC); }
.rank-item--3 .rank-no { background: linear-gradient(135deg, #E8C6A8, #D09A6A); }
.rank-thumb { flex: 0 0 auto; width: 54px; height: 74px; border-radius: 8px; overflow: hidden; background: var(--purple-gray-soft); }
.rank-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rank-info { min-width: 0; flex: 1; }
.rank-info h3 { font-size: 16px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-info h3 a:hover { color: var(--gold); }
.rank-info .rank-meta { font-size: 12.5px; color: var(--ink-muted); margin-top: 3px; }
.rank-score { flex: 0 0 auto; text-align: right; }
.rank-score b { font-size: 20px; color: var(--star); }
.rank-score span { display: block; font-size: 11.5px; color: var(--ink-muted); }

/* ============================================================
 * 下载 App 引导
 * ============================================================ */
.app-guide {
  margin-top: 40px; background: linear-gradient(135deg, var(--plum) 0%, var(--plum-deep) 100%);
  color: var(--text-on-dark); position: relative; overflow: hidden;
}
.app-guide::before {
  content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 166, 60, 0.35), transparent 70%);
  top: -120px; right: -60px;
}
.app-guide__inner {
  max-width: var(--container); margin: 0 auto; padding: 48px 20px;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center;
}
.app-guide__text h2 { font-size: 30px; font-weight: 800; margin-bottom: 10px; }
.app-guide__text p { color: var(--text-on-dark-muted); max-width: 480px; margin-bottom: 22px; }
.app-guide__btns { display: flex; gap: 14px; flex-wrap: wrap; }
.app-guide__media { display: flex; justify-content: center; }
.app-guide__media img {
  width: 240px; height: auto; border-radius: 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); transform: rotate(-3deg);
  transition: transform .4s var(--ease);
}
.app-guide__media img:hover { transform: rotate(0deg) translateY(-6px); }

/* ============================================================
 * 详情页
 * ============================================================ */
.detail-hero { position: relative; overflow: hidden; border-radius: var(--radius-lg); margin-bottom: 28px; background: var(--plum-ink); }
.detail-hero__bg { position: absolute; inset: 0; }
.detail-hero__bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.5; }
.detail-hero__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(35,29,54,.3), rgba(35,29,54,.92)); }
.detail-hero__inner { position: relative; z-index: 2; padding: 40px; display: flex; gap: 32px; color: #fff; }
.detail-poster { flex: 0 0 auto; width: 220px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.detail-poster img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.detail-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.detail-info h2 { font-size: 30px; font-weight: 800; letter-spacing: 1px; margin-bottom: 10px; }
.detail-info .detail-sub { color: var(--text-on-dark-muted); font-size: 14px; margin-bottom: 14px; }
.detail-info .detail-sub b { color: var(--star); font-size: 18px; margin-right: 6px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.detail-tags span { padding: 4px 12px; border-radius: 20px; background: rgba(255,255,255,0.12); font-size: 13px; }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.detail-body { display: grid; grid-template-columns: 1.8fr 1fr; gap: 28px; padding-bottom: 40px; }
.detail-section { background: var(--card); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm); }
.detail-section h3 { font-size: 18px; font-weight: 800; margin-bottom: 12px; padding-left: 12px; position: relative; }
.detail-section h3::before { content: ""; position: absolute; left: 0; top: 5px; bottom: 5px; width: 4px; border-radius: 4px; background: var(--gold); }
.detail-section p { color: var(--ink-muted); font-size: 14.5px; }
.detail-meta-list { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.detail-meta-list li { display: flex; }
.detail-meta-list .k { flex: 0 0 70px; color: var(--ink-muted); }
.detail-meta-list .v { flex: 1; }
.detail-empty { padding: 80px 20px; text-align: center; color: var(--ink-muted); }
.detail-empty a { color: var(--gold); font-weight: 700; }

/* 相关推荐 */
.related { padding-bottom: 48px; }

/* ============================================================
 * 页脚（与头部统一：深紫灰底 + 暖米文字）
 * 站点名称 / 标题全文 —— 两个独立标签
 * ============================================================ */
.site-footer { background: var(--plum); color: var(--text-on-dark); margin-top: 30px; }
.footer-inner { max-width: var(--container); margin: 0 auto; padding: 50px 20px 26px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px; }
.footer-site-name {
  display: inline-block; font-size: 26px; font-weight: 800; letter-spacing: 1px;
  color: var(--gold-soft); margin-bottom: 8px;
}
.footer-site-title { font-size: 14px; color: var(--text-on-dark-muted); margin-bottom: 12px; }
.footer-slogan { font-size: 13px; color: var(--text-on-dark-muted); opacity: .85; }
.footer-col h2 { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 16px; letter-spacing: 1px; }
.footer-col ul { display: flex; flex-direction: column; gap: 9px; }
.footer-col li, .footer-col a { font-size: 13.5px; color: var(--text-on-dark-muted); transition: color .2s; }
.footer-col a:hover { color: var(--gold-soft); }
.social a { display: inline-flex; align-items: center; gap: 6px; }
.social a::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); opacity: .7; }
.footer-bottom {
  margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between;
  font-size: 12.5px; color: var(--text-on-dark-muted);
}
.footer-bottom a { color: var(--text-on-dark-muted); }
.footer-bottom a:hover { color: var(--gold-soft); }

/* 回到顶部 */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--gold); color: var(--plum-ink); font-size: 20px;
  box-shadow: var(--shadow); display: inline-flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity .3s, transform .3s, visibility .3s;
}
.to-top.is-show { opacity: 1; visibility: visible; transform: none; }

/* ============================================================
 * 响应式
 * ============================================================ */
@media (max-width: 1080px) {
  .card-grid { grid-template-columns: repeat(4, 1fr); }
  .detail-body { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .header-inner { gap: 12px; }
  .search__input { width: 140px; }

  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    background: var(--plum-deep); border-top: 1px solid rgba(255,255,255,0.1);
    max-height: 0; overflow: hidden; transition: max-height .35s var(--ease);
  }
  .main-nav.is-open { max-height: 400px; box-shadow: 0 20px 30px rgba(0,0,0,.3); }
  .nav-list { flex-direction: column; align-items: stretch; padding: 10px 16px 16px; }
  .nav-link { padding: 12px 14px; font-size: 16px; }
  .nav-link::after { display: none; }

  .app-guide__inner { grid-template-columns: 1fr; text-align: center; }
  .app-guide__text p { margin-left: auto; margin-right: auto; }
  .app-guide__btns { justify-content: center; }
  .app-guide__media img { width: 200px; }

  .detail-hero__inner { flex-direction: column; padding: 24px; }
  .detail-poster { width: 160px; }
}

@media (max-width: 560px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .search { display: none; }
  .header-inner { justify-content: space-between; }
  .brand { font-size: 22px; }
  .hero-slide { min-height: 420px; }
  .section { padding-top: 32px; }
  .section-head h2 { font-size: 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
  .rank-item { gap: 12px; }
}

/* 无障碍：减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
