:root {
  --bg: #070a12;
  --bg-soft: #0d1220;
  --panel: rgba(17, 24, 39, 0.86);
  --panel-strong: rgba(24, 31, 48, 0.94);
  --text: #f8fafc;
  --muted: #a7b0c0;
  --line: rgba(255, 255, 255, 0.1);
  --orange: #fb923c;
  --orange-strong: #f97316;
  --red: #dc2626;
  --gold: #facc15;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.22), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(220, 38, 38, 0.16), transparent 32rem),
    linear-gradient(180deg, #080b14 0%, #090d18 42%, #070a12 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

main {
  overflow: hidden;
}

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

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--orange), var(--red));
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.28);
}

.brand-text {
  font-size: 1.08rem;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  font-size: 0.95rem;
  color: #dbe3ee;
}

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

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--orange);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: white;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1260px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

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

.hero-carousel {
  position: relative;
  width: min(1260px, calc(100% - 32px));
  min-height: 660px;
  margin: 32px auto 0;
  border-radius: 36px;
  overflow: hidden;
  background: #111827;
  box-shadow: var(--shadow);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 11, 20, 0.94), rgba(8, 11, 20, 0.58) 48%, rgba(8, 11, 20, 0.1)),
    radial-gradient(circle at 20% 18%, rgba(249, 115, 22, 0.26), transparent 32rem);
  z-index: 2;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  align-items: center;
  gap: 36px;
  padding: 68px;
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.8s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.4), rgba(7, 10, 18, 0.7));
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
  filter: saturate(1.08) contrast(1.03);
}

.hero-content {
  position: relative;
  z-index: 4;
  max-width: 760px;
}

.hero-kicker,
.detail-heading span,
.page-hero span,
.section-heading span {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: #fed7aa;
  font-weight: 800;
}

.hero-kicker span,
.detail-heading span,
.page-hero span,
.section-heading span {
  width: auto;
}

.hero-kicker span,
.detail-heading > span,
.page-hero > div > span,
.section-heading > span {
  padding: 7px 12px;
  border: 1px solid rgba(251, 146, 60, 0.32);
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.12);
}

.hero-content h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(2.35rem, 6vw, 5.5rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-content p {
  margin: 24px 0 0;
  max-width: 700px;
  color: #dbe3ee;
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  line-height: 1.9;
}

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

.primary-btn,
.ghost-btn,
.card-actions a,
.section-heading a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn,
.card-actions a:first-child {
  color: white;
  background: linear-gradient(135deg, var(--orange-strong), var(--red));
  box-shadow: 0 14px 34px rgba(249, 115, 22, 0.26);
}

.ghost-btn,
.card-actions a:last-child,
.section-heading a {
  border: 1px solid var(--line);
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.07);
}

.primary-btn:hover,
.ghost-btn:hover,
.card-actions a:hover,
.section-heading a:hover {
  transform: translateY(-2px);
}

.hero-poster {
  position: relative;
  z-index: 4;
  display: block;
  justify-self: end;
  width: min(360px, 100%);
  aspect-ratio: 2 / 3;
  border-radius: 30px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.32), rgba(127, 29, 29, 0.42));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.5);
  transform: rotate(2deg);
}

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

.hero-dots {
  position: absolute;
  left: 68px;
  bottom: 44px;
  z-index: 5;
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--orange), var(--red));
}

.section-block,
.home-search-block,
.filter-shell,
.detail-shell {
  width: min(1260px, calc(100% - 32px));
  margin: 56px auto;
}

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

.section-heading.wide {
  display: block;
  text-align: center;
  max-width: 840px;
  margin: 0 auto 28px;
}

.section-heading h2,
.filter-copy h2,
.detail-content h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  line-height: 1.15;
}

.section-heading p,
.filter-copy p,
.page-hero p {
  color: var(--muted);
  line-height: 1.8;
}

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

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

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

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 146, 60, 0.44);
  box-shadow: 0 24px 66px rgba(0, 0, 0, 0.36);
}

.poster-link,
.poster-frame {
  display: block;
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 10%, rgba(251, 146, 60, 0.34), transparent 40%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(127, 29, 29, 0.62));
}

.poster-frame img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.25s ease;
}

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

.poster-frame img.is-missing,
.hero-backdrop img.is-missing,
.hero-poster img.is-missing,
.detail-poster img.is-missing {
  opacity: 0;
}

.poster-frame::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 50%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.7));
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(249, 115, 22, 0.95);
  color: white;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.32);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 44px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #111827;
  font-weight: 950;
  background: linear-gradient(135deg, var(--gold), var(--orange));
}

.card-body {
  padding: 16px;
}

.card-body h2 {
  margin: 0;
  min-height: 2.8em;
  font-size: 1rem;
  line-height: 1.4;
}

