:root {
  --bg: #fff8ed;
  --paper: #ffffff;
  --ink: #19130d;
  --muted: #6b6258;
  --line: rgba(127, 29, 29, 0.14);
  --red: #991b1b;
  --red-dark: #6f1010;
  --amber: #b45309;
  --gold: #f59e0b;
  --shadow: 0 18px 50px rgba(92, 24, 12, 0.14);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background:
    radial-gradient(circle at 12% 0%, rgba(245, 158, 11, 0.18), transparent 28rem),
    linear-gradient(180deg, #fff1d6 0%, #fffaf2 34%, #ffffff 100%);
}

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(254, 242, 242, 0.96), rgba(255, 251, 235, 0.96));
  border-bottom: 4px solid var(--red-dark);
  box-shadow: 0 14px 32px rgba(127, 29, 29, 0.13);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 900;
  font-size: 24px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--red), var(--amber));
  box-shadow: 0 12px 28px rgba(153, 27, 27, 0.26);
}

.brand-text {
  display: grid;
  line-height: 1.1;
}

.brand-text strong,
.footer-brand strong {
  font-size: 24px;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--red-dark), var(--amber));
  -webkit-background-clip: text;
  color: transparent;
}

.brand-text small {
  color: var(--muted);
  margin-top: 4px;
}

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

.nav-link,
.mobile-nav-link {
  color: #574a3e;
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover {
  color: var(--red-dark);
  background: rgba(254, 226, 226, 0.85);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 14px;
  background: rgba(254, 226, 226, 0.78);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: var(--red-dark);
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 14px;
  border-top: 1px solid var(--line);
}

.mobile-nav.open {
  display: grid;
}

.hero-carousel {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(125deg, #4a0606 0%, #7f1d1d 52%, #92400e 100%);
}

.hero-bg-glow {
  position: absolute;
  inset: -20% -15%;
  background:
    radial-gradient(circle at 15% 15%, rgba(251, 191, 36, 0.26), transparent 28rem),
    radial-gradient(circle at 82% 70%, rgba(239, 68, 68, 0.23), transparent 32rem);
  pointer-events: none;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.02);
}

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

.hero-visual {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(16, 8, 7, 0.94) 0%, rgba(64, 10, 10, 0.76) 42%, rgba(64, 10, 10, 0.22) 100%),
    var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: saturate(1.08);
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.74)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 120px);
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  min-height: 650px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1280px;
  padding: 92px 0 120px;
}

.eyebrow {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 8px;
  color: #fed7aa;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 900;
  font-size: 13px;
}

.hero-copy h1 {
  max-width: 820px;
  margin: 22px 0 12px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(28px, 4vw, 48px);
  color: #fef3c7;
}

.hero-copy p {
  max-width: 700px;
  color: #fee2e2;
  font-size: 19px;
  line-height: 1.8;
}

.hero-tags,
.tag-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 247, 237, 0.14);
  color: #ffedd5;
  border: 1px solid rgba(254, 215, 170, 0.24);
  font-size: 13px;
  font-weight: 700;
}

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

.primary-button,
.ghost-button,
.section-action,
.global-search-form button,
.filter-panel button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.global-search-form button {
  color: #ffffff;
  padding: 0 24px;
  background: linear-gradient(135deg, #dc2626, #d97706);
  box-shadow: 0 16px 34px rgba(153, 27, 27, 0.32);
}

.ghost-button {
  color: #fff7ed;
  padding: 0 22px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(16px);
}

.primary-button:hover,
.ghost-button:hover,
.section-action:hover,
.global-search-form button:hover,
.filter-panel button:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.18);
}

.hero-arrow {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  padding: 0;
  opacity: 0.62;
}

.hero-dot.active {
  width: 30px;
  opacity: 1;
  background: #fbbf24;
}

.search-panel,
.content-section,
.filter-panel,
.page-hero,
.detail-hero,
.player-section {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 24px;
  align-items: center;
  margin-top: -58px;
  position: relative;
  z-index: 8;
  padding: 28px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  backdrop-filter: blur(20px);
}

.search-panel h2,
.search-panel p {
  margin: 0;
}

.search-panel h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.search-panel p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.7;
}

.global-search-form,
.filter-panel {
  display: flex;
  gap: 12px;
}

.global-search-form input,
.filter-panel input {
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(153, 27, 27, 0.18);
  border-radius: 999px;
  padding: 0 18px;
  outline: 0;
  background: #fffaf0;
}

.global-search-form input:focus,
.filter-panel input:focus {
  border-color: rgba(153, 27, 27, 0.48);
  box-shadow: 0 0 0 4px rgba(153, 27, 27, 0.08);
}

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

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

.section-heading p {
  margin: 0 0 7px;
  color: var(--amber);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}

.section-action {
  padding: 0 18px;
  color: var(--red-dark);
  background: #fff3d6;
  border: 1px solid rgba(180, 83, 9, 0.18);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--paper);
  border: 1px solid rgba(153, 27, 27, 0.1);
  box-shadow: 0 14px 38px rgba(92, 24, 12, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 24px 56px rgba(92, 24, 12, 0.18);
  border-color: rgba(153, 27, 27, 0.26);
}

.movie-poster,
.detail-cover {
  position: relative;
  display: block;
  background-image:
    linear-gradient(180deg, rgba(127, 29, 29, 0.04), rgba(0, 0, 0, 0.48)),
    var(--poster-image),
    linear-gradient(135deg, #7f1d1d, #f59e0b);
  background-size: cover;
  background-position: center;
}

.movie-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.poster-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.35) 44%, transparent 58%);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
}

