:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --muted: #94a3b8;
  --text: #f8fafc;
  --soft: #cbd5e1;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --red: #b91c1c;
  --red-deep: #450a0a;
  --line: rgba(148, 163, 184, 0.18);
  --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;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(185, 28, 28, 0.24), transparent 34rem), linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
  z-index: -1;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(127, 29, 29, 0.92), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(248, 113, 113, 0.24);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(16px);
}

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

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber-light), var(--red));
  color: white;
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

.brand-text {
  font-size: clamp(1.12rem, 2vw, 1.55rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #fde68a, #fca5a5, #fde68a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link,
.mobile-link {
  color: #e2e8f0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--amber-light);
}

.nav-dropdown {
  position: relative;
}

.nav-drop-panel {
  position: absolute;
  right: 0;
  top: 130%;
  display: grid;
  gap: 10px;
  min-width: 160px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all 0.22s ease;
}

.nav-dropdown:hover .nav-drop-panel,
.nav-dropdown:focus-within .nav-drop-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-drop-panel a {
  color: var(--soft);
  white-space: nowrap;
}

.nav-drop-panel a:hover {
  color: var(--amber-light);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.6);
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: #e2e8f0;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  border-top: 1px solid rgba(248, 113, 113, 0.2);
}

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

.mobile-link {
  padding: 12px 0;
}

.hero {
  position: relative;
  min-height: clamp(640px, 78vh, 820px);
  overflow: hidden;
  border-bottom: 1px solid rgba(248, 113, 113, 0.18);
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.9s ease, transform 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 3%, rgba(2, 6, 23, 0.68) 45%, rgba(2, 6, 23, 0.2) 100%), radial-gradient(circle at 20% 70%, rgba(245, 158, 11, 0.22), transparent 30rem), linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.28));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: end;
  min-height: clamp(640px, 78vh, 820px);
  padding: 96px 0 72px;
}

.hero-panel {
  width: min(760px, 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(245, 158, 11, 0.34);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.52);
  color: #fde68a;
  font-size: 0.92rem;
  backdrop-filter: blur(12px);
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  font-size: clamp(2.6rem, 7vw, 6.4rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
  text-shadow: 0 18px 70px rgba(0, 0, 0, 0.55);
}

.hero h1 span,
.hero h2 span {
  display: block;
  background: linear-gradient(90deg, #fff7ed, #fbbf24, #f87171);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  max-width: 680px;
  margin: 0 0 28px;
  color: #e2e8f0;
  font-size: clamp(1rem, 1.8vw, 1.28rem);
  line-height: 1.8;
}

.hero-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

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

.btn-primary {
  background: linear-gradient(90deg, var(--amber), var(--red));
  color: white;
  box-shadow: 0 18px 36px rgba(185, 28, 28, 0.28);
}

.btn-secondary {
  border-color: rgba(226, 232, 240, 0.22);
  background: rgba(15, 23, 42, 0.62);
  color: #e2e8f0;
  backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  border-color: rgba(245, 158, 11, 0.5);
  color: #fde68a;
}

.hero-controls {
  position: absolute;
  inset: auto 0 34px 0;
  z-index: 4;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 42px;
  background: var(--amber-light);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: white;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-arrow.prev {
  left: 20px;
}

.hero-arrow.next {
  right: 20px;
}

.hero-search {
  position: relative;
  z-index: 6;
  display: flex;
  width: min(620px, 100%);
  margin-top: 28px;
  padding: 6px;
  border: 1px solid rgba(248, 250, 252, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(16px);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 18px;
  background: transparent;
  color: white;
}

.hero-search button {
  border: 0;
}

.main-content {
  padding: 68px 0;
}

.page-hero {
  border-bottom: 1px solid rgba(248, 113, 113, 0.18);
  background: linear-gradient(90deg, rgba(127, 29, 29, 0.36), rgba(245, 158, 11, 0.16));
}

.page-hero .container {
  padding: 64px 0;
}

.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2.1rem, 5vw, 4rem);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--soft);
  line-height: 1.8;
}

.section {
  margin-bottom: 76px;
}

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

.section-heading h2 {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  letter-spacing: -0.035em;
}

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

.section-more {
  color: var(--amber-light);
  white-space: nowrap;
}

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

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

.movie-card,
.category-card,
.info-panel,
.rank-card,
.detail-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.82));
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.24);
}

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.42);
  box-shadow: 0 22px 65px rgba(185, 28, 28, 0.2);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #020617;
}

.card-cover img,
.rank-cover img,
.detail-poster img,
.related-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.92));
}

.card-score {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.92);
  color: #111827;
  font-weight: 900;
  font-size: 0.82rem;
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.9);
  color: white;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.82);
  transition: all 0.25s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: block;
  min-height: 48px;
  color: #f8fafc;
  font-weight: 800;
  line-height: 1.45;
}

.card-title:hover,
.rank-title:hover,
.related-mini:hover strong {
  color: var(--amber-light);
}

