:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --panel-strong: #1e293b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --accent: #f59e0b;
  --accent-strong: #d97706;
  --accent-soft: rgba(245, 158, 11, 0.16);
  --danger: #fb7185;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.14), transparent 30rem), var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

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

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #020617;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

.logo-mark svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-text span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.desktop-nav a,
.mobile-nav a {
  color: #cbd5e1;
  padding: 10px 14px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--text);
  background: rgba(245, 158, 11, 0.16);
}

.header-search {
  width: 260px;
  height: 42px;
  display: flex;
  align-items: center;
  background: rgba(2, 6, 23, 0.6);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.header-search input {
  width: 100%;
  min-width: 0;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  padding: 0 0 0 16px;
}

.header-search button {
  height: 100%;
  color: #020617;
  background: var(--accent);
  border: 0;
  padding: 0 15px;
  cursor: pointer;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid var(--line);
  border-radius: 18px;
}

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

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: var(--bg);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.8) 42%, rgba(2, 6, 23, 0.2) 100%), linear-gradient(to right, rgba(2, 6, 23, 0.78), transparent 65%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 96px;
  max-width: 1180px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 14px;
  backdrop-filter: blur(10px);
}

.hero-content h1 {
  max-width: 760px;
  margin: 20px 0 16px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 720px;
  color: #cbd5e1;
  font-size: 19px;
  line-height: 1.8;
  margin: 0 0 28px;
}

.hero-actions,
.detail-actions,
.search-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

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

.primary-button {
  color: #020617;
  background: var(--accent);
}

.primary-button:hover,
.small-button:hover {
  background: #fbbf24;
  transform: translateY(-1px);
}

.ghost-button {
  color: var(--text);
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--line);
}

.ghost-button:hover {
  border-color: rgba(245, 158, 11, 0.55);
  transform: translateY(-1px);
}

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

.hero-dots button {
  width: 32px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.hero-dots button.active {
  background: var(--accent);
}

.section {
  padding: 72px 0;
}

.section.alt {
  background: rgba(15, 23, 42, 0.72);
}

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

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

.section-heading h2 {
  font-size: clamp(26px, 4vw, 38px);
  margin: 0 0 8px;
  letter-spacing: -0.03em;
}

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

.section-link {
  color: #fbbf24;
  font-weight: 700;
  white-space: nowrap;
}

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

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

.movie-card,
.category-card,
.info-panel,
.player-shell,
.search-panel,
.rank-card,
.compact-card {
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.2);
}

.movie-card {
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.65);
  box-shadow: var(--shadow);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

.movie-cover img,
.compact-thumb img,
.rank-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.75), transparent 62%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .cover-gradient {
  opacity: 1;
}

.play-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  color: #020617;
  background: var(--accent);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translateY(0);
}

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

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #fbbf24;
  font-size: 13px;
  margin-bottom: 10px;
}

.movie-card h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: #fbbf24;
}

.movie-card p {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.7;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span,
.meta-pill {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.24);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
}

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

.category-card {
  padding: 24px;
  min-height: 190px;
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.6);
  background: rgba(30, 41, 59, 0.85);
}

.category-card strong {
  display: block;
  font-size: 22px;
  margin-bottom: 12px;
}

.category-card p {
  color: #cbd5e1;
  line-height: 1.7;
  margin: 0 0 16px;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-samples span {
  max-width: 100%;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.1);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.rank-number {
  display: grid;
  place-items: center;
  color: #020617;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  border-radius: var(--radius-sm);
  font-size: 22px;
  font-weight: 900;
}

.rank-card {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 0;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.rank-card:hover {
  transform: translateX(4px);
  border-color: rgba(245, 158, 11, 0.55);
}

.rank-cover {
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: #0f172a;
}

.rank-info {
  min-width: 0;
  padding: 16px;
  display: grid;
  gap: 8px;
}

.rank-info strong {
  font-size: 18px;
}

.rank-info em {
  color: #fbbf24;
  font-style: normal;
  font-size: 13px;
}

.rank-info span {
  color: #cbd5e1;
  line-height: 1.6;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.feature-panel {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--panel);
}

.feature-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.feature-panel:hover img {
  transform: scale(1.08);
}

.feature-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.18));
}