.movie-card:hover .poster-shine {
  transform: translateX(120%);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 7px 10px;
  color: #fff7ed;
  border-radius: 999px;
  background: linear-gradient(135deg, #dc2626, #f59e0b);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
  font-size: 12px;
}

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

.movie-meta {
  color: var(--amber);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.5;
}

.movie-card h2 {
  margin: 8px 0 10px;
  font-size: 19px;
  line-height: 1.25;
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.tag-row {
  margin-top: 14px;
}

.tag-row span {
  color: var(--red-dark);
  background: #fff1d6;
  border-color: rgba(180, 83, 9, 0.14);
}

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

.ranking-list a {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(153, 27, 27, 0.11);
  box-shadow: 0 10px 28px rgba(92, 24, 12, 0.08);
}

.ranking-list b {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red), var(--amber));
}

.ranking-list span {
  font-weight: 900;
}

.ranking-list em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

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

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

.category-card {
  border-radius: 24px;
  padding: 22px;
  min-height: 180px;
  background:
    radial-gradient(circle at 88% 12%, rgba(251, 191, 36, 0.25), transparent 9rem),
    linear-gradient(135deg, #ffffff, #fff7ed);
  border: 1px solid rgba(153, 27, 27, 0.12);
  box-shadow: 0 14px 38px rgba(92, 24, 12, 0.1);
}

.category-card a:first-child {
  display: grid;
  gap: 12px;
}

.category-card span {
  color: var(--red-dark);
  font-size: 24px;
  font-weight: 900;
}

.category-card strong {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.category-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.category-card div a {
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--red-dark);
  background: #fff0d2;
  font-size: 13px;
  font-weight: 800;
}

.page-hero,
.detail-hero {
  margin-top: 34px;
  border-radius: 30px;
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 20%, rgba(251, 191, 36, 0.26), transparent 18rem),
    linear-gradient(135deg, #5b0d0d, #991b1b 54%, #92400e);
  box-shadow: var(--shadow);
}

.small-hero {
  padding: 62px;
}

.small-hero h1 {
  margin: 14px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.05em;
}

.small-hero p {
  max-width: 820px;
  color: #fee2e2;
  font-size: 18px;
  line-height: 1.8;
}

.filter-panel {
  flex-direction: column;
  margin-top: 24px;
  padding: 20px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 34px rgba(92, 24, 12, 0.08);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-panel button {
  min-height: 38px;
  padding: 0 14px;
  color: var(--red-dark);
  background: #fff3d6;
  border: 1px solid rgba(180, 83, 9, 0.14);
}

.filter-panel button.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--amber));
}

.detail-hero {
  padding: 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: #fed7aa;
  margin-bottom: 22px;
  font-weight: 800;
}

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

.detail-cover {
  min-height: 430px;
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.detail-info h1 {
  margin: 14px 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-line {
  max-width: 860px;
  color: #fee2e2;
  font-size: 19px;
  line-height: 1.8;
}

.detail-meta {
  margin: 18px 0;
}

.large-tags {
  margin-bottom: 24px;
}

.player-section {
  padding-top: 34px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #050505;
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  color: #ffffff;
  background:
    radial-gradient(circle at center, rgba(220, 38, 38, 0.28), rgba(0, 0, 0, 0.56)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.68));
  border: 0;
  cursor: pointer;
  z-index: 5;
}

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

.play-icon {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #dc2626, #f59e0b);
  box-shadow: 0 18px 44px rgba(220, 38, 38, 0.36);
  font-size: 30px;
  padding-left: 5px;
}

.play-layer strong {
  font-size: clamp(22px, 4vw, 36px);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.text-panel {
  padding: 34px;
  border-radius: 26px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 38px rgba(92, 24, 12, 0.1);
}

.text-panel h2 {
  margin: 0 0 16px;
  font-size: 28px;
}

.text-panel p {
  color: #423a32;
  font-size: 18px;
  line-height: 2;
}

.site-footer {
  margin-top: 76px;
  color: #d1d5db;
  background: linear-gradient(180deg, #151515, #080808);
  border-top: 4px solid var(--red-dark);
}

.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 34px;
}

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

.footer-grid p {
  color: #9ca3af;
  line-height: 1.8;
}

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

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

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #6b7280;
}

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

  .menu-toggle {
    display: block;
  }

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

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

@media (max-width: 820px) {
  .hero-carousel,
  .hero-copy {
    min-height: 720px;
  }

  .hero-visual {
    background-image:
      linear-gradient(180deg, rgba(16, 8, 7, 0.9) 0%, rgba(64, 10, 10, 0.8) 58%, rgba(64, 10, 10, 0.55) 100%),
      var(--hero-image);
  }

  .search-panel,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .global-search-form {
    flex-direction: column;
  }

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

  .small-hero {
    padding: 36px 24px;
  }

  .detail-cover {
    min-height: 360px;
  }
}

@media (max-width: 560px) {
  .header-inner {
    min-height: 68px;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

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

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

  .search-panel,
  .content-section,
  .filter-panel,
  .page-hero,
  .detail-hero,
  .player-section {
    width: min(100% - 20px, 1280px);
  }

  .search-panel,
  .detail-hero,
  .text-panel {
    padding: 20px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-controls {
    width: calc(100% - 36px);
    justify-content: space-between;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