.card-body h2 a:hover {
  color: var(--orange);
}

.card-line {
  min-height: 4.8em;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.card-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.card-meta span,
.tag-row span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
}

.tag-row span {
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.12);
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.card-actions a {
  min-height: 38px;
  padding: 0 10px;
  font-size: 0.82rem;
}

.category-tile {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 90% 20%, rgba(249, 115, 22, 0.26), transparent 16rem),
    linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.94));
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.24);
}

.category-tile > a {
  display: block;
  padding: 26px;
}

.category-tile h2 {
  margin: 0;
  font-size: 1.45rem;
}

.category-tile p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 26px 24px;
}

.category-samples a {
  padding: 7px 10px;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.12);
  font-size: 0.82rem;
}

.filter-shell {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  gap: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.2);
}

.filter-controls {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  align-items: end;
}

.filter-controls label {
  display: grid;
  gap: 8px;
  color: #dbe3ee;
  font-weight: 700;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  color: white;
  background: rgba(255, 255, 255, 0.06);
  padding: 0 14px;
}

.filter-controls input:focus,
.filter-controls select:focus {
  border-color: rgba(251, 146, 60, 0.64);
  box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.11);
}

.no-results {
  grid-column: 1 / -1;
  margin: 0;
  padding: 16px;
  border-radius: 16px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.12);
}

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

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

.page-hero {
  width: min(1260px, calc(100% - 32px));
  margin: 32px auto 0;
  padding: 64px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 80% 10%, rgba(249, 115, 22, 0.24), transparent 28rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.94));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(2.1rem, 5vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.page-hero p {
  max-width: 760px;
  margin: 22px 0 0;
  font-size: 1.08rem;
}

.detail-shell {
  margin-top: 32px;
}

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

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

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

.player-panel,
.detail-side,
.detail-content {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 20px 56px rgba(0, 0, 0, 0.2);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.movie-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: white;
  background:
    radial-gradient(circle at center, rgba(249, 115, 22, 0.22), transparent 18rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.82));
  text-align: center;
  cursor: pointer;
  z-index: 3;
}

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

.play-circle {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-strong), var(--red));
  box-shadow: 0 18px 42px rgba(249, 115, 22, 0.34);
  font-size: 2rem;
}

.player-overlay strong {
  padding: 0 26px;
  font-size: clamp(1.1rem, 3vw, 2rem);
}

.detail-side {
  padding: 18px;
}

.detail-poster {
  display: block;
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.25), rgba(30, 41, 59, 0.94));
}

.detail-meta-card {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.detail-meta-card p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
}

.detail-meta-card strong {
  color: #fed7aa;
}

.detail-meta-card a {
  color: var(--orange);
}

.detail-content {
  margin-top: 24px;
  padding: 34px;
}

.detail-heading h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.detail-heading p,
.detail-content section p {
  color: #dbe3ee;
  line-height: 1.95;
  font-size: 1.02rem;
}

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

.detail-content section {
  margin-top: 28px;
}

.related-block {
  margin-top: 36px;
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.94));
}

.footer-inner {
  width: min(1260px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 28px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  font-size: 1rem;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
  color: var(--muted);
  line-height: 1.75;
  font-size: 0.94rem;
}

.footer-grid a:hover {
  color: var(--orange);
}

.footer-grid ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-bottom {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  text-align: center;
}

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

  .menu-toggle {
    display: block;
  }

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

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

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

  .hero-slide {
    grid-template-columns: 1fr;
    padding: 48px;
  }

  .hero-poster {
    display: none;
  }

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

  .detail-side {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 18px;
  }

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

@media (max-width: 760px) {
  .header-inner,
  .mobile-nav,
  .section-block,
  .home-search-block,
  .filter-shell,
  .detail-shell,
  .page-hero,
  .footer-inner,
  .hero-carousel {
    width: min(100% - 22px, 1260px);
  }

  .hero-carousel {
    min-height: 600px;
    border-radius: 26px;
  }

  .hero-slide {
    padding: 32px 24px 78px;
  }

  .hero-dots {
    left: 24px;
    bottom: 28px;
  }

  .hero-actions,
  .section-heading,
  .filter-shell,
  .filter-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .rank-list,
  .full-rank-list,
  .category-grid,
  .category-grid.large,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .card-body {
    padding: 12px;
  }

  .card-line {
    min-height: auto;
  }

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

  .page-hero,
  .detail-content {
    padding: 28px;
    border-radius: 24px;
  }

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

@media (max-width: 520px) {
  .movie-grid,
  .rank-list,
  .full-rank-list,
  .category-grid,
  .category-grid.large,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .mobile-nav {
    grid-template-columns: 1fr;
  }
}