.card-desc {
  display: -webkit-box;
  min-height: 46px;
  margin: 8px 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.card-tags span,
.detail-tags a,
.tag-pill {
  display: inline-flex;
  padding: 5px 9px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.08);
  color: #fcd34d;
  font-size: 0.78rem;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #94a3b8;
  font-size: 0.86rem;
}

.horizontal-list {
  display: grid;
  gap: 16px;
}

.horizontal-card {
  display: grid;
  grid-template-columns: 124px 1fr;
  min-height: 170px;
}

.horizontal-card .card-cover {
  aspect-ratio: auto;
  height: 100%;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 24px;
  border-radius: 24px;
}

.category-card::before {
  content: "";
  position: absolute;
  inset: -50% auto auto -20%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.26), transparent 70%);
}

.category-card h3 {
  position: relative;
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.category-card p {
  position: relative;
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.65;
}

.category-card span {
  position: relative;
  color: var(--amber-light);
  font-weight: 700;
}

.filter-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 26px;
}

.filter-bar input,
.filter-bar select,
.search-panel input,
.search-panel select {
  min-height: 48px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.82);
  color: #f8fafc;
  outline: 0;
}

.filter-bar input,
.search-panel input {
  flex: 1;
  min-width: 0;
  padding: 0 16px;
}

.filter-bar select,
.search-panel select {
  padding: 0 14px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 58px 92px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 18px;
}

.rank-number {
  color: var(--amber-light);
  font-size: 1.4rem;
  font-weight: 900;
  text-align: center;
}

.rank-cover {
  display: block;
  width: 92px;
  height: 124px;
  overflow: hidden;
  border-radius: 14px;
}

.rank-info p {
  margin: 8px 0 10px;
  color: var(--muted);
  line-height: 1.6;
}

.rank-title {
  font-size: 1.08rem;
  font-weight: 800;
}

.rank-action {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
  font-weight: 700;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 360px;
  gap: 28px;
}

.player-shell {
  overflow: hidden;
  border: 1px solid rgba(248, 113, 113, 0.22);
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.24), rgba(0, 0, 0, 0.54));
  color: white;
  cursor: pointer;
  transition: opacity 0.25s ease;
}

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

.play-button {
  display: inline-grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--red));
  box-shadow: 0 22px 55px rgba(185, 28, 28, 0.36);
  font-size: 2rem;
}

.detail-title {
  margin: 26px 0 14px;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.15;
  letter-spacing: -0.045em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.detail-meta span {
  padding: 7px 12px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--soft);
}

.detail-card {
  margin-bottom: 22px;
  padding: 24px;
  border-radius: 22px;
}

.detail-card h2,
.detail-card h3 {
  margin: 0 0 14px;
}

.detail-card p {
  margin: 0;
  color: #dbe4f0;
  line-height: 1.9;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.detail-aside {
  position: sticky;
  top: 92px;
  align-self: start;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 2 / 3;
  box-shadow: var(--shadow);
}

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

.related-mini {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.66);
}

.related-mini img {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
}

.related-mini strong {
  display: block;
  margin-bottom: 7px;
  line-height: 1.4;
}

.related-mini span {
  color: var(--muted);
  font-size: 0.86rem;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr 160px 160px auto;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.search-panel button {
  border: 0;
}

.search-results-title {
  margin: 28px 0 18px;
  color: var(--soft);
}

.site-footer {
  border-top: 1px solid rgba(248, 113, 113, 0.18);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), #020617);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 48px 0;
}

.footer-column h3 {
  margin: 0 0 14px;
  color: #fde68a;
}

.footer-column p,
.footer-column a,
.footer-bottom {
  color: var(--muted);
  line-height: 1.7;
}

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

.footer-column a:hover {
  color: var(--amber-light);
}

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  text-align: center;
}

.empty-state {
  display: none;
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.7);
  color: var(--muted);
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

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

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

  .detail-aside {
    position: static;
  }

  .detail-poster {
    max-width: 320px;
  }
}

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

  .menu-toggle {
    display: flex;
  }

  .hero-arrow {
    display: none;
  }

  .hero-search,
  .filter-bar,
  .search-panel {
    display: grid;
    grid-template-columns: 1fr;
    border-radius: 20px;
  }

  .hero-search input {
    min-height: 46px;
  }

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

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

  .horizontal-card,
  .rank-card {
    grid-template-columns: 96px 1fr;
  }

  .rank-number,
  .rank-action {
    display: none;
  }

  .rank-cover {
    width: 96px;
    height: 132px;
  }

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

  .detail-title {
    margin-top: 22px;
  }
}

@media (max-width: 480px) {
  .header-inner,
  .footer-inner,
  .container,
  .mobile-nav {
    width: min(100% - 24px, 1180px);
  }

  .movie-grid,
  .movie-grid.compact {
    grid-template-columns: 1fr;
  }

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

  .hero {
    min-height: 720px;
  }

  .hero-content {
    min-height: 720px;
    padding-bottom: 86px;
  }
}
