:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --dim: #94a3b8;
  --brand: #f97316;
  --brand-2: #ef4444;
  --brand-3: #facc15;
  --radius: 22px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.22), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand-mark {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 14px 34px rgba(249, 115, 22, 0.36);
}

.brand-text,
.footer-logo {
  font-size: 20px;
  background: linear-gradient(90deg, #fed7aa, #fb7185, #facc15);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 22px;
  color: var(--muted);
  font-weight: 700;
}

.site-nav a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.site-nav a:hover {
  color: var(--brand);
  transform: translateY(-1px);
}

.top-search {
  display: flex;
  width: min(340px, 28vw);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
}

.top-search input,
.hero-search input,
.filter-line input {
  min-width: 0;
  width: 100%;
  color: var(--text);
  border: 0;
  outline: 0;
  background: transparent;
}

.top-search input {
  padding: 10px 14px;
}

.top-search button,
.hero-search button {
  border: 0;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.top-search button {
  padding: 0 16px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.88);
}

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

.hero-slider {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.72) 42%, rgba(0, 0, 0, 0.12) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0) 36%);
}

.hero-content {
  position: absolute;
  top: 50%;
  left: clamp(22px, 7vw, 96px);
  width: min(680px, calc(100% - 44px));
  transform: translateY(-45%);
}

.eyebrow,
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: #fed7aa;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-shadow: 0 18px 45px rgba(0, 0, 0, 0.62);
}

.hero-content p {
  max-width: 620px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.85;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.hero-meta span,
.detail-meta span {
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

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

.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  color: #fed7aa;
  font-size: 12px;
  font-weight: 800;
  background: rgba(249, 115, 22, 0.14);
}

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

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

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 14px 36px rgba(239, 68, 68, 0.3);
}

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

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 6;
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  font-size: 34px;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.42);
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.5);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: var(--brand);
}

.quick-panel,
.content-section,
.page-main,
.detail-main,
.site-footer {
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto;
}

.quick-panel {
  position: relative;
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: -42px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-search {
  display: flex;
  min-height: 50px;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.74);
}

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

.hero-search button {
  padding: 0 24px;
  font-weight: 900;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.quick-links a {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

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

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

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

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

.section-link {
  color: #fed7aa;
  font-weight: 900;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.94));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  border-color: rgba(249, 115, 22, 0.62);
  transform: translateY(-5px);
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.42);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

.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,
.ranking-poster:hover img {
  transform: scale(1.06);
}

.poster-year {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title:hover,
.ranking-body h2 a:hover,
.mini-links a:hover {
  color: #fb923c;
}

.card-meta {
  margin: 9px 0;
  color: var(--dim);
  font-size: 13px;
}

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

.movie-card.compact .card-body {
  padding: 13px;
}

.movie-card.compact .card-title {
  min-height: 42px;
  font-size: 16px;
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #111827;
}

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

.category-tile:hover img {
  opacity: 0.64;
}

.category-tile span,
.category-tile strong,
.category-tile em {
  position: relative;
  z-index: 2;
  display: block;
}

.category-tile span {
  margin: 22px 22px 72px;
  color: #fed7aa;
  font-weight: 900;
}

.category-tile strong {
  margin: 0 22px 8px;
  font-size: 26px;
  line-height: 1.1;
}

.category-tile em {
  margin: 0 22px 22px;
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
  line-height: 1.65;
}

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

.rank-panel {
  align-self: start;
  position: sticky;
  top: 92px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.86);
}

.compact-heading {
  align-items: center;
  margin-bottom: 18px;
}

