:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --panel-glass: rgba(15, 23, 42, 0.78);
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --accent: #f97316;
  --accent-strong: #ef4444;
  --accent-soft: rgba(249, 115, 22, 0.15);
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.45);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.site-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.28);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 76px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 24px;
  letter-spacing: -0.03em;
  white-space: nowrap;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: white;
  font-size: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 10px 28px rgba(249, 115, 22, 0.35);
}

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

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

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

.header-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
}

.header-search-form input,
.large-search-form input,
.search-page-form input,
.filter-input {
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.header-search-form input {
  width: 210px;
  padding: 8px 10px 8px 14px;
}

.header-search-form button,
.large-search-form button,
.search-page-form button {
  border: 0;
  color: white;
  padding: 9px 15px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.24);
  cursor: pointer;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  color: white;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
}

.hero-slider {
  position: relative;
  overflow: hidden;
  min-height: 650px;
  background: #020617;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) brightness(0.62);
  transform: scale(1.04);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.26) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.06) 44%, rgba(2, 6, 23, 0.7) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 110px 0 130px;
  max-width: 760px;
  justify-self: start;
}

.hero-tags,
.movie-tags,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.movie-tags span,
.movie-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.14);
  border: 1px solid rgba(249, 115, 22, 0.22);
  font-size: 13px;
}

.hero-content h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-shadow: 0 20px 60px rgba(2, 6, 23, 0.6);
}

.hero-content p {
  max-width: 680px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 18px 34px rgba(249, 115, 22, 0.3);
}

.btn-ghost,
.btn-wide {
  color: white;
  background: rgba(15, 23, 42, 0.56);
  border-color: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(14px);
}

.btn-wide {
  width: 100%;
  margin-top: 18px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: white;
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(14px);
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 34px;
}

.hero-prev {
  left: max(18px, calc((100vw - 1200px) / 2));
}

.hero-next {
  right: max(18px, calc((100vw - 1200px) / 2));
}

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

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

.hero-dot.active {
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}

.section-block {
  padding: 56px 0;
}

.quick-search-panel {
  position: relative;
  z-index: 5;
  margin-top: -74px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}

.large-search-form,
.search-page-form {
  display: flex;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.58);
}

.large-search-form input,
.search-page-form input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  font-size: 16px;
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.category-chip {
  min-height: 94px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.72));
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-chip:hover,
.category-overview-card:hover,
.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(249, 115, 22, 0.42);
}

.category-chip strong {
  display: block;
  color: white;
  font-size: 18px;
  margin-bottom: 6px;
}

.category-chip span,
.section-heading p,
.movie-card p,
.site-footer p,
.compact-hero p,
.detail-content p,
.category-overview-card p,
.search-summary {
  color: var(--muted);
  line-height: 1.75;
}

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

.section-heading h2,
.ranking-panel h2,
.detail-content h2,
.player-section h2,
.detail-side-card h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.04em;
}

.section-more,
.inline-link {
  color: #fed7aa;
  font-weight: 800;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.88));
  box-shadow: 0 16px 34px rgba(2, 6, 23, 0.24);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

.poster-wrap img,
.detail-poster img,
.category-preview-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0) 28%, rgba(2, 6, 23, 0.72) 100%);
  opacity: 0.75;
  transition: opacity 0.2s ease;
}

.movie-card:hover .poster-wrap::after {
  opacity: 0.35;
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.28);
}

.play-chip {
  left: 12px;
  bottom: 12px;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 800;
}

.rank-badge {
  top: 10px;
  left: 10px;
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 28px;
  padding: 0 8px;
  font-weight: 900;
}

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

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

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

.movie-card p {
  margin: 0;
  font-size: 14px;
}

.movie-meta span {
  min-height: 22px;
  padding: 3px 8px;
  font-size: 12px;
}

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

.ranking-panel,
.detail-side-card,
.player-section,
.detail-content article,
.category-overview-card,
.ranking-spotlight,
.search-page-form,
.filter-bar {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.ranking-panel {
  position: sticky;
  top: 100px;
  padding: 22px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 58px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 74px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.36);
}

.rank-row:hover {
  border-color: rgba(249, 115, 22, 0.38);
  background: rgba(249, 115, 22, 0.08);
}

.rank-number {
  color: #fed7aa;
  font-weight: 900;
  font-size: 22px;
}

.rank-row img {
  width: 58px;
  height: 74px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-row strong,
.rank-row em {
  display: block;
}

.rank-row em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.site-footer {
  margin-top: 60px;
  padding: 48px 0;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.6);
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.site-footer p {
  max-width: 620px;
  margin: 12px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: start;
}

.footer-links a {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbd5e1;
}

.page-main {
  padding-top: 36px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 18px;
  color: #cbd5e1;
  font-size: 14px;
}

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

.compact-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 6vw, 72px);
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(239, 68, 68, 0.04)),
    rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.compact-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -110px;
  width: 310px;
  height: 310px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.28), transparent 68%);
}

