:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: rgba(17, 24, 39, 0.72);
  --panel-strong: rgba(17, 24, 39, 0.92);
  --line: rgba(251, 146, 60, 0.18);
  --line-soft: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #a1a1aa;
  --muted-2: #71717a;
  --accent: #f97316;
  --accent-2: #fb923c;
  --accent-dark: #7c2d12;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  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.18), transparent 36rem),
    linear-gradient(135deg, #111827 0%, #1f2937 36%, #050505 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 36px rgba(124, 45, 18, 0.16);
}

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

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #ef4444);
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.3);
}

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

.brand-text strong {
  color: var(--accent-2);
  font-size: 20px;
  letter-spacing: 0.01em;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  color: #d1d5db;
  font-weight: 600;
  transition: color .2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-2);
}

.menu-button {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(31, 41, 55, 0.78);
  color: #fff;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.96);
}

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

.hero-carousel {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #050505;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  align-items: center;
  gap: 48px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .6s ease;
  padding: 80px 0 110px;
}

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

.hero-backdrop {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 5, 5, 0.96), rgba(5, 5, 5, 0.72), rgba(5, 5, 5, 0.9)),
    var(--hero-bg) center / cover no-repeat;
  filter: blur(8px) saturate(1.15);
  transform: scale(1.04);
  opacity: .72;
  z-index: -1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero-content h1,
.sub-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 78px);
  line-height: .98;
  letter-spacing: -0.055em;
}

.hero-summary,
.sub-hero p,
.detail-one-line {
  color: #d4d4d8;
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.detail-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(31, 41, 55, 0.72);
  color: #e5e7eb;
  border: 1px solid var(--line-soft);
  font-size: 13px;
}

.hero-actions,
.sub-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

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

.primary-button {
  background: linear-gradient(135deg, var(--accent), #ef4444);
  color: white;
  box-shadow: 0 16px 38px rgba(249, 115, 22, .26);
}

.ghost-button {
  border: 1px solid var(--line);
  background: rgba(17, 24, 39, .68);
  color: white;
}

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

.hero-poster {
  position: relative;
  z-index: 2;
  display: block;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow), 0 0 60px rgba(249, 115, 22, 0.12);
}

.hero-poster img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  transition: transform .7s ease;
}

.hero-poster:hover img {
  transform: scale(1.05);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 4;
}

.hero-prev,
.hero-next,
.hero-dot {
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.68);
  color: #fff;
  cursor: pointer;
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 24px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 999px;
}

.hero-dot.active {
  width: 32px;
  background: var(--accent);
}

.sub-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 86px 0 72px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, .26), transparent 34rem),
    linear-gradient(135deg, rgba(17, 24, 39, 0.92), rgba(5, 5, 5, 0.94));
}

.sub-hero .container {
  max-width: 860px;
  margin-left: max(16px, calc((100% - 1180px) / 2));
}

.search-panel {
  margin: 48px 0;
  display: grid;
  grid-template-columns: 1fr minmax(300px, 520px);
  gap: 24px;
  align-items: end;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-panel h2,
.section-head h2,
.footer-links h2,
.article-block h2 {
  margin: 0;
  color: #fff;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 14px;
}

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

.filter-row input,
.filter-row select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  outline: none;
  color: #fff;
  background: rgba(3, 7, 18, 0.82);
}

.filter-row input:focus,
.filter-row select:focus {
  border-color: rgba(249, 115, 22, .7);
}

.section-block {
  margin: 64px 0;
}

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

.section-head h2 {
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.035em;
}

.section-head a {
  color: var(--accent-2);
  font-weight: 800;
}

.section-head.slim {
  display: block;
}

.featured-grid,
.movie-grid,
.category-grid {
  display: grid;
  gap: 22px;
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
  box-shadow: 0 18px 46px rgba(0, 0, 0, .22);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, background .22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(249, 115, 22, .45);
  background: rgba(31, 41, 55, .82);
  box-shadow: 0 24px 60px rgba(249, 115, 22, .12);
}

.card-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.card-cover img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  transition: transform .4s ease;
}

.movie-card-large .card-cover img {
  height: 360px;
}

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .72), transparent 58%);
}

.card-year,
.card-score {
  position: absolute;
  z-index: 2;
  padding: 6px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.card-year {
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, .72);
}

.card-score {
  left: 10px;
  top: 10px;
  background: rgba(249, 115, 22, .92);
}

.card-body {
  padding: 17px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.card-meta a,
.card-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(55, 65, 81, .72);
}

.card-meta a {
  color: var(--accent-2);
}

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

.movie-card h2 a:hover {
  color: var(--accent-2);
}

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

