:root {
  --bg: #030712;
  --panel: rgba(17, 24, 39, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.95);
  --border: rgba(148, 163, 184, 0.16);
  --text: #ffffff;
  --muted: #9ca3af;
  --soft: #d1d5db;
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --green: #34d399;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(59, 130, 246, 0.22), transparent 32rem),
    radial-gradient(circle at 90% 10%, rgba(34, 211, 238, 0.12), transparent 28rem),
    var(--bg);
  font-family: Inter, 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%;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(18px);
}

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

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

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 28px rgba(59, 130, 246, 0.32);
  font-size: 14px;
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(90deg, #60a5fa, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: var(--soft);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 650;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.16);
}

.mobile-toggle {
  width: 42px;
  height: 42px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
}

.mobile-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #ffffff;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--panel-strong);
}

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

.mobile-link {
  padding: 12px 14px;
  border-radius: 12px;
}

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.92), rgba(3, 7, 18, 0.55), rgba(3, 7, 18, 0.18)),
    linear-gradient(0deg, #030712 0%, rgba(3, 7, 18, 0.22) 40%, rgba(3, 7, 18, 0.2) 100%);
}

.hero-copy {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(1180px, calc(100% - 32px));
  transform: translate(-50%, -46%);
  max-width: 760px;
}

.hero-label,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #93c5fd;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.96;
  letter-spacing: -0.055em;
  max-width: 780px;
}

.hero-copy p {
  max-width: 640px;
  margin: 22px 0 0;
  color: #d1d5db;
  font-size: clamp(17px, 2.1vw, 22px);
  line-height: 1.7;
}

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

.hero-tags {
  margin-top: 26px;
}

.hero-tags span,
.detail-tags a,
.tag-row span {
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.15);
}

.hero-tags span,
.detail-tags a {
  padding: 8px 13px;
  font-size: 13px;
}

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

.hero-actions,
.category-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.primary-button,
.ghost-button,
.rank-action,
.hero-search button,
.filter-bar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.hero-search button,
.rank-action {
  padding: 0 20px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 36px rgba(59, 130, 246, 0.28);
}

.ghost-button,
.filter-bar a {
  padding: 0 18px;
  color: #e5e7eb;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.68);
}

.primary-button:hover,
.ghost-button:hover,
.rank-action:hover,
.hero-search button:hover,
.filter-bar a:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 132px;
  z-index: 5;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.62);
  font-size: 28px;
  line-height: 1;
}

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

.hero-dot {
  width: 32px;
  height: 4px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}

.hero-dot.active {
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 54px;
  z-index: 5;
  width: min(720px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-search input,
.filter-bar input,
.search-panel input,
.search-panel select {
  border: 1px solid var(--border);
  outline: none;
  color: #ffffff;
  background: rgba(3, 7, 18, 0.72);
}

.hero-search input {
  min-width: 0;
  padding: 0 18px;
  border-color: transparent;
  border-radius: 999px;
}

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

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

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

.section-heading h2,
.page-hero h1,
.detail-info h1,
.detail-text h2 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.section-heading h2,
.page-hero h1 {
  font-size: clamp(30px, 4vw, 48px);
}

.section-heading p,
.page-hero p,
.detail-one-line,
.detail-text p,
.movie-card p,
.overview-card p,
.category-card p,
.rank-content p,
.footer-brand p {
  color: var(--muted);
  line-height: 1.7;
}

.section-heading a {
  color: #93c5fd;
  font-weight: 800;
}

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

.category-card,
.overview-card,
.movie-card,
.ranking-panel,
.rank-item,
.detail-hero,
.video-shell,
.detail-text,
.search-panel,
.filter-bar {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.88), rgba(15, 23, 42, 0.68));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.category-card,
.overview-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.category-card img,
.overview-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-card::after,
.overview-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(3, 7, 18, 0.92), rgba(3, 7, 18, 0.2));
}

.category-card span,
.category-card p,
.overview-card div {
  position: relative;
  z-index: 1;
}

