:root {
  --bg: #030712;
  --bg-soft: #0f172a;
  --panel: rgba(17, 24, 39, 0.84);
  --panel-strong: rgba(31, 41, 55, 0.92);
  --line: rgba(255, 255, 255, 0.10);
  --text: #f8fafc;
  --muted: #a7b0c0;
  --muted-2: #6b7280;
  --brand: #f97316;
  --brand-dark: #ea580c;
  --brand-soft: rgba(249, 115, 22, 0.16);
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.46);
  --radius: 18px;
  --max: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.16), transparent 28rem),
    linear-gradient(180deg, #030712 0%, #0b1120 42%, #030712 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #fb923c);
  box-shadow: 0 10px 28px rgba(249, 115, 22, 0.36);
}

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

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

.nav-link,
.mobile-nav-link {
  color: #d1d5db;
  font-size: 14px;
  font-weight: 650;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
  padding: 9px 14px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: #fff;
  background: var(--brand-soft);
}

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

.header-search input {
  width: 190px;
  color: #fff;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 7px 8px 7px 12px;
}

.header-search button,
.search-page-form button,
.hero-search-panel button {
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--brand);
  padding: 8px 14px;
  font-weight: 700;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.mobile-nav {
  display: none;
  width: min(100% - 32px, var(--max));
  margin: 0 auto 14px;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

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

.mobile-nav-link {
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

main {
  min-height: 70vh;
}

.hero-carousel {
  position: relative;
  min-height: calc(100vh - 72px);
  overflow: hidden;
}

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

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

.hero-background,
.detail-bg {
  position: absolute;
  inset: -22px;
  background-size: cover;
  background-position: center;
  filter: blur(12px) brightness(0.34);
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.94), rgba(3, 7, 18, 0.54), rgba(3, 7, 18, 0.94)),
    linear-gradient(180deg, rgba(3, 7, 18, 0.10), #030712 96%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 54px;
  align-items: center;
  padding: 72px 0 96px;
}

.eyebrow {
  margin: 0 0 14px;
  color: #fed7aa;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-copy h1 {
  max-width: 900px;
  font-size: clamp(44px, 7vw, 92px);
}

.hero-description {
  max-width: 740px;
  margin: 24px 0 0;
  color: #d1d5db;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-tags,
.detail-tags,
.hero-stats,
.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags,
.detail-tags {
  margin-top: 24px;
}

.hero-tags span,
.detail-tags span,
.hero-stats span,
.quick-links a,
.category-pill,
.rank-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
}

.hero-tags span,
.detail-tags span,
.hero-stats span,
.quick-links a {
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
}

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

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

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

.button.primary {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 18px 38px rgba(249, 115, 22, 0.32);
}

.button.primary:hover {
  background: var(--brand-dark);
}

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

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: var(--shadow);
}

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

.hero-poster span {
  position: absolute;
  left: 24px;
  bottom: 24px;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.38);
}

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

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--brand);
}

.hero-search-panel {
  width: min(100% - 32px, var(--max));
  margin: -48px auto 28px;
  position: relative;
  z-index: 8;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-search-panel form,
.search-page-form {
  display: flex;
  gap: 12px;
}

.hero-search-panel input,
.search-page-form input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--line);
  outline: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(3, 7, 18, 0.72);
  padding: 13px 18px;
}

.quick-links {
  margin-top: 14px;
}

.quick-links a:hover {
  border-color: rgba(249, 115, 22, 0.48);
  background: var(--brand-soft);
}

.content-section,
.ranking-board,
.player-section,
.breadcrumb {
  width: min(100% - 32px, var(--max));
  margin-left: auto;
  margin-right: auto;
}

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

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

.section-heading > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-heading h2,
.detail-text-section h2,
.detail-meta-section h2,
.ranking-main h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.section-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--brand);
}

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

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

.movie-card {
  min-width: 0;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: #111827;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
}

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

.poster-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 34px;
  background: rgba(0, 0, 0, 0.48);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.poster-link:hover img {
  transform: scale(1.06);
  filter: saturate(1.1);
}

.poster-link:hover .poster-mask {
  opacity: 1;
}

.category-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(249, 115, 22, 0.88);
}

.rank-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
  background: rgba(3, 7, 18, 0.72);
}

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

