:root {
  --bg: #fff7ed;
  --panel: #ffffff;
  --ink: #1e293b;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.24);
  --amber: #d97706;
  --amber-dark: #92400e;
  --rose: #9f1239;
  --slate: #0f172a;
  --emerald: #059669;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(120, 53, 15, 0.94);
  color: #ffffff;
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
}

.site-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.site-logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #78350f;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55), 0 12px 24px rgba(0,0,0,0.16);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-weight: 700;
}

.site-nav a,
.mobile-nav a {
  opacity: 0.92;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.site-nav a:hover,
.mobile-nav a:hover {
  color: #fde68a;
  opacity: 1;
}

.mobile-toggle {
  display: none;
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  font-size: 22px;
}

.mobile-nav {
  display: none;
  padding: 0 20px 18px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  font-weight: 700;
}

.hero {
  position: relative;
  height: 620px;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 20% 20%, rgba(251, 191, 36, 0.3), transparent 35%), linear-gradient(135deg, #78350f 0%, #b45309 45%, #7f1d1d 100%);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease, transform 0.7s ease;
  transform: scale(1.03);
  background-image: linear-gradient(90deg, rgba(15,23,42,0.88), rgba(120,53,15,0.72), rgba(15,23,42,0.34)), var(--hero-image);
  background-size: cover;
  background-position: center;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 18% 22%, rgba(251,191,36,0.24), transparent 22%), radial-gradient(circle at 75% 55%, rgba(255,255,255,0.12), transparent 28%);
}

.hero-content {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  padding: 0 20px;
}

.hero-content > * {
  max-width: 760px;
}

.hero-kicker,
.detail-kicker,
.section-heading span,
.sub-hero span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #fde68a;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1.03;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

.hero p {
  margin: 0 0 24px;
  color: #fffbeb;
  font-size: clamp(18px, 2.2vw, 26px);
  line-height: 1.7;
}

.hero-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.hero-tags span,
.detail-tags span {
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.22);
  color: #fff7ed;
  font-size: 14px;
  font-weight: 700;
}

.hero-actions,
.detail-actions,
.center-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #78350f;
  background: #ffffff;
  box-shadow: 0 18px 35px rgba(0,0,0,0.22);
}

.ghost-button {
  color: #ffffff;
  background: rgba(120, 53, 15, 0.58);
  border: 1px solid rgba(255,255,255,0.4);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 22px 44px rgba(0,0,0,0.25);
}

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

.hero-dots button {
  width: 13px;
  height: 13px;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  cursor: pointer;
}

.hero-dots button.is-active {
  width: 34px;
  border-radius: 999px;
  background: #ffffff;
}

.page-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 72px 20px;
}

.soft-section,
.rank-section {
  max-width: none;
  padding-left: max(20px, calc((100vw - 1180px) / 2 + 20px));
  padding-right: max(20px, calc((100vw - 1180px) / 2 + 20px));
  background: linear-gradient(110deg, rgba(241,245,249,0.92), rgba(255,251,235,0.94));
}

.section-heading {
  margin-bottom: 30px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

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

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

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

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

.movie-card {
  border-radius: 18px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow);
}

.movie-card-link {
  display: block;
  height: 100%;
}

.movie-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #fef3c7, #7f1d1d);
}

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

.movie-card:hover .movie-poster img,
.category-overview-card:hover img {
  transform: scale(1.07);
}

.movie-poster-meta {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.movie-poster-meta span,
.rank-badge,
.mini-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(146, 64, 14, 0.9);
  font-size: 13px;
  font-weight: 800;
  padding: 6px 10px;
  backdrop-filter: blur(8px);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 42px;
  height: 42px;
  padding: 0;
  font-size: 18px;
  background: linear-gradient(135deg, #e11d48, #f59e0b);
}

.movie-card-body {
  padding: 18px;
}

.movie-card-body h2 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.35;
  color: var(--ink);
}

.movie-genre,
.movie-line {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.movie-genre {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--amber-dark);
}

.movie-line {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 15px;
}

.search-panel {
  display: flex;
  gap: 12px;
  margin: 0 0 30px;
}

.search-panel input {
  flex: 1;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 18px;
  font-size: 16px;
  outline: none;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.search-panel input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16);
}

.search-panel button,
.back-top {
  border: 0;
  border-radius: 14px;
  padding: 0 18px;
  color: #ffffff;
  background: #92400e;
  font-weight: 800;
  cursor: pointer;
}

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