.compact-hero span {
  position: relative;
  z-index: 1;
  color: #fed7aa;
  font-weight: 900;
}

.compact-hero h1 {
  position: relative;
  z-index: 1;
  margin: 12px 0;
  max-width: 860px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.compact-hero p {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0;
  font-size: 17px;
}

.category-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 28px;
}

.category-overview-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  padding: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-preview-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  min-height: 160px;
}

.category-preview-images img {
  min-height: 76px;
  border-radius: 10px;
}

.category-overview-card h2 {
  margin: 4px 0 10px;
  font-size: 24px;
}

.filter-bar {
  margin: 24px 0;
  padding: 10px;
}

.filter-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.46);
}

.category-movie-grid {
  grid-template-columns: repeat(5, 1fr);
}

.ranking-page .ranking-spotlight {
  margin-top: 28px;
  padding: 18px;
}

.strong-ranking {
  grid-template-columns: repeat(3, 1fr);
}

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

.search-page-form {
  margin: 28px 0 20px;
}

.search-summary {
  margin-bottom: 18px;
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
  padding: clamp(18px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.16), rgba(15, 23, 42, 0.1)),
    rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  box-shadow: 0 24px 54px rgba(2, 6, 23, 0.55);
}

.detail-info h1 {
  margin: 18px 0 18px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.one-line {
  max-width: 850px;
  color: #dbeafe;
  font-size: 20px;
  line-height: 1.75;
}

.player-section {
  margin-top: 30px;
  padding: 22px;
}

.movie-player {
  position: relative;
  overflow: hidden;
  margin-top: 18px;
  border-radius: 26px;
  background: black;
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.18), rgba(2, 6, 23, 0.46));
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.player-button {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  padding-left: 6px;
  border-radius: 50%;
  font-size: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 24px 54px rgba(249, 115, 22, 0.36);
}

.two-column-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  margin-top: 28px;
}

.detail-content article,
.detail-side-card {
  padding: 26px;
}

.detail-content article h2:not(:first-child) {
  margin-top: 28px;
}

.detail-content p {
  margin: 14px 0 0;
  font-size: 17px;
}

.detail-side-card dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 10px 14px;
  margin: 18px 0 0;
}

.detail-side-card dt {
  color: #fed7aa;
  font-weight: 900;
}

.detail-side-card dd {
  margin: 0;
  color: #cbd5e1;
}

.prev-next-links {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.prev-next-links a {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #cbd5e1;
}

.prev-next-links a:hover {
  color: #fed7aa;
  border-color: rgba(249, 115, 22, 0.38);
}

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

.hidden-by-filter {
  display: none !important;
}

@media (max-width: 1120px) {
  .movie-grid,
  .category-movie-grid,
  .ranking-grid {
    grid-template-columns: repeat(4, 1fr);
  }

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

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

  .split-layout,
  .two-column-content {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }

  .strong-ranking {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .header-inner {
    flex-wrap: wrap;
    min-height: 68px;
    padding: 12px 0;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .site-nav {
    order: 4;
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    margin-left: 0;
    padding-top: 12px;
  }

  .site-nav.open {
    display: flex;
  }

  .nav-link {
    background: rgba(15, 23, 42, 0.65);
  }

  .header-search-form {
    order: 3;
    width: 100%;
  }

  .header-search-form input {
    width: 100%;
    flex: 1;
  }

  .hero-slider {
    min-height: 590px;
  }

  .hero-content {
    padding-top: 90px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-search-panel {
    margin-top: -42px;
    border-radius: 24px;
  }

  .large-search-form,
  .search-page-form {
    border-radius: 22px;
    flex-direction: column;
  }

  .category-strip,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .featured-grid,
  .category-movie-grid,
  .ranking-grid,
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .detail-poster {
    width: min(320px, 100%);
  }

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

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

@media (max-width: 520px) {
  .site-shell {
    width: min(100% - 22px, 1200px);
  }

  .logo {
    font-size: 20px;
  }

  .hero-slider {
    min-height: 540px;
  }

  .hero-content h1,
  .detail-info h1,
  .compact-hero h1 {
    letter-spacing: -0.04em;
  }

  .quick-search-panel,
  .compact-hero,
  .detail-hero,
  .player-section,
  .detail-content article,
  .detail-side-card {
    border-radius: 20px;
  }

  .movie-grid,
  .featured-grid,
  .category-movie-grid,
  .ranking-grid,
  .related-grid {
    gap: 12px;
  }

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

  .movie-card h3 {
    font-size: 15px;
  }

  .movie-card p {
    display: none;
  }

  .strong-ranking {
    grid-template-columns: 1fr;
  }

  .player-button {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }
}