.category-card span,
.overview-card span {
  font-size: 22px;
  font-weight: 900;
}

.category-card:hover img,
.overview-card:hover img {
  transform: scale(1.08);
  opacity: 0.42;
}

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

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

.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(-7px);
  border-color: rgba(96, 165, 250, 0.46);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

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

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(3, 7, 18, 0.86), transparent);
}

.movie-card-body {
  padding: 18px;
}

.movie-meta,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 750;
}

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

.movie-card h3 a:hover,
.rank-content h3 a:hover {
  color: #93c5fd;
}

.tag-row {
  margin-top: 14px;
}

.split-section {
  width: min(1380px, calc(100% - 32px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 28px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 92px;
  border-radius: var(--radius);
  padding: 18px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-weight: 900;
}

.panel-heading a {
  color: #93c5fd;
  font-size: 13px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 72px 46px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
}

.rank-cover {
  width: 72px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: #111827;
}

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

.rank-number {
  color: #67e8f9;
  font-size: 22px;
  font-weight: 950;
}

.rank-content h3 {
  margin: 0 0 5px;
  font-size: 17px;
}

.rank-content p {
  margin: 0 0 6px;
  font-size: 13px;
}

.rank-action {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 40px auto 0;
  padding: 70px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 32px;
  background:
    radial-gradient(circle at 12% 20%, rgba(59, 130, 246, 0.36), transparent 24rem),
    radial-gradient(circle at 82% 10%, rgba(34, 211, 238, 0.2), transparent 20rem),
    rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow);
}

.page-hero p {
  max-width: 720px;
  margin: 18px 0 0;
  font-size: 18px;
}

.filter-bar,
.search-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 26px;
  padding: 12px;
  border-radius: 22px;
}

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

.search-panel {
  grid-template-columns: 1fr 210px;
}

.filter-bar input,
.search-panel input,
.search-panel select {
  min-height: 48px;
  width: 100%;
  padding: 0 16px;
  border-radius: 16px;
}

.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #93c5fd;
}

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px;
  border-radius: 32px;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

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

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

.detail-info h1 {
  font-size: clamp(34px, 5vw, 62px);
}

.detail-one-line {
  margin: 18px 0;
  font-size: 19px;
}

.detail-meta {
  margin: 0 0 18px;
}

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

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

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
}

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

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: #ffffff;
  border: 0;
  background: linear-gradient(0deg, rgba(3, 7, 18, 0.82), rgba(3, 7, 18, 0.34));
}

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

.play-ring {
  width: 88px;
  height: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 16px 44px rgba(59, 130, 246, 0.42);
}

.play-ring span {
  margin-left: 5px;
  font-size: 28px;
}

.detail-text {
  border-radius: 28px;
  padding: 32px;
}

.narrow-section {
  max-width: 900px;
}

.detail-text h2 {
  margin-top: 0;
  font-size: 28px;
}

.detail-text p + h2 {
  margin-top: 30px;
}

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

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

.footer-brand {
  max-width: 580px;
}

.footer-logo {
  margin-bottom: 12px;
}

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

.footer-links a {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--soft);
}

.footer-links a:hover {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.16);
}

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

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

  .split-section {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }
}

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

  .mobile-toggle {
    display: inline-flex;
  }

  .hero-copy {
    transform: translate(-50%, -50%);
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: clamp(38px, 13vw, 58px);
  }

  .hero-actions,
  .category-actions {
    gap: 10px;
  }

  .hero-controls {
    bottom: 122px;
  }

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

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

  .page-hero {
    padding: 38px 24px;
  }

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

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

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

  .rank-action {
    grid-column: 3;
    width: fit-content;
  }

  .footer-inner {
    flex-direction: column;
  }
}

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

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

  .hero {
    min-height: 760px;
  }

  .hero-tags span:nth-child(n+4) {
    display: none;
  }

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

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

  .section-heading {
    display: block;
  }

  .section-heading a {
    display: inline-block;
    margin-top: 12px;
  }
}
