:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --cyan: #06b6d4;
  --blue: #2563eb;
  --dark: #0f172a;
  --dark-soft: #1e293b;
  --shadow: 0 18px 55px rgba(15, 23, 42, 0.13);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(6, 182, 212, 0.08), transparent 32rem), var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

img,
video {
  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: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.28);
}

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

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

.brand-mark,
.footer-logo span {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #38bdf8, #06b6d4, #2563eb);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(6, 182, 212, 0.35);
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 14px;
  font-weight: 600;
}

.site-nav a {
  position: relative;
  padding: 8px 0;
  color: rgba(255, 255, 255, 0.86);
  transition: color 0.2s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 99px;
  background: var(--cyan);
  transition: width 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: #67e8f9;
}

.site-nav a:hover::after,
.site-nav a.active::after {
  width: 100%;
}

.menu-button {
  display: none;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 12px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  background: #020617;
  color: #ffffff;
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 18%, rgba(6, 182, 212, 0.33), transparent 32rem),
    radial-gradient(circle at 85% 20%, rgba(37, 99, 235, 0.26), transparent 30rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.05), #020617 90%);
}

.hero-inner {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  align-items: center;
  gap: 56px;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: -60px calc(50% - 50vw);
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.93), rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.92)), var(--hero-bg);
  background-size: cover;
  background-position: center;
  filter: blur(2px) saturate(1.1);
  opacity: 0.62;
  z-index: -1;
}

.hero-slide.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.hero-copy h1 {
  margin: 14px 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 720px;
  color: rgba(226, 232, 240, 0.95);
  font-size: 18px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-tags,
.detail-meta,
.movie-meta,
.rank-info div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

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

.hero-tags span,
.detail-meta span,
.tag-row span,
.movie-meta span,
.rank-info div span {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(15, 23, 42, 0.08);
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span,
.detail-meta span,
.detail-tags span {
  background: rgba(255, 255, 255, 0.11);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

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

.primary-button,
.ghost-button,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.32);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.hero-poster {
  position: relative;
  display: block;
  border-radius: 34px;
  overflow: hidden;
  aspect-ratio: 3 / 4.1;
  box-shadow: 0 35px 85px rgba(0, 0, 0, 0.42);
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.hero-poster::after,
.poster-frame::after,
.detail-poster::after,
.rank-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.45));
  pointer-events: none;
}

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

.hero-dots {
  position: absolute;
  left: 0;
  bottom: 44px;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 38px;
  height: 5px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

.hero-dots button.active {
  background: #67e8f9;
}

.intro-panel {
  margin-top: -54px;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 28px;
  padding: 30px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.intro-panel h2,
.section-head h2,
.sub-hero h1,
.detail-copy h1,
.content-card h2 {
  margin: 8px 0 10px;
  line-height: 1.18;
}

.intro-panel h2,
.section-head h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.intro-panel p,
.section-head p,
.sub-hero p,
.category-overview-card p,
.content-card p,
.rank-info p,
.movie-card-body p {
  color: var(--muted);
}

.intro-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: center;
}

.intro-links a,
.category-card,
.category-overview-card a {
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.intro-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #0f172a;
  font-weight: 700;
}

.container + .container,
.container.split-section,
.detail-main {
  margin-top: 70px;
}

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

.section-head p {
  max-width: 680px;
}

.section-link {
  color: var(--blue);
  border: 1px solid rgba(37, 99, 235, 0.18);
  background: rgba(37, 99, 235, 0.06);
  white-space: nowrap;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.9);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.14);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.1;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #334155);
}

.poster-frame img {
  transition: transform 0.35s ease;
}

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

.type-pill,
.year-pill,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
}

.type-pill {
  left: 12px;
  bottom: 12px;
  background: rgba(6, 182, 212, 0.86);
}

.year-pill {
  right: 12px;
  top: 12px;
}

