:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --red: #dc2626;
  --orange: #ea580c;
  --amber: #f59e0b;
  --dark: #0f172a;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(18px);
}

.site-header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark,
.footer-brand span {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange), var(--amber));
  box-shadow: 0 14px 35px rgba(220, 38, 38, 0.26);
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-name {
  font-size: 21px;
  line-height: 1.1;
  background: linear-gradient(90deg, var(--red), var(--orange), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-sub {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.nav-link {
  padding: 10px 13px;
  border-radius: 14px;
  color: #4b5563;
  font-weight: 800;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--red);
  background: #fff7ed;
}

.header-search {
  position: relative;
  width: 240px;
}

.header-search input,
.hero-search-field input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: 0.2s ease;
}

.header-search input {
  padding: 12px 14px;
}

.header-search input:focus,
.hero-search-field input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #fb923c;
  box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.16);
}

.search-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, calc(100vw - 32px));
  max-height: 520px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 10px;
  z-index: 80;
}

.search-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  transition: 0.2s ease;
}

.search-item:hover {
  background: #fff7ed;
}

.search-item img {
  width: 54px;
  height: 76px;
  border-radius: 12px;
  object-fit: cover;
  background: #fee2e2;
}

.search-item h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 900;
}

.search-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #fff7ed;
  padding: 10px;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--red);
  border-radius: 999px;
}

.mobile-nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}

.mobile-link {
  display: block;
  padding: 12px 14px;
  border-radius: 14px;
  color: #374151;
  font-weight: 800;
}

.mobile-link:hover {
  background: #fff7ed;
  color: var(--red);
}

.hero-section {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: stretch;
}

.hero-carousel {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border-radius: 36px;
  box-shadow: var(--shadow);
  background: #7f1d1d;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: clamp(32px, 6vw, 72px);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

.hero-copy {
  max-width: 680px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffedd5;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--orange);
}

.hero-copy h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.hero-summary {
  margin: 22px 0 0;
  max-width: 640px;
  font-size: 20px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.92);
}

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

.tag-row span {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

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

.primary-button,
.ghost-button,
.section-link,
.rank-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 16px;
  font-weight: 900;
  transition: 0.2s ease;
}

.primary-button {
  color: var(--red);
  background: #fff;
  box-shadow: 0 18px 45px rgba(255, 255, 255, 0.18);
}

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

.ghost-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.14);
}

.ghost-button.light {
  color: #fff;
}

.ghost-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.22);
}

.hero-dots {
  position: absolute;
  z-index: 8;
  left: clamp(32px, 6vw, 72px);
  bottom: 34px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  transition: 0.2s ease;
}

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

.hero-search-block {
  padding: 30px;
  border-radius: 36px;
  background: linear-gradient(180deg, #fff, #fff7ed);
  box-shadow: var(--shadow);
  border: 1px solid #fed7aa;
}

.hero-search-block h2 {
  margin: 0;
  font-size: 27px;
  font-weight: 950;
}

.hero-search-block p {
  margin: 12px 0 20px;
  color: var(--muted);
  line-height: 1.75;
}

.hero-search-field {
  position: relative;
}

.hero-search-field input {
  padding: 16px 18px;
}

.hero-panel {
  left: 0;
  right: auto;
  width: 100%;
}

.hero-quick-links {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.hero-quick-links a {
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff;
  color: #9a3412;
  font-weight: 900;
  border: 1px solid #ffedd5;
  transition: 0.2s ease;
}

.hero-quick-links a:hover {
  transform: translateX(4px);
  border-color: #fdba74;
}

.section-block {
  width: min(1180px, calc(100% - 32px));
  margin: 46px auto;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-link {
  color: var(--red);
  background: #fff7ed;
  border: 1px solid #fed7aa;
  white-space: nowrap;
}

.section-link:hover {
  background: #ffedd5;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.07);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: #fdba74;
  box-shadow: 0 24px 70px rgba(220, 38, 38, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #fee2e2, #ffedd5);
}

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

.movie-card:hover .poster-link img,
.category-tile:hover img,
.category-cover:hover img {
  transform: scale(1.06);
}

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(220, 38, 38, 0.92);
  font-size: 12px;
  font-weight: 900;
}

.card-content {
  padding: 16px;
}

.card-content h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 950;
}

.card-content a:hover h2,
.rank-info a:hover h2,
.category-overview-card a:hover h2 {
  color: var(--red);
}

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

.card-meta {
  color: #9a3412 !important;
  font-weight: 800;
}

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

.warm-block {
  padding: 34px;
  border-radius: 36px;
  background: linear-gradient(135deg, #fff7ed, #ffffff);
  border: 1px solid #fed7aa;
}

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

.category-tile {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 240px;
  overflow: hidden;
  border-radius: 24px;
  padding: 18px;
  color: #fff;
  background: #7f1d1d;
  box-shadow: 0 14px 38px rgba(127, 29, 29, 0.16);
}

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

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(127, 29, 29, 0.86));
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 2;
}

.category-tile span {
  font-size: 20px;
  font-weight: 950;
}

.category-tile p {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.86);
}