.category-tile,
.category-overview-card a {
  display: block;
  border-radius: 18px;
  padding: 22px;
  min-height: 160px;
  background: linear-gradient(135deg, #ffffff, #fff7ed);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-overview-card a:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-tile span,
.category-overview-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--amber-dark);
  font-size: 22px;
  font-weight: 900;
}

.category-tile p,
.category-overview-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.category-overview-card a {
  padding: 0;
  overflow: hidden;
}

.category-overview-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.category-overview-card div {
  padding: 20px;
}

.category-overview-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.wide-card {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wide-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.wide-card img {
  width: 130px;
  height: 178px;
  object-fit: cover;
  border-radius: 14px;
}

.wide-card h2 {
  margin: 10px 0 8px;
  font-size: 22px;
}

.wide-card p,
.wide-card span:not(.mini-rank) {
  margin: 0 0 8px;
  color: var(--muted);
  line-height: 1.7;
}

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

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

.center-actions {
  justify-content: center;
  margin-top: 32px;
}

.sub-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #78350f, #b45309 48%, #7f1d1d);
}

.sub-hero {
  padding: 92px 20px;
  text-align: center;
}

.sub-hero div {
  max-width: 860px;
  margin: 0 auto;
}

.sub-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.1;
  font-weight: 900;
}

.sub-hero p {
  margin: 0;
  color: #fffbeb;
  font-size: 19px;
  line-height: 1.8;
}

.detail-hero {
  min-height: 560px;
}

.detail-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(15,23,42,0.93), rgba(120,53,15,0.75), rgba(15,23,42,0.38)), var(--detail-bg);
  background-size: cover;
  background-position: center;
  filter: saturate(1.04);
}

.detail-wrap {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 20px 68px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
  color: #fde68a;
  font-weight: 700;
}

.detail-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 38px;
  align-items: center;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
}

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 5.7vw, 72px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.detail-line {
  max-width: 820px;
  margin: 0 0 24px;
  color: #fffbeb;
  font-size: 21px;
  line-height: 1.8;
}

.detail-main {
  max-width: 980px;
}

.player-panel {
  margin-bottom: 28px;
  border-radius: 24px;
  overflow: hidden;
  background: #020617;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2,6,23,0.2), rgba(2,6,23,0.7));
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
}

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

.play-icon {
  width: 82px;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #78350f;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.content-card {
  margin-bottom: 24px;
  padding: 28px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.content-card p {
  margin: 0;
  color: #475569;
  font-size: 17px;
  line-height: 1.9;
}

.related-section {
  margin-top: 42px;
}

.large-text p + p {
  margin-top: 16px;
}

.narrow-section {
  max-width: 900px;
}

.hidden-by-filter {
  display: none !important;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
  padding: 54px 20px 34px;
}

.footer-logo {
  color: #ffffff;
  margin-bottom: 14px;
}

.site-footer p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a:hover {
  color: #fbbf24;
}

.footer-bottom {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-top: 1px solid rgba(148,163,184,0.18);
}

@media (max-width: 1100px) {
  .movie-grid,
  .category-movie-grid,
  .latest-grid,
  .category-grid,
  .category-overview-grid,
  .big-rank-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .site-nav {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .mobile-nav.is-open {
    display: block;
  }

  .hero {
    height: 640px;
  }

  .hero-content {
    padding-top: 40px;
  }

  .hero-actions,
  .detail-actions,
  .search-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-button,
  .ghost-button,
  .search-panel button {
    width: 100%;
  }

  .movie-grid,
  .featured-grid,
  .latest-grid,
  .category-movie-grid,
  .category-grid,
  .category-overview-grid,
  .rank-list,
  .big-rank-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .page-section,
  .soft-section,
  .rank-section {
    padding-top: 50px;
    padding-bottom: 50px;
  }

  .movie-card-body {
    padding: 14px;
  }

  .movie-card-body h2 {
    font-size: 16px;
  }

  .movie-line {
    font-size: 14px;
  }

  .wide-card {
    grid-template-columns: 98px 1fr;
    gap: 12px;
  }

  .wide-card img {
    width: 98px;
    height: 136px;
  }

  .wide-card h2 {
    font-size: 18px;
  }

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

  .detail-poster {
    max-width: 260px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 14px;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .featured-grid,
  .latest-grid,
  .category-movie-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    height: 680px;
  }
}