.movie-card h3 {
  margin: 0;
  min-height: 46px;
  color: #fff;
  font-size: 16px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.movie-meta,
.movie-one-line {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.movie-one-line {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #8791a3;
}

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

.category-card {
  display: block;
  min-height: 144px;
  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(15, 23, 42, 0.78);
  transition: transform 0.2s ease, border 0.2s ease;
}

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

.category-card span {
  color: #fed7aa;
  font-weight: 800;
}

.category-card strong {
  display: block;
  margin-top: 12px;
  font-size: 36px;
  line-height: 1;
}

.category-card p,
.category-card small {
  display: block;
  margin: 12px 0 0;
  color: var(--muted);
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 58px;
  background:
    radial-gradient(circle at 15% 20%, rgba(249, 115, 22, 0.22), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(3, 7, 18, 0.98));
}

.page-hero-inner {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

.page-hero h1 {
  font-size: clamp(38px, 6vw, 72px);
}

.page-hero p:not(.eyebrow) {
  max-width: 820px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.hero-stats {
  margin-top: 24px;
}

.breadcrumb {
  padding: 22px 0 0;
  color: var(--muted);
  font-size: 14px;
}

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

.breadcrumb span {
  margin: 0 8px;
}

.filter-toolbar {
  width: min(100% - 32px, var(--max));
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.80);
}

.filter-toolbar label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-toolbar input,
.filter-toolbar select {
  width: 100%;
  color: #fff;
  border: 1px solid var(--line);
  outline: 0;
  border-radius: 14px;
  background: rgba(3, 7, 18, 0.72);
  padding: 11px 12px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 540px;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.96), rgba(3, 7, 18, 0.68), rgba(3, 7, 18, 0.94)),
    linear-gradient(180deg, rgba(3, 7, 18, 0.20), #030712 100%);
}

.detail-shell {
  position: relative;
  z-index: 2;
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 70px 0;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 46px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-info h1 {
  font-size: clamp(36px, 6vw, 72px);
}

.detail-one-line {
  max-width: 820px;
  margin: 20px 0 0;
  color: #d1d5db;
  font-size: 20px;
}

.player-section {
  padding: 48px 0 32px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #fff;
  border: 0;
  background: radial-gradient(circle at center, rgba(249, 115, 22, 0.22), rgba(0, 0, 0, 0.60));
  cursor: pointer;
}

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

.player-overlay span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 20px 50px rgba(249, 115, 22, 0.38);
}

.player-overlay strong {
  font-size: 22px;
}

.player-overlay small {
  color: var(--muted);
}

.player-message {
  position: absolute;
  left: 18px;
  bottom: 14px;
  margin: 0;
  color: #fed7aa;
  font-size: 13px;
}

.detail-text-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.detail-text-grid article,
.detail-meta-section,
.ranking-main {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.76);
  padding: 24px;
}

.detail-text-grid p {
  margin: 16px 0 0;
  color: #cbd5e1;
  white-space: pre-line;
}

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

.meta-list div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

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

.meta-list dd {
  margin: 0;
}

.ranking-board {
  padding: 48px 0 0;
}

.ranking-main {
  max-width: 920px;
  margin: 0 auto;
}

.ranking-row {
  display: grid;
  grid-template-columns: 54px 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.ranking-row:first-of-type {
  margin-top: 16px;
}

.ranking-number {
  color: #fb923c;
  font-weight: 900;
  font-size: 20px;
}

.ranking-row img {
  width: 64px;
  height: 86px;
  object-fit: cover;
  border-radius: 10px;
}

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

.ranking-meta {
  color: var(--muted);
  font-size: 14px;
}

.search-hero .page-hero-inner {
  max-width: 880px;
}

.search-page-form {
  margin-top: 26px;
}

.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.80);
}

.footer-shell {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 32px;
}

.footer-brand p {
  max-width: 540px;
  color: var(--muted);
}

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

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

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

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

@media (max-width: 1100px) {
  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .hero-content {
    grid-template-columns: 1fr 280px;
  }
}

@media (max-width: 860px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

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

  .hero-content,
  .detail-shell,
  .detail-text-grid,
  .filter-toolbar,
  .meta-list {
    grid-template-columns: 1fr;
  }

  .hero-content {
    gap: 30px;
    padding-top: 46px;
  }

  .hero-poster {
    width: min(74vw, 300px);
  }

  .detail-poster {
    width: min(74vw, 300px);
  }

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

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

  .footer-shell {
    display: grid;
  }
}

@media (max-width: 560px) {
  .header-shell {
    min-height: 64px;
  }

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

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

  .hero-search-panel form,
  .search-page-form {
    flex-direction: column;
  }

  .hero-search-panel button,
  .search-page-form button {
    width: 100%;
  }

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

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

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

  .ranking-row {
    grid-template-columns: 42px 54px minmax(0, 1fr);
  }

  .ranking-meta {
    grid-column: 3;
  }

  .ranking-row img {
    width: 54px;
    height: 72px;
  }

  .meta-list div {
    grid-template-columns: 1fr;
  }
}