.rank-badge {
  left: 12px;
  top: 12px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

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

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

.movie-card-body h3 a:hover,
.rank-info h2 a:hover {
  color: var(--cyan);
}

.movie-card-body p {
  margin: 0 0 12px;
  font-size: 14px;
  min-height: 46px;
}

.movie-meta {
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 12px;
}

.movie-meta span {
  padding: 3px 8px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.compact-card .movie-card-body h3 {
  font-size: 15px;
}

.compact-card .movie-card-body p {
  display: none;
}

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

.category-card {
  min-height: 150px;
  padding: 24px;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card span,
.category-overview-card h2 {
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
}

.category-card strong {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.category-card:hover,
.category-overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px rgba(6, 182, 212, 0.13);
}

.sub-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 86px 0;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #1e293b 55%, #0e7490);
}

.sub-hero p {
  max-width: 760px;
  color: #cbd5e1;
  font-size: 18px;
}

.sub-hero h1 {
  font-size: clamp(38px, 6vw, 62px);
}

.category-overview-card a {
  display: block;
  min-height: 210px;
  padding: 28px;
  border-radius: 24px;
}

.category-overview-card strong {
  display: inline-flex;
  margin-top: 18px;
  color: var(--blue);
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 170px 180px;
  gap: 12px;
  padding: 18px;
  margin-bottom: 26px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--text);
  background: #f8fafc;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 86px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.rank-number {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  color: #ffffff;
  font-weight: 900;
}

.rank-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a, #334155);
}

.rank-info h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.rank-info p {
  margin: 0 0 8px;
  font-size: 14px;
}

.detail-hero {
  min-height: 650px;
  padding: 72px 0;
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.78), rgba(2, 6, 23, 0.94)), var(--detail-bg);
  background-size: cover;
  background-position: center;
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 32px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: #67e8f9;
}

.detail-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 30px;
  aspect-ratio: 3 / 4.1;
  background: linear-gradient(135deg, #0f172a, #334155);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.45);
}

.detail-copy h1 {
  font-size: clamp(38px, 6vw, 66px);
}

.detail-copy p {
  max-width: 780px;
  color: #e2e8f0;
  font-size: 18px;
}

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

.small-actions {
  margin-top: 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 30px 75px rgba(15, 23, 42, 0.25);
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000000;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(6, 182, 212, 0.22), rgba(2, 6, 23, 0.56));
  cursor: pointer;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  border-radius: 50%;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  font-size: 32px;
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.35);
}

.content-card {
  margin-top: 24px;
  padding: 30px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
}

.content-card h2 {
  font-size: 26px;
}

.content-card p {
  font-size: 17px;
}

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

.site-footer {
  margin-top: 86px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr;
  gap: 44px;
  padding: 54px 0;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.footer-brand p {
  max-width: 480px;
  color: #94a3b8;
}

.footer-block h2 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: 18px;
}

.footer-block ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-block li + li {
  margin-top: 8px;
}

.footer-block a:hover {
  color: #67e8f9;
}

.copyright {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding: 18px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 14px 35px rgba(37, 99, 235, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
}

.back-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

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

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

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

  .site-nav {
    gap: 14px;
  }
}

@media (max-width: 820px) {
  .menu-button {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px;
    border-radius: 18px;
    background: #0f172a;
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.3);
  }

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

  .site-nav a {
    padding: 10px 12px;
    border-radius: 12px;
  }

  .hero,
  .hero-inner {
    min-height: 760px;
  }

  .hero-slide,
  .detail-layout,
  .intro-panel,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-slide {
    gap: 28px;
    padding: 46px 0 90px;
  }

  .hero-poster {
    max-width: 280px;
  }

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

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

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

@media (max-width: 540px) {
  .brand-text {
    font-size: 16px;
  }

  .hero,
  .hero-inner {
    min-height: 820px;
  }

  .hero-copy p,
  .detail-copy p,
  .sub-hero p {
    font-size: 16px;
  }

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

  .rank-item {
    grid-template-columns: 42px 70px 1fr;
    gap: 10px;
  }

  .rank-info p {
    display: none;
  }

  .content-card {
    padding: 22px;
  }
}
