:root {
  --bg: #fffaf0;
  --surface: #ffffff;
  --surface-soft: #fff7ed;
  --text: #111827;
  --muted: #6b7280;
  --line: rgba(146, 64, 14, 0.16);
  --brand: #d97706;
  --brand-dark: #b45309;
  --brand-soft: #fef3c7;
  --shadow: 0 22px 60px rgba(120, 53, 15, 0.15);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 251, 235, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(146, 64, 14, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: #78350f;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(217, 119, 6, 0.28);
}

.brand-text {
  font-size: 22px;
  letter-spacing: -0.03em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link,
.mobile-link {
  color: #4b5563;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 9px 14px;
  border-radius: 999px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #92400e;
  background: rgba(251, 191, 36, 0.18);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #fff7ed;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #78350f;
  border-radius: 3px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

.mobile-nav.is-open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  padding: 12px 14px;
  border-radius: 16px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.85s ease, visibility 0.85s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-bg,
.detail-backdrop img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 78% 30%, rgba(251, 191, 36, 0.28), transparent 34%), linear-gradient(90deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.74) 48%, rgba(17, 24, 39, 0.22));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 360px;
  gap: 54px;
  align-items: center;
  min-height: 620px;
  color: #ffffff;
}

.hero-copy h1 {
  max-width: 780px;
  margin: 8px 0 16px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero-copy h2 {
  margin: 0 0 14px;
  color: #fde68a;
  font-size: clamp(26px, 4vw, 48px);
  line-height: 1.1;
}

.hero-text {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero .eyebrow,
.hero-copy .eyebrow,
.dark-page-hero .eyebrow,
.light-heading .eyebrow {
  color: #fbbf24;
}

.hero-actions,
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 900;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 16px 32px rgba(239, 68, 68, 0.26);
}

.primary-button:hover {
  transform: translateY(-2px);
}

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.12);
}

.text-link {
  color: var(--brand-dark);
  background: #fff7ed;
}

.text-link.light {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 32px;
  box-shadow: 0 38px 90px rgba(0, 0, 0, 0.45);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  height: 520px;
  object-fit: cover;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.46);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 34px;
  background: #fbbf24;
}

.section-section {
  padding: 72px 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1,
.content-card h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.section-heading p:last-child {
  max-width: 760px;
  margin: 10px auto 0;
  color: var(--muted);
}

.section-heading.centered {
  text-align: center;
}

.section-heading.split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.light-heading {
  color: #ffffff;
}

.warm-band {
  background: linear-gradient(180deg, #fffbeb, #fff7ed);
}

.ranking-band {
  background: linear-gradient(135deg, #111827, #451a03 55%, #78350f);
}

.filter-panel {
  display: flex;
  gap: 12px;
  align-items: stretch;
  max-width: 860px;
  margin: 24px auto 0;
}

.search-box {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(146, 64, 14, 0.1);
}

.search-box span {
  color: var(--brand-dark);
  font-weight: 900;
}

.search-box input,
.filter-panel select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.filter-panel select {
  width: 180px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  font-weight: 800;
}

.quick-links {
  justify-content: center;
}

.quick-links a {
  padding: 10px 16px;
  border-radius: 999px;
  color: #92400e;
  background: #fef3c7;
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 34px rgba(146, 64, 14, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.card-cover {
  position: relative;
  display: block;
  overflow: hidden;
  height: 300px;
  background: #111827;
}

.movie-card.is-compact .card-cover {
  height: 245px;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .card-cover img {
  transform: scale(1.08);
}

.card-cover::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, 0.72));
  opacity: 0.7;
}

.card-play {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.9);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
  position: absolute;
  z-index: 3;
  top: 12px;
  left: 12px;
  display: grid;
  min-width: 36px;
  height: 36px;
  place-items: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.24);
}

.card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #92400e;
  font-size: 13px;
  font-weight: 800;
}

.card-body h2 {
  margin: 8px 0 8px;
  font-size: 20px;
  line-height: 1.3;
}

.card-body h2 a:hover {
  color: var(--brand-dark);
}

