:root {
  --bg: #09090b;
  --bg-soft: #111114;
  --bg-card: rgba(24, 24, 27, 0.82);
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(249, 115, 22, 0.45);
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --muted-soft: #71717a;
  --brand: #f97316;
  --brand-light: #fb923c;
  --brand-dark: #c2410c;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 24px;
  --max: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 10% -10%, rgba(249, 115, 22, 0.28), transparent 34rem),
    radial-gradient(circle at 90% 10%, rgba(127, 29, 29, 0.35), transparent 36rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

button {
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 9, 11, 0.78);
  backdrop-filter: blur(18px);
}

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

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

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #ef4444);
  box-shadow: 0 12px 32px rgba(249, 115, 22, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text strong,
.footer-brand {
  font-size: 20px;
  font-weight: 900;
  line-height: 1.1;
}

.brand-text em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: rgba(249, 115, 22, 0.16);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
}

.mobile-panel {
  display: none;
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(24, 24, 27, 0.96);
}

.mobile-panel.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-link {
  padding: 12px 14px;
  border-radius: 14px;
  color: #e4e4e7;
  background: rgba(255, 255, 255, 0.05);
}

.mobile-link.is-active {
  background: rgba(249, 115, 22, 0.18);
  color: #fff;
}

main {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  padding: 32px 0 52px;
}

.hero-stage {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: var(--bg-soft);
  box-shadow: var(--shadow);
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.12) contrast(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 9, 11, 0.94) 0%, rgba(9, 9, 11, 0.70) 38%, rgba(9, 9, 11, 0.24) 100%),
    linear-gradient(180deg, rgba(9, 9, 11, 0.10), rgba(9, 9, 11, 0.82));
}

.hero-content {
  position: absolute;
  left: clamp(24px, 6vw, 72px);
  bottom: clamp(28px, 7vw, 86px);
  width: min(720px, calc(100% - 48px));
  z-index: 2;
}

.eyebrow,
.page-hero span,
.section-heading span,
.hero-side-title span,
.panel-head span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 12px;
  padding: 6px 12px;
  border: 1px solid rgba(249, 115, 22, 0.42);
  border-radius: 999px;
  color: var(--brand-light);
  background: rgba(249, 115, 22, 0.12);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero h1,
.hero h2 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 22px;
  color: #e4e4e7;
  font-size: 18px;
}

.hero-tags,
.card-meta,
.tag-row,
.page-actions,
.hero-actions,
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-tags span,
.tag-row span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.14);
  font-size: 12px;
  font-weight: 800;
}

.hero-actions {
  margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.section-more,
.panel-link,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #ef4444);
  box-shadow: 0 14px 34px rgba(249, 115, 22, 0.22);
}

.ghost-btn,
.section-more,
.text-link {
  border: 1px solid var(--line);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover,
.panel-link:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

.hero-controls button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 24px;
}

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(24, 24, 27, 0.76);
  box-shadow: var(--shadow);
}

.hero-side-title,
.panel-head,
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.hero-side-title a {
  color: var(--brand-light);
  font-weight: 800;
}

.hero-mini-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.hero-mini-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

.hero-mini-card img {
  width: 96px;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  object-fit: cover;
}

.hero-mini-card strong,
.hero-mini-card em {
  display: block;
}

.hero-mini-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
}

.hero-mini-card em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.home-search,
.content-section,
.page-hero,
.detail-layout,
.ranking-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 17, 20, 0.82);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

.home-search {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  padding: 26px;
}

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

.home-search h2,
.section-heading h2,
.panel-head h2,
.story-section h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.content-section {
  margin: 28px 0;
  padding: 28px;
}

.content-section.no-pad {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

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

.section-heading p,
.page-hero p,
.category-overview-card p,
.story-section p,
.site-footer p,
.detail-line {
  color: var(--muted);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(24, 24, 27, 0.78);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: 0 20px 60px rgba(249, 115, 22, 0.12);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: #18181b;
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.card-badge,
.play-mark {
  position: absolute;
  z-index: 2;
}

.card-badge {
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #dc2626);
  font-size: 12px;
}

.play-mark {
  right: 12px;
  bottom: 12px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
}

.card-body {
  padding: 16px;
}

.card-meta {
  color: var(--muted-soft);
  font-size: 12px;
  font-weight: 800;
}

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

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

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

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

.movie-card.is-compact .card-body p {
  min-height: 42px;
  font-size: 13px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  margin: 28px 0;
}

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

.category-tile,
.category-overview-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 150px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.16), rgba(255, 255, 255, 0.04)),
    rgba(24, 24, 27, 0.86);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}

