* {
  box-sizing: border-box;
}

:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(239, 68, 68, 0.48);
  --text: #ffffff;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --red: #ef4444;
  --red-dark: #dc2626;
  --red-soft: rgba(239, 68, 68, 0.14);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 0%, rgba(239, 68, 68, 0.14), transparent 32%), var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid rgba(30, 41, 59, 0.86);
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #ef4444, #fb7185);
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.32);
}

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

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

.nav-link {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--soft);
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #ffffff;
  background: rgba(239, 68, 68, 0.16);
}

.top-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 260px;
}

.top-search input {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.76);
  padding: 0 14px;
  outline: none;
}

.top-search input:focus {
  border-color: rgba(239, 68, 68, 0.62);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.top-search button {
  height: 38px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: var(--red);
  padding: 0 16px;
}

.top-search button:hover {
  background: var(--red-dark);
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.76);
}

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

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

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.78) 44%, rgba(2, 6, 23, 0.28) 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100% - 1180px) / 2));
  right: 24px;
  bottom: 74px;
  max-width: 760px;
}

.hero-tag,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(239, 68, 68, 0.9);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero-content h1 {
  margin: 18px 0 12px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 620px;
  margin: 0 0 26px;
  color: var(--soft);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-btn,
.ghost-btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn {
  background: var(--red);
  padding: 0 24px;
  color: #ffffff;
}

.primary-btn:hover {
  transform: translateY(-1px);
  background: var(--red-dark);
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.42);
  padding: 0 22px;
  color: #ffffff;
  backdrop-filter: blur(10px);
}

.ghost-btn:hover {
  border-color: rgba(239, 68, 68, 0.56);
  background: rgba(239, 68, 68, 0.12);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.48);
  font-size: 34px;
  line-height: 1;
  backdrop-filter: blur(12px);
}

.hero-arrow:hover {
  background: rgba(15, 23, 42, 0.82);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.75);
  padding: 0;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--red);
}

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

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

.section-kicker {
  padding: 5px 10px;
  font-size: 12px;
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.section-heading h2 {
  margin: 10px 0 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.16;
}

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

.section-more {
  border: 1px solid var(--line);
  color: var(--soft);
  padding: 0 18px;
  white-space: nowrap;
}

.section-more:hover {
  color: #ffffff;
  border-color: rgba(239, 68, 68, 0.58);
  background: rgba(239, 68, 68, 0.1);
}

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

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

.movie-card {
  position: relative;
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

.card-category,
.rank-badge,
.play-chip {
  position: absolute;
  z-index: 2;
}

.card-category {
  left: 12px;
  top: 12px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.92);
  color: #ffffff;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
}

.rank-badge {
  right: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(2, 6, 23, 0.78);
  color: #ffffff;
  font-weight: 900;
}

.play-chip {
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.86);
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.9);
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 8px;
  min-height: 2.7em;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.movie-card:hover .card-body h3 {
  color: #f87171;
}

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

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: #64748b;
  font-size: 12px;
}

.movie-card-compact {
  width: 278px;
  flex: 0 0 278px;
}

.scroll-row {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 2px 2px 20px;
  scrollbar-width: thin;
}

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

.category-tile {
  position: relative;
  min-height: 116px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.5));
  padding: 20px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: auto -20px -45px auto;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(239, 68, 68, 0.16);
}

.category-tile:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}

.category-tile span,
.category-tile em {
  position: relative;
  display: block;
}

.category-tile span {
  font-size: 20px;
  font-weight: 800;
}

.category-tile em {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.page-hero {
  position: relative;
  margin: 36px 0 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.68)), radial-gradient(circle at 90% 0%, rgba(239, 68, 68, 0.28), transparent 34%);
  padding: clamp(32px, 6vw, 64px);
}

.compact-hero h1 {
  margin: 16px 0 10px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
}

.compact-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--soft);
  font-size: 18px;
}

.overview-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.overview-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
}

.overview-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  height: 120px;
  background: #0f172a;
}

.overview-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overview-body {
  padding: 18px;
}

