/* 站点皮肤 · lotus-ink · 水墨东方 · m63 影视骨架 */
:root {
  --accent: #2c4a4a;
  --accent-light: #3d5c5c;
  --accent-deep: #1a3333;
  --accent-soft: rgba(44, 74, 74, 0.12);
  --vermillion: #c23a2a;
  --vermillion-soft: rgba(194, 58, 42, 0.14);
  --teal: #3d5c5c;
  --ink: #1c1917;
  --muted: #6b6560;
  --panel: #fffcf7;
  --line: rgba(44, 74, 74, 0.12);
  --soft: #f7f4ed;
  --paper: #faf8f3;
  --shadow: 0 16px 48px rgba(26, 51, 51, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--soft);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.35;
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(44, 74, 74, 0.06), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(194, 58, 42, 0.04), transparent 50%);
}

img {
  display: block;
  max-width: 100%;
}

a {
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-main {
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 3.5rem;
}

.page-main > p:first-of-type {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* ── 辅页 hero ── */
.page-hero,
.compact-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
  padding: 2.5rem 2rem;
  border-radius: 18px;
  background: linear-gradient(135deg, #1a3333 0%, #2c4a4a 55%, #3d5c5c 100%);
  box-shadow: var(--shadow);
  color: #f7f4ed;
}

.page-hero::after,
.compact-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 80% at 85% 20%, rgba(194, 58, 42, 0.1), transparent 60%);
  pointer-events: none;
}

.page-hero > *,
.compact-hero > * {
  position: relative;
  z-index: 1;
}

.eyebrow,
.eyebrow.solo {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(247, 244, 237, 0.12);
  color: #e8e4da;
  font-size: 0.8125rem;
  font-weight: 800;
}

.page-hero h1,
.compact-hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fffcf7;
}

.page-hero p,
.compact-hero p {
  margin: 0;
  max-width: 36rem;
  font-size: 1rem;
  line-height: 1.75;
  color: #d6d3d1;
}

/* ── 区块标题 ── */
.section-block {
  margin-bottom: 2.75rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-head > div {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.section-head h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.section-head a {
  color: var(--accent);
  font-weight: 800;
  font-size: 0.875rem;
}

.section-icon {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 900;
}

/* ── 网格卡片 ── */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.125rem;
}

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 8px 28px rgba(26, 51, 51, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(44, 74, 74, 0.12);
}

.poster-link {
  display: block;
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #e7e5e4;
}

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.movie-card:hover .poster-frame img {
  transform: scale(1.06);
}

.rank-badge {
  position: absolute;
  left: 0.65rem;
  top: 0.65rem;
  z-index: 2;
  min-width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  color: #fff;
  font-weight: 900;
  font-size: 0.875rem;
}

.movie-card-body {
  padding: 0.9rem 1rem 1rem;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.movie-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card h3 a:hover {
  color: var(--vermillion);
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  gap: 0.5rem;
}

.card-actions a {
  display: inline-flex;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  color: #fff;
  font-weight: 800;
  font-size: 0.75rem;
}

.card-actions span {
  color: #a8a29e;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ── 分类磁贴 ── */
.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.category-grid.large {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.yzz-cat-grid.category-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.category-tile,
.overview-card {
  display: block;
  padding: 1.35rem;
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 6px 24px rgba(26, 51, 51, 0.05);
  transition: transform 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.category-tile:hover,
.overview-card:hover {
  transform: translateY(-3px);
  border-color: rgba(44, 74, 74, 0.35);
}

.category-tile strong,
.overview-main strong {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--ink);
}

.category-tile span,
.overview-main span {
  display: block;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.875rem;
}

/* ── 筛选/搜索 ── */
.filter-panel,
.quick-search {
  display: grid;
  gap: 0.75rem;
  padding: 1.1rem;
  margin-bottom: 1.25rem;
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.filter-panel {
  grid-template-columns: 2fr 1fr 1fr 1fr;
}

.quick-search {
  grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
}

.quick-search h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--ink);
}

.quick-search form,
.filter-panel input,
.filter-panel select {
  width: 100%;
}

.quick-search form {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--soft);
}

.quick-search input,
.filter-panel input,
.filter-panel select {
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-weight: 600;
  outline: none;
}

.quick-search input {
  flex: 1;
  border: none;
  background: transparent;
}

.quick-search button,
.filter-panel button {
  padding: 0 1.25rem;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  color: #fff;
  font-weight: 800;
  border: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(44, 74, 74, 0.45);
}

.empty-state {
  padding: 2rem;
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}

.rank-panel {
  padding: 1.5rem;
  border-radius: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0.25rem 0 1.25rem;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.875rem;
}

.breadcrumb a {
  color: var(--accent);
}

.compact-hero .breadcrumb {
  margin-bottom: 1rem;
  color: rgba(247, 244, 237, 0.75);
}

.compact-hero .breadcrumb a {
  color: #e8e4da;
}

/* ── 播放页 ── */
.watch-stage {
  margin-bottom: 2rem;
}

.watch-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}

.watch-player-col {
  min-width: 0;
}

.mirror-player-slot {
  margin: 0 0 1.25rem;
  padding: 0.75rem;
  border-radius: 16px;
  background: #1a3333;
  box-shadow: var(--shadow);
}

.mirror-local-player {
  display: block;
  width: 100%;
  max-height: 70vh;
  border-radius: 10px;
  background: #000;
}

.watch-info {
  padding: 1.25rem;
  border-radius: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.watch-info__kicker {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--muted);
}

.watch-info h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 900;
  color: var(--ink);
  line-height: 1.25;
}