.card-body p {
  display: -webkit-box;
  min-height: 52px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span {
  padding: 5px 10px;
  color: #92400e;
  border-radius: 999px;
  background: #fef3c7;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  color: #fff7ed;
  background: rgba(251, 191, 36, 0.26);
}

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

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

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  padding: 24px;
  border-radius: 26px;
  background: #111827;
  box-shadow: 0 18px 50px rgba(146, 64, 14, 0.12);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.16), rgba(17, 24, 39, 0.86));
}

.category-tile strong,
.category-tile small {
  position: relative;
  z-index: 2;
  display: block;
  color: #ffffff;
}

.category-tile strong {
  margin-top: 92px;
  font-size: 24px;
  line-height: 1.15;
}

.category-tile small {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.76);
}

.page-hero {
  padding: 110px 0 78px;
  background: radial-gradient(circle at 70% 20%, rgba(251, 191, 36, 0.4), transparent 32%), linear-gradient(135deg, #fff7ed, #ffffff);
}

.dark-page-hero {
  color: #ffffff;
  background: radial-gradient(circle at 72% 22%, rgba(251, 191, 36, 0.3), transparent 34%), linear-gradient(135deg, #111827, #78350f);
}

.page-hero h1 {
  font-size: clamp(38px, 6vw, 70px);
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

.dark-page-hero p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.76);
}

.detail-layout {
  background: linear-gradient(180deg, #111827 0, #111827 520px, #fffaf0 520px);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 600px;
  color: #ffffff;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
}

.detail-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.76) 52%, rgba(17, 24, 39, 0.38)), linear-gradient(180deg, rgba(17, 24, 39, 0.18), #111827);
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding-top: 46px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 800;
}

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

.detail-main {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 46px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 36px 82px rgba(0, 0, 0, 0.46);
}

.detail-poster img {
  width: 100%;
  height: 470px;
  object-fit: cover;
}

.detail-info h1 {
  max-width: 820px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
}

.detail-one-line {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.watch-panel {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  background: #000000;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.28);
}

.movie-player {
  position: relative;
  background: #000000;
}

.player-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  cursor: pointer;
}

.player-play {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 18px 42px rgba(239, 68, 68, 0.34);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.player-play span {
  margin-left: 6px;
  font-size: 34px;
}

.movie-player.is-playing .player-play {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.86);
}

.player-message {
  position: absolute;
  left: 20px;
  bottom: 20px;
  z-index: 5;
  color: #ffffff;
  font-weight: 800;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 26px;
  padding: 0 0 26px;
}

.content-card {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(146, 64, 14, 0.08);
}

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

.content-card p {
  color: #374151;
  font-size: 17px;
}

.meta-card dl {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 11px 16px;
  margin: 0;
}

.meta-card dt {
  color: var(--muted);
  font-weight: 800;
}

.meta-card dd {
  margin: 0;
  font-weight: 800;
}

.meta-card a {
  color: var(--brand-dark);
}

.empty-state {
  display: none;
  margin-top: 28px;
  padding: 38px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 24px;
  background: #ffffff;
}

.empty-state.is-visible {
  display: block;
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(180deg, #111827, #030712);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 30px;
  padding: 48px 0;
}

.footer-logo {
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 26px;
  font-weight: 900;
}

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

.site-footer p {
  margin: 0;
  color: #9ca3af;
}

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

.footer-bottom {
  padding: 18px;
  text-align: center;
  color: #9ca3af;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 1040px) {
  .movie-grid,
  .category-grid,
  .category-grid.large,
  .category-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .hero-poster img {
    height: 420px;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero-carousel,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 26px;
    padding: 64px 0 90px;
  }

  .hero-poster {
    display: none;
  }

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

  .section-heading.split,
  .filter-panel,
  .footer-grid,
  .detail-main,
  .detail-content {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .filter-panel select {
    width: 100%;
    min-height: 52px;
  }

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

  .detail-poster img {
    height: 360px;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

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

  .movie-grid,
  .category-grid,
  .category-grid.large,
  .category-grid.compact {
    grid-template-columns: 1fr;
  }

  .section-section {
    padding: 48px 0;
  }

  .hero-copy h1 {
    font-size: 36px;
  }

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

  .card-cover,
  .movie-card.is-compact .card-cover {
    height: 330px;
  }

  .page-hero {
    padding: 74px 0 52px;
  }

  .player-play {
    width: 66px;
    height: 66px;
  }
}