.overview-body h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.overview-body p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  padding: 16px;
}

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

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.78);
  color: #ffffff;
  padding: 0 12px;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(239, 68, 68, 0.62);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.empty-state {
  display: none;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  background: var(--panel);
  padding: 36px;
  text-align: center;
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 120px 1fr auto;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  padding: 12px 16px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: var(--line-strong);
}

.rank-num {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
  font-weight: 900;
}

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

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

.rank-info strong {
  color: #ffffff;
  font-size: 18px;
}

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

.rank-score {
  color: #fca5a5;
  font-size: 24px;
  font-weight: 900;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 28px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

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

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

.detail-main {
  display: grid;
  gap: 22px;
}

.player-card,
.detail-card,
.side-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.22);
}

.player-card {
  position: relative;
  overflow: hidden;
  background: #000000;
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  color: #ffffff;
  background: #020617;
  padding: 0;
  overflow: hidden;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.46;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.22), transparent 34%), linear-gradient(to top, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.24));
}

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

.player-glow {
  position: absolute;
  left: 50%;
  top: 46%;
  z-index: 2;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 16px rgba(239, 68, 68, 0.18), 0 22px 46px rgba(0, 0, 0, 0.4);
  font-size: 32px;
}

.player-cover strong {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
  font-size: clamp(22px, 3vw, 34px);
  text-align: left;
}

.detail-card {
  padding: clamp(22px, 4vw, 34px);
}

.detail-category {
  display: inline-flex;
  margin-bottom: 16px;
  border: 1px solid rgba(239, 68, 68, 0.34);
  border-radius: 999px;
  color: #fca5a5;
  background: var(--red-soft);
  padding: 7px 13px;
  font-weight: 700;
  font-size: 13px;
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.14;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.detail-meta span {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.62);
  padding: 6px 11px;
  font-size: 13px;
}

.detail-card section {
  margin-top: 26px;
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.detail-card p {
  margin: 0 0 12px;
  color: var(--soft);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.tag-list span {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.66);
  color: var(--soft);
  padding: 6px 11px;
  font-size: 13px;
}

.review-box {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.38);
  padding: 20px;
}

.detail-side {
  position: sticky;
  top: 96px;
}

.side-card {
  padding: 20px;
}

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

.related-card {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 12px;
  align-items: center;
}

.related-card img {
  width: 104px;
  height: 70px;
  object-fit: cover;
  border-radius: 12px;
}

.related-card strong,
.related-card em {
  display: block;
}

.related-card strong {
  color: #ffffff;
  line-height: 1.35;
}

.related-card:hover strong {
  color: #f87171;
}

.related-card em {
  margin-top: 4px;
  color: #64748b;
  font-style: normal;
  font-size: 12px;
}

.detail-related {
  width: 100%;
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid rgba(30, 41, 59, 0.86);
  background: rgba(2, 6, 23, 0.78);
}

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

.footer-inner p {
  margin: 6px 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--soft);
}

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

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

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

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

  .detail-side {
    position: static;
  }
}

@media (max-width: 860px) {
  .nav-shell {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    padding: 14px 0;
  }

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

  .site-nav {
    display: none;
    width: 100%;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    order: 3;
  }

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

  .nav-link {
    border-radius: 12px;
  }

  .top-search {
    width: 100%;
    min-width: 0;
    order: 4;
  }

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

  .hero-carousel {
    height: 520px;
  }

  .hero-content {
    left: 18px;
    bottom: 68px;
  }

  .hero-arrow {
    display: none;
  }

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

  .rank-row {
    grid-template-columns: 42px 86px 1fr;
  }

  .rank-row img {
    width: 86px;
    height: 58px;
  }

  .rank-score {
    grid-column: 3;
    font-size: 18px;
  }
}

@media (max-width: 640px) {
  .movie-grid,
  .featured-grid,
  .rank-list,
  .category-grid,
  .overview-grid {
    grid-template-columns: 1fr;
  }

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

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

  .movie-card-compact {
    width: 82vw;
    flex-basis: 82vw;
  }

  .related-card {
    grid-template-columns: 96px 1fr;
  }
}