.tag-row span {
  padding: 5px 8px;
  font-size: 12px;
}

.category-tile {
  position: relative;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 10px;
  overflow: hidden;
  border-radius: 22px;
  padding: 20px;
  border: 1px solid var(--line-soft);
  background:
    linear-gradient(to top, rgba(0, 0, 0, .92), rgba(0, 0, 0, .18)),
    var(--tile-bg) center / cover no-repeat;
  transition: transform .22s ease, border-color .22s ease;
}

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

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

.category-tile strong {
  color: #d4d4d8;
  font-size: 13px;
  line-height: 1.55;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.rank-panel {
  position: sticky;
  top: 92px;
  padding: 22px;
  border-radius: 26px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 40px 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(31, 41, 55, .58);
  border: 1px solid var(--line-soft);
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.rank-item:hover {
  transform: translateX(3px);
  background: rgba(31, 41, 55, .88);
  border-color: rgba(249, 115, 22, .42);
}

.rank-no,
.rank-dot {
  color: var(--accent-2);
  font-weight: 900;
}

.rank-item img {
  width: 68px;
  height: 48px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-info {
  display: grid;
  min-width: 0;
}

.rank-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-score {
  color: #fff;
  font-weight: 900;
}

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

.category-overview-list {
  display: grid;
  gap: 32px;
  margin-top: 48px;
}

.category-overview-card {
  padding: 24px;
  border-radius: 26px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
}

.detail-hero {
  padding: 72px 0;
}

.detail-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 5, 5, .98), rgba(5, 5, 5, .72), rgba(5, 5, 5, .95)),
    var(--detail-bg) center / cover no-repeat;
  filter: blur(8px) saturate(1.1);
  transform: scale(1.05);
  opacity: .78;
}

.detail-layout {
  position: relative;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

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

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

.crumbs a:hover {
  color: var(--accent-2);
}

.detail-one-line {
  max-width: 760px;
}

.player-section {
  margin: 54px 0 34px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

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

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 16px;
  padding: 20px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: radial-gradient(circle, rgba(249, 115, 22, .18), rgba(0, 0, 0, .74));
}

.play-cover[hidden] {
  display: none;
}

.play-icon,
.screen-play {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ef4444);
  color: #fff;
  box-shadow: 0 18px 42px rgba(249, 115, 22, .32);
}

.play-cover strong {
  font-size: clamp(22px, 4vw, 36px);
}

.screen-play {
  position: absolute;
  left: 22px;
  bottom: 22px;
  z-index: 2;
  width: 54px;
  height: 54px;
  border: 0;
  cursor: pointer;
}

.player-shell.is-playing .screen-play {
  opacity: .16;
}

.player-shell.is-playing:hover .screen-play {
  opacity: 1;
}

.article-block {
  padding: 28px;
  border-radius: 26px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
}

.article-block p {
  color: #d4d4d8;
  font-size: 17px;
  line-height: 1.95;
}

.article-block h2 {
  margin-top: 28px;
}

.site-footer {
  margin-top: 80px;
  padding: 46px 0 28px;
  background: rgba(0, 0, 0, 0.78);
  border-top: 1px solid var(--line);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
}

.footer-brand p {
  max-width: 430px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
  margin-top: 16px;
}

.footer-links a {
  color: #d1d5db;
}

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

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 0;
  color: var(--muted-2);
  font-size: 13px;
}

.hidden {
  display: none !important;
}

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

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

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero-poster {
    display: none;
  }

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

  .two-column,
  .detail-layout,
  .search-panel,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .header-inner {
    height: 62px;
  }

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

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

  .hero-slide {
    padding: 70px 0 98px;
  }

  .hero-content h1,
  .sub-hero h1,
  .detail-info h1 {
    font-size: 40px;
  }

  .featured-grid,
  .movie-grid,
  .category-grid,
  .mini-grid,
  .full-rank {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-row {
    grid-template-columns: 1fr;
  }

  .card-cover img {
    height: 220px;
  }

  .detail-poster img {
    height: 420px;
  }

  .footer-links div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .container,
  .header-inner,
  .footer-inner,
  .copyright {
    width: min(100% - 22px, 1180px);
  }

  .hero-content h1,
  .sub-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

  .movie-grid,
  .featured-grid,
  .category-grid,
  .mini-grid,
  .full-rank {
    grid-template-columns: 1fr;
  }

  .search-panel,
  .article-block,
  .category-overview-card {
    padding: 18px;
  }

  .rank-item {
    grid-template-columns: 32px 58px minmax(0, 1fr) auto;
  }

  .rank-item img {
    width: 58px;
    height: 44px;
  }
}
