:root {
  --bg: #fffaf0;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #fed7aa;
  --amber: #f59e0b;
  --orange: #f97316;
  --dark: #111827;
  --soft: rgba(255, 247, 237, 0.88);
  --shadow: 0 24px 70px rgba(124, 45, 18, 0.14);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 42%, #fffaf0 100%);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(
    90deg,
    rgba(255, 251, 235, 0.96),
    rgba(255, 237, 213, 0.96)
  );
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 34px rgba(124, 45, 18, 0.08);
}

.nav-wrap {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #78350f;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 16px 30px rgba(249, 115, 22, 0.26);
}

.brand-text {
  font-size: 20px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.main-nav a {
  padding: 9px 13px;
  border-radius: 999px;
  color: #7c2d12;
  font-weight: 700;
  transition: 0.2s ease;
}

.main-nav a:hover {
  background: #ffedd5;
  color: #ea580c;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(340px, 30vw);
}

.header-search input,
.quick-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid #fdba74;
  border-radius: 999px;
  outline: none;
  background: #ffffff;
  color: var(--text);
  padding: 10px 15px;
  transition: 0.2s ease;
}

.header-search input:focus,
.quick-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.16);
}

.header-search button,
.btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.header-search button,
.btn.primary {
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(249, 115, 22, 0.28);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.btn.ghost.dark {
  color: #7c2d12;
  border-color: #fdba74;
  background: #fff7ed;
}

.btn.wide {
  width: 100%;
  display: inline-flex;
  justify-content: center;
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

.header-search button:hover,
.btn:hover {
  transform: translateY(-2px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #ffedd5;
  padding: 10px;
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #9a3412;
  border-radius: 999px;
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 430px);
  align-items: center;
  gap: 44px;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 92px 24px 112px;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 760px;
  opacity: 0.34;
  filter: blur(5px) saturate(1.08);
  transform: scale(1.04);
}

.hero-shade {
  position: fixed;
  inset: 0;
  height: 760px;
  background:
    radial-gradient(
      circle at 18% 20%,
      rgba(245, 158, 11, 0.38),
      transparent 36%
    ),
    linear-gradient(
      120deg,
      rgba(15, 23, 42, 0.94),
      rgba(124, 45, 18, 0.7) 54%,
      rgba(249, 115, 22, 0.18)
    );
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 760px;
  color: #ffffff;
}

.hero-kicker,
.kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(245, 158, 11, 0.14);
  color: #d97706;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-kicker {
  background: rgba(255, 255, 255, 0.14);
  color: #fed7aa;
}

.hero h1,
.hero h2 {
  margin: 18px 0 0;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-title {
  color: #fed7aa;
  font-size: clamp(26px, 4vw, 44px) !important;
  letter-spacing: -0.03em !important;
}

.hero p {
  max-width: 680px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.hero-poster {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 32px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.46);
  transform: rotate(2deg);
}

.hero-poster img {
  transition: transform 0.4s ease;
}

.hero-poster:hover img {
  transform: scale(1.05);
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 44px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dots button {
  width: 42px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: #f59e0b;
}

.panel,
.content-section,
.page-main,
.footer-grid,
.site-footer > .copyright {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
}

.quick-search {
  margin-top: -44px;
  position: relative;
  z-index: 4;
  padding: 0 24px;
}

.quick-search form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: end;
  padding: 24px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search label,
.filter-panel label {
  display: grid;
  gap: 8px;
  color: #9a3412;
  font-weight: 800;
}

.content-section {
  padding: 58px 24px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: end;
  margin-bottom: 24px;
}

.section-head h2,
.page-hero h1,
.rank-panel h2,
.story-panel h2,
.detail-tags h2,
.watch-section h2 {
  margin: 10px 0 0;
  color: var(--text);
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-head p,
.page-hero p,
.story-panel p,
.detail-info p,
.site-footer p,
.overview-card p,
.ranking-info p,
.movie-card p {
  color: var(--muted);
}

.section-more {
  color: #ea580c;
  font-weight: 800;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.category-tile {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 24px;
  padding: 20px;
  background:
    radial-gradient(
      circle at top right,
      rgba(249, 115, 22, 0.22),
      transparent 36%
    ),
    linear-gradient(135deg, #fff7ed, #ffffff);
  border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(124, 45, 18, 0.08);
  transition: 0.2s ease;
}

.category-tile:hover,
.movie-card:hover,
.overview-card:hover,
.ranking-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 26px 60px rgba(124, 45, 18, 0.16);
}

.category-tile span {
  color: #ea580c;
  font-weight: 900;
}

.category-tile strong {
  font-size: 20px;
  color: #111827;
}

.category-tile em {
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: 28px;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid #ffedd5;
  box-shadow: 0 14px 34px rgba(124, 45, 18, 0.08);
  transition: 0.2s ease;
}

.movie-card[hidden] {
  display: none;
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #fef3c7, #fed7aa);
}

.poster img {
  transition: transform 0.3s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.card-body {
  padding: 16px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #f97316;
  font-size: 12px;
  font-weight: 800;
}

.movie-card h3 {
  min-height: 3em;
  margin: 8px 0;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.ranking-info h2 a:hover,
.overview-card h2 a:hover,
.sitemap-group a:hover {
  color: #ea580c;
}

.movie-card p {
  min-height: 4.8em;
  margin: 0 0 12px;
  font-size: 14px;
}

.tag-row,
.meta-pills,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span,
.meta-pills span,
.tag-cloud a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.card-category {
  display: inline-flex;
  margin-top: 12px;
  color: #ea580c;
  font-weight: 800;
  font-size: 14px;
}

.rank-panel {
  position: sticky;
  top: 92px;
  border-radius: 28px;
  padding: 22px;
  background: linear-gradient(180deg, #111827, #431407);
  box-shadow: var(--shadow);
  color: #ffffff;
}

.rank-panel h2,
.rank-panel .kicker {
  color: #fed7aa;
}

.rank-list {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}

.rank-row {
  display: grid;
  grid-template-columns: 38px 54px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  transition: 0.2s ease;
}

.rank-row:hover {
  background: rgba(255, 255, 255, 0.14);
}

.rank-row img {
  width: 54px;
  height: 72px;
  border-radius: 12px;
}

.rank-no {
  color: #fbbf24;
  font-weight: 900;
}

.rank-title {
  font-weight: 800;
}

.rank-meta {
  color: rgba(255, 255, 255, 0.64);
  font-size: 13px;
}

.page-main {
  padding: 28px 24px 80px;
}

.page-hero {
  padding: 58px;
  border-radius: 34px;
  background:
    radial-gradient(
      circle at 15% 20%,
      rgba(245, 158, 11, 0.26),
      transparent 34%
    ),
    linear-gradient(135deg, #fff7ed, #ffffff);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.compact-hero {
  margin-top: 24px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #9a3412;
  font-weight: 800;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #ea580c;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(150px, 210px));
  gap: 14px;
  padding: 18px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 40px rgba(124, 45, 18, 0.08);
}

.empty-state {
  padding: 24px;
  color: var(--muted);
  border-radius: 18px;
  background: #fff7ed;
  border: 1px solid var(--line);
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 28px;
}

.overview-card {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 20px;
  padding: 18px;
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid #ffedd5;
  box-shadow: 0 14px 36px rgba(124, 45, 18, 0.08);
  transition: 0.2s ease;
}

.overview-cover {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 22px;
}

.overview-card h2 {
  margin: 8px 0;
}

.overview-card ul {
  margin: 14px 0 0;
  padding-left: 18px;
  color: #7c2d12;
}

.ranking-list-page {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.ranking-card {
  position: relative;
  display: grid;
  grid-template-columns: 110px 70px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 16px;
  border-radius: 26px;
  background: #ffffff;
  border: 1px solid #ffedd5;
  box-shadow: 0 14px 36px rgba(124, 45, 18, 0.08);
  transition: 0.2s ease;
}

.ranking-cover {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 18px;
}

.ranking-index {
  color: #f97316;
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.ranking-info h2 {
  margin: 8px 0;
  font-size: 24px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  margin-top: 24px;
  padding: 36px;
  border-radius: 34px;
  background:
    radial-gradient(
      circle at 20% 12%,
      rgba(245, 158, 11, 0.28),
      transparent 36%
    ),
    linear-gradient(135deg, #111827, #431407 58%, #7c2d12);
  color: #ffffff;
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

.detail-info h1 {
  margin: 16px 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-info .lead-text {
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

.watch-section,
.story-panel,
.detail-tags {
  margin-top: 28px;
  padding: 26px;
  border-radius: 28px;
  background: #ffffff;
  border: 1px solid #ffedd5;
  box-shadow: 0 16px 40px rgba(124, 45, 18, 0.08);
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  background: #0f172a;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    0 26px 66px rgba(15, 23, 42, 0.24);
}

.movie-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #0f172a;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 12px;
  align-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.22),
    rgba(15, 23, 42, 0.72)
  );
  cursor: pointer;
}

.play-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 18px 42px rgba(249, 115, 22, 0.36);
  font-size: 32px;
  padding-left: 4px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 22px;
}

.story-panel p {
  margin-bottom: 0;
}

.side-panel {
  background: linear-gradient(180deg, #fff7ed, #ffffff);
}

.tag-cloud a:hover {
  background: #fed7aa;
}

.movie-card.compact .card-body p {
  min-height: 0;
}

.site-footer {
  margin-top: 40px;
  background: #111827;
  color: rgba(255, 255, 255, 0.76);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 38px 24px 26px;
}

.footer-brand {
  color: #fed7aa;
  font-size: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-content: flex-start;
}

.footer-links a {
  color: #fed7aa;
  font-weight: 800;
}

.copyright {
  margin: 0;
  padding: 0 24px 32px;
  color: rgba(255, 255, 255, 0.54);
  font-size: 14px;
}

.sitemap-wrap {
  display: grid;
  gap: 22px;
  margin-top: 28px;
}

.sitemap-group {
  padding: 24px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid #ffedd5;
}

.sitemap-group h2 {
  margin: 0 0 16px;
}

.sitemap-group ul {
  columns: 4 220px;
  margin: 0;
  padding-left: 18px;
}

.sitemap-group li {
  break-inside: avoid;
  margin: 0 0 8px;
}

@media (max-width: 1080px) {
  .header-search {
    display: none;
  }

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

  .split-layout,
  .two-column,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .nav-wrap {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 18px;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    order: 5;
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    background: #fff7ed;
  }

  .hero {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    padding-top: 72px;
    gap: 24px;
  }

  .hero-poster {
    max-width: 260px;
    justify-self: center;
  }

  .quick-search form,
  .filter-panel,
  .overview-card,
  .ranking-card {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .home-grid,
  .library-grid,
  .related-grid,
  .category-grid,
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-hero,
  .detail-hero {
    padding: 28px;
  }

  .section-head {
    display: block;
  }
}

@media (max-width: 560px) {
  .movie-grid,
  .home-grid,
  .library-grid,
  .related-grid,
  .category-grid,
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .hero h1,
  .hero h2,
  .detail-info h1 {
    font-size: 34px;
  }

  .rank-row {
    grid-template-columns: 32px 50px 1fr;
  }

  .rank-meta {
    display: none;
  }

  .content-section,
  .page-main {
    padding-left: 16px;
    padding-right: 16px;
  }
}