.compact-heading h2 {
  font-size: 28px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.rank-no {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  font-weight: 950;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.rank-title {
  overflow: hidden;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  color: var(--dim);
  font-size: 12px;
}

.page-main,
.detail-main {
  padding: 34px 0 0;
}

.page-hero {
  overflow: hidden;
  margin-bottom: 32px;
  padding: clamp(34px, 6vw, 68px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at right top, rgba(249, 115, 22, 0.28), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(2, 6, 23, 0.92));
  box-shadow: var(--shadow);
}

.compact-hero {
  min-height: 280px;
}

.page-hero h1 {
  max-width: 860px;
  font-size: clamp(38px, 7vw, 74px);
}

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

.filter-line {
  max-width: 620px;
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
}

.filter-line input {
  padding: 16px 20px;
}

.wide-filter {
  max-width: 760px;
}

.category-panels {
  display: grid;
  gap: 20px;
}

.category-panel {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.82);
}

.category-cover {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 18px;
  background: #111827;
}

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

.category-panel h2 {
  margin: 0 0 10px;
  font-size: 30px;
}

.category-panel p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.8;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mini-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
}

.ranking-list {
  display: grid;
  gap: 18px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.82);
}

.ranking-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 3 / 4;
  background: #111827;
}

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

.ranking-poster span {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  font-weight: 950;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.ranking-body h2 {
  margin: 0 0 8px;
  font-size: clamp(22px, 3vw, 34px);
}

.ranking-body p {
  color: var(--muted);
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--dim);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 330px) 1fr;
  gap: clamp(24px, 5vw, 52px);
  align-items: center;
  padding: clamp(22px, 5vw, 42px);
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at right top, rgba(249, 115, 22, 0.25), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.94));
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  aspect-ratio: 3 / 4;
  background: #111827;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.42);
}

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

.detail-info h1 {
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
}

.detail-one-line {
  max-width: 820px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.85;
}

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

.player-section,
.detail-content {
  margin-top: 34px;
}

.player-section h2,
.detail-content h2 {
  margin-bottom: 18px;
  font-size: clamp(26px, 4vw, 38px);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(249, 115, 22, 0.28);
  border-radius: 26px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-start {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.62));
}

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

.play-icon {
  position: relative;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 18px 60px rgba(239, 68, 68, 0.42);
}

.play-icon::after {
  content: "";
  position: absolute;
  left: 38px;
  top: 29px;
  width: 0;
  height: 0;
  border-top: 17px solid transparent;
  border-bottom: 17px solid transparent;
  border-left: 25px solid #fff;
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 5;
  color: #fff;
  font-weight: 800;
  text-shadow: 0 2px 12px #000;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.detail-content article {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.82);
}

.detail-content p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.95;
}

.related-section {
  padding-bottom: 40px;
}

.empty-state {
  display: none;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.82);
}

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

.site-footer {
  padding: 64px 0 34px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  color: var(--dim);
}

.footer-logo {
  font-size: 22px;
  font-weight: 950;
}

.footer-inner p {
  max-width: 560px;
  margin: 0;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  gap: 12px;
}

.footer-links a {
  color: var(--muted);
}

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

@media (max-width: 1080px) {
  .site-header {
    grid-template-columns: auto auto;
  }

  .menu-toggle {
    display: block;
    justify-self: end;
  }

  .site-nav,
  .top-search {
    display: none;
  }

  .site-header.is-open .site-nav,
  .site-header.is-open .top-search {
    display: flex;
    grid-column: 1 / -1;
    width: 100%;
  }

  .site-header.is-open .site-nav {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

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

  .split-section,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .site-header {
    padding: 12px 16px;
  }

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

  .hero-slider {
    min-height: 72vh;
  }

  .hero-content {
    left: 18px;
    transform: translateY(-42%);
  }

  .hero-content h1 {
    font-size: 42px;
  }

  .hero-control {
    display: none;
  }

  .quick-panel {
    grid-template-columns: 1fr;
    margin-top: 18px;
  }

  .quick-links {
    justify-content: flex-start;
  }

  .movie-grid,
  .small-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
  }

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

  .category-panel,
  .ranking-card,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .category-cover {
    aspect-ratio: 16 / 9;
  }

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

  .rank-row {
    grid-template-columns: 40px 1fr;
  }

  .rank-meta {
    grid-column: 2;
  }
}

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

  .hero-actions,
  .footer-inner,
  .footer-links {
    align-items: stretch;
    flex-direction: column;
  }

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