.category-tile span,
.category-name {
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.category-tile strong {
  color: #fed7aa;
  font-size: 14px;
}

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

.ranking-panel {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 22px;
}

.ranking-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  padding: 0;
  list-style: none;
}

.ranking-list a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
}

.rank-num {
  grid-row: span 2;
  color: var(--brand-light);
  font-size: 18px;
  font-weight: 900;
}

.ranking-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.panel-link {
  width: 100%;
  color: #fff;
  background: rgba(249, 115, 22, 0.18);
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin: 32px 0 28px;
  padding: clamp(42px, 8vw, 82px);
  background:
    radial-gradient(circle at 82% 22%, rgba(249, 115, 22, 0.25), transparent 24rem),
    linear-gradient(135deg, rgba(24, 24, 27, 0.95), rgba(9, 9, 11, 0.94));
}

.page-hero h1 {
  max-width: 800px;
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  font-size: 18px;
}

.page-actions {
  margin-top: 26px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.search-box span {
  color: var(--brand-light);
  font-size: 22px;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.filter-chip {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  color: #e4e4e7;
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
}

.filter-chip.is-active,
.filter-chip:hover {
  color: #fff;
  background: rgba(249, 115, 22, 0.20);
}

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

.overview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.overview-links a {
  padding: 5px 9px;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.14);
  font-size: 12px;
  font-weight: 800;
}

.detail-layout {
  margin: 32px 0;
  padding: 28px;
}

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

.breadcrumb a:hover {
  color: var(--brand-light);
}

.watch-player {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(249, 115, 22, 0.30);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: #000;
  cursor: pointer;
}

.player-mask.is-hidden {
  display: none;
}

.player-mask img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
  filter: blur(1px) saturate(1.15);
}

.play-button-large {
  position: relative;
  z-index: 2;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #ef4444);
  box-shadow: 0 20px 56px rgba(249, 115, 22, 0.36);
  font-size: 32px;
}

.player-error {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  color: #fecaca;
  text-align: center;
  pointer-events: none;
}

.detail-main {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  margin-top: 28px;
}

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

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

.detail-line {
  margin: 0 0 20px;
  font-size: 18px;
}

.meta-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 20px;
}

.meta-list div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
}

.meta-list dt {
  color: var(--muted-soft);
  font-size: 12px;
  font-weight: 800;
}

.meta-list dd {
  margin: 4px 0 0;
  color: #fff;
  font-weight: 900;
}

.story-section {
  margin-top: 28px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
}

.story-section h2 + p {
  margin-top: 10px;
}

.story-section p + h2 {
  margin-top: 24px;
}

.related-section {
  margin-bottom: 0;
}

.site-footer {
  margin-top: 52px;
  border-top: 1px solid var(--line);
  background: rgba(9, 9, 11, 0.88);
}

.footer-grid {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
}

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

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

.site-footer a {
  color: #d4d4d8;
}

.site-footer a:hover {
  color: var(--brand-light);
}

.footer-bottom {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: var(--muted-soft);
  border-top: 1px solid var(--line);
  font-size: 14px;
}

@media (max-width: 1180px) {
  .hero,
  .split-section {
    grid-template-columns: 1fr;
  }

  .hero-side,
  .ranking-panel {
    position: static;
  }

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

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

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

  .menu-toggle {
    display: block;
  }

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

  .hero-content {
    left: 22px;
    bottom: 72px;
  }

  .home-search,
  .section-heading,
  .filter-panel,
  .detail-main,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .home-search,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .filter-panel {
    display: grid;
  }

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

@media (max-width: 560px) {
  main,
  .header-inner,
  .mobile-panel,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, var(--max));
  }

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

  .brand-text em {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 18px;
  }

  .hero-stage {
    min-height: 520px;
    border-radius: 24px;
  }

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

  .hero-content p,
  .page-hero p,
  .detail-line {
    font-size: 15px;
  }

  .content-section,
  .detail-layout,
  .page-hero,
  .home-search,
  .ranking-panel {
    padding: 18px;
    border-radius: 20px;
  }

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

  .hero-mini-card {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .hero-mini-card img {
    width: 82px;
  }

  .mobile-panel.is-open {
    grid-template-columns: 1fr;
  }
}