.rank-list {
  display: grid;
  gap: 14px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 62px 86px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 24px;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--amber));
  font-weight: 950;
}

.rank-poster img {
  width: 86px;
  height: 118px;
  border-radius: 16px;
  object-fit: cover;
}

.rank-info h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 950;
}

.rank-info p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.rank-play {
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding: clamp(36px, 7vw, 72px);
  border-radius: 36px;
  color: #fff;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.24), transparent 28%), linear-gradient(135deg, #991b1b, #ea580c 58%, #f59e0b);
  box-shadow: var(--shadow);
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 18px;
  line-height: 1.8;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
  margin-bottom: 22px;
  padding: 16px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.filter-bar input,
.filter-bar select {
  padding: 14px 16px;
}

.category-overview-list {
  display: grid;
  gap: 24px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 24px;
  padding: 22px;
  border-radius: 30px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.08);
}

.category-cover {
  display: block;
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 4 / 3;
  background: #fee2e2;
}

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

.category-overview-card h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 950;
}

.category-overview-card p {
  margin: 10px 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.mini-card-row,
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.compact-card {
  display: grid;
  grid-template-columns: 82px 1fr;
  min-height: 124px;
}

.compact-card .poster-link {
  aspect-ratio: auto;
  height: 100%;
}

.compact-card .card-content {
  padding: 12px;
}

.compact-card .card-content h2 {
  font-size: 15px;
}

.compact-card .card-content p {
  font-size: 12px;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #c2410c;
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.detail-main {
  display: grid;
  gap: 22px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #111827;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  z-index: 1;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.42));
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--amber));
  box-shadow: 0 18px 45px rgba(220, 38, 38, 0.34);
  font-size: 32px;
  padding-left: 5px;
}

.player-shell.is-playing .play-overlay {
  display: none;
}

.story-card,
.detail-meta-card {
  padding: 26px;
  border-radius: 28px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.07);
}

.story-card h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.lead-text {
  margin: 18px 0 0;
  color: #9a3412;
  font-size: 18px;
  line-height: 1.8;
  font-weight: 800;
}

.story-card h2,
.detail-meta-card h2 {
  margin: 28px 0 12px;
  font-size: 23px;
  font-weight: 950;
}

.story-card p {
  color: #374151;
  line-height: 1.9;
  font-size: 16px;
}

.detail-side {
  display: grid;
  gap: 18px;
  align-content: start;
}

.detail-poster {
  width: 100%;
  border-radius: 28px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  box-shadow: var(--shadow);
  background: #fee2e2;
}

.detail-meta-card h2 {
  margin-top: 0;
}

.detail-meta-card dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-meta-card dl div {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

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

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

.detail-tags {
  margin-top: 18px;
}

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

[hidden] {
  display: none !important;
}

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

  .header-search {
    margin-left: auto;
  }

  .menu-button {
    display: block;
  }

  .hero-section {
    grid-template-columns: 1fr;
  }

  .hero-carousel {
    min-height: 520px;
  }

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

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

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

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

  .detail-side {
    grid-template-columns: 220px 1fr;
  }
}

@media (max-width: 760px) {
  .site-header-inner {
    min-height: 66px;
  }

  .brand-sub,
  .header-search {
    display: none;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 14px;
  }

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

  .hero-section,
  .section-block,
  .page-hero,
  .detail-wrap {
    width: min(100% - 24px, 1180px);
  }

  .hero-carousel {
    min-height: 520px;
    border-radius: 28px;
  }

  .hero-slide {
    padding: 28px;
    align-items: end;
  }

  .hero-copy h1,
  .page-hero h1 {
    font-size: 38px;
  }

  .hero-summary {
    font-size: 16px;
  }

  .hero-search-block,
  .warm-block,
  .page-hero,
  .story-card,
  .detail-meta-card {
    padding: 22px;
    border-radius: 26px;
  }

  .section-heading {
    display: grid;
    align-items: start;
  }

  .movie-grid,
  .category-grid,
  .mini-card-row,
  .related-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-card {
    grid-template-columns: 46px 70px 1fr;
  }

  .rank-play {
    grid-column: 2 / -1;
  }

  .rank-number {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 13px;
  }

  .rank-poster img {
    width: 70px;
    height: 98px;
  }

  .category-overview-card,
  .detail-side {
    grid-template-columns: 1fr;
  }

  .compact-card {
    grid-template-columns: 96px 1fr;
  }

  .player-shell {
    border-radius: 22px;
  }

  .play-overlay span {
    width: 70px;
    height: 70px;
    font-size: 26px;
  }
}