.feature-panel-body {
  position: relative;
  z-index: 2;
  padding: 32px;
}

.feature-panel-body h3 {
  margin: 12px 0;
  font-size: 30px;
}

.feature-panel-body p {
  color: #cbd5e1;
  line-height: 1.7;
  margin: 0;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0 54px;
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.18), transparent 30rem), rgba(15, 23, 42, 0.6);
  border-bottom: 1px solid var(--line);
}

.detail-hero {
  min-height: 520px;
  display: flex;
  align-items: flex-end;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: saturate(1.15);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.82) 50%, rgba(2, 6, 23, 0.45) 100%);
}

.page-hero .container,
.detail-hero .container {
  position: relative;
  z-index: 2;
}

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

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

.page-hero h1,
.detail-hero h1 {
  max-width: 920px;
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.page-hero p,
.detail-hero p {
  max-width: 820px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
  margin: 0;
}

.meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 26px;
}

.player-section {
  padding: 52px 0 28px;
  background: #020617;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-shell video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--text);
  background: rgba(2, 6, 23, 0.48);
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-start.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-start span {
  display: inline-grid;
  place-items: center;
  width: 92px;
  height: 92px;
  color: #020617;
  background: var(--accent);
  border-radius: 999px;
  font-size: 34px;
  box-shadow: 0 20px 60px rgba(245, 158, 11, 0.35);
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  color: #fecdd3;
  background: rgba(127, 29, 29, 0.82);
  border: 1px solid rgba(251, 113, 133, 0.34);
  border-radius: 12px;
  padding: 12px 14px;
  display: none;
}

.player-message.is-visible {
  display: block;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
  padding: 44px 0 76px;
}

.info-panel {
  padding: 28px;
}

.info-panel + .info-panel {
  margin-top: 22px;
}

.info-panel h2,
.info-panel h3 {
  margin: 0 0 16px;
  font-size: 24px;
}

.info-panel p {
  color: #cbd5e1;
  line-height: 1.9;
  margin: 0;
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.fact {
  background: rgba(2, 6, 23, 0.35);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}

.fact span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.fact strong {
  display: block;
  font-size: 16px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  border-radius: 16px;
  transition: border-color 0.24s ease, transform 0.24s ease;
}

.compact-card:hover {
  border-color: rgba(245, 158, 11, 0.58);
  transform: translateY(-2px);
}

.compact-thumb {
  aspect-ratio: 1 / 0.75;
  overflow: hidden;
  background: #0f172a;
}

.compact-body {
  min-width: 0;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.compact-body strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.search-panel {
  padding: 24px;
  margin-top: 26px;
}

.search-controls {
  display: grid;
  grid-template-columns: 1fr repeat(3, 160px);
  gap: 12px;
}

.search-controls input,
.search-controls select {
  width: 100%;
  color: var(--text);
  background: rgba(2, 6, 23, 0.62);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 14px;
  outline: 0;
}

.search-controls input:focus,
.search-controls select:focus {
  border-color: rgba(245, 158, 11, 0.65);
}

.search-result-title {
  color: var(--muted);
  margin: 22px 0 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.9);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
}

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

@media (max-width: 1080px) {
  .header-search {
    display: none;
  }

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

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

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

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

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

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

  .hero-content {
    padding-bottom: 78px;
  }

  .section {
    padding: 54px 0;
  }

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

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

  .search-controls {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .header-inner {
    width: min(100% - 24px, 1180px);
    height: 64px;
  }

  .brand-text span {
    display: none;
  }

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

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

  .movie-grid,
  .movie-grid.dense,
  .category-grid,
  .feature-panels {
    grid-template-columns: 1fr;
  }

  .rank-card {
    grid-template-columns: 116px minmax(0, 1fr);
  }

  .rank-info span {
    -webkit-line-clamp: 1;
  }

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

  .info-panel {
    padding: 22px;
  }

  .player-start span {
    width: 76px;
    height: 76px;
    font-size: 28px;
  }
}