.watch-info__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}

.watch-info__tags span {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
}

.watch-info__desc {
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.85;
  font-size: 0.9375rem;
}

.watch-info__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0;
}

.watch-info__meta div {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.watch-info__meta dt {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 700;
}

.watch-info__meta dd {
  margin: 0;
  font-weight: 900;
  color: var(--ink);
}

.watch-sidebar {
  position: sticky;
  top: 1rem;
  padding: 1rem;
  border-radius: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
}

.watch-sidebar__title {
  margin: 0 0 0.85rem;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--ink);
  padding-left: 0.65rem;
  border-left: 3px solid var(--vermillion);
}

.watch-sidebar__more {
  display: block;
  margin-top: 1rem;
  text-align: center;
}

/* ── mother-cards / wythy-vcard ── */
.mother-cards {
  margin: 0;
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.mother-cards--featured::before,
.mother-cards--latest::before {
  display: none;
}

.mother-cards--featured,
.mother-cards--latest {
  display: grid;
}

.mother-cards--related {
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.mother-cards .movie-card {
  margin: 0;
}

.wythy-vcard {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 6px 22px rgba(26, 51, 51, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  color: inherit;
  text-decoration: none;
}

.wythy-vcard:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 36px rgba(44, 74, 74, 0.14);
}

.wythy-vcard__poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #e7e5e4;
  overflow: hidden;
}

.wythy-vcard__poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.wythy-vcard:hover .wythy-vcard__poster {
  transform: scale(1.05);
}

.wythy-vcard__tag {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 800;
}

.wythy-vcard__score {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(26, 51, 51, 0.72);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 800;
}

.wythy-vcard__body {
  padding: 0.75rem 0.85rem 0.9rem;
  flex: 1;
}

.wythy-vcard__title {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wythy-vcard__meta {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

.wythy-vcard__meta span:not(:last-child)::after {
  content: "·";
  margin-left: 0.35rem;
  opacity: 0.5;
}

/* ── lotus-ink hero 微调 ── */
.yzz-hero--lotus .yzz-hero__dock-icon {
  font-style: normal;
  font-weight: 900;
  font-size: 0.875rem;
  color: var(--accent);
}

.yzz-hero--lotus .yzz-hero__title-accent {
  color: #e8e4da !important;
  -webkit-text-fill-color: #e8e4da !important;
}

/* ── 按钮 ── */
.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  color: #fff;
}

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

@media (max-width: 1100px) {
  .movie-grid,
  .mother-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .category-grid,
  .yzz-cat-grid.category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .watch-layout {
    grid-template-columns: 1fr;
  }

  .watch-sidebar {
    position: static;
  }

  .mother-cards--related {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .page-main {
    padding: 1rem 0.85rem 2.5rem;
  }

  .movie-grid,
  .mother-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-grid,
  .category-grid.large,
  .yzz-cat-grid.category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-panel {
    grid-template-columns: 1fr 1fr;
  }

  .quick-search {
    grid-template-columns: 1fr;
  }

  .rank-list {
    grid-template-columns: 1fr;
  }

  .mother-cards--related {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .movie-grid,
  .mother-cards,
  .mother-cards--related {
    grid-template-columns: 1fr;
  }

  .category-grid,
  .yzz-cat-grid.category-grid {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .compact-hero {
    padding: 1.75rem 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .movie-card:hover,
  .wythy-vcard:hover {
    transform: none;
  }
}
