:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-solid: #0f172a;
  --soft: #1e293b;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --orange: #ea580c;
  --green: #22c55e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 34rem), 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;
}

body::-webkit-scrollbar {
  width: 8px;
}

body::-webkit-scrollbar-track {
  background: #0f172a;
}

body::-webkit-scrollbar-thumb {
  background: rgba(245, 158, 11, 0.65);
  border-radius: 999px;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.54), transparent);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px);
}

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

.nav-shell {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: white;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.32);
  font-size: 14px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #cbd5e1;
  font-size: 15px;
}

.nav-links a:hover,
.footer-links a:hover,
.section-head a:hover,
.breadcrumb a:hover {
  color: var(--amber-light);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.6);
  color: white;
  padding: 9px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: white;
  border-radius: 99px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-panel a {
  display: block;
  padding: 10px 12px;
  color: #e2e8f0;
}

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-bg,
.detail-backdrop img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-dim,
.detail-backdrop span {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.76) 48%, rgba(2, 6, 23, 0.15) 100%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1180px;
  padding-top: 68px;
}

.hero-copy h1 {
  max-width: 740px;
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 660px;
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: 19px;
}

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

.hero-tags {
  margin-bottom: 18px;
}

.hero-tags span,
.tag-row span {
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.13);
  color: var(--amber-light);
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 700;
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  color: #cbd5e1;
}

.hero-meta {
  margin-bottom: 32px;
}

.hero-meta span:first-child,
.detail-meta span:first-child,
.card-meta span:first-child {
  color: var(--amber-light);
  font-weight: 800;
}

.hero-actions,
.section-head,
.filter-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

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

.primary-button {
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: white;
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.28);
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(15, 23, 42, 0.4);
  color: white;
  backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover,
.movie-card:hover,
.category-card:hover,
.rank-item:hover,
.overview-card:hover {
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.32);
  color: white;
  font-size: 32px;
  backdrop-filter: blur(12px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 16px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.search-band,
.content-section,
.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.search-band {
  padding: 54px 0 18px;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-head.centered {
  display: block;
  text-align: center;
}

.section-head.tight {
  margin-bottom: 16px;
}

.section-head h2,
.detail-text h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
}

.section-head p,
.page-hero p,
.detail-line,
.footer-shell p,
.overview-card p,
.category-desc,
.card-body p,
.detail-text p {
  color: var(--muted);
}

.section-head a {
  color: var(--amber-light);
  font-weight: 700;
}

.search-box {
  max-width: 760px;
  margin: 26px auto 0;
}

.search-box input,
.filter-row input,
.filter-row select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.82);
  color: white;
  outline: none;
}

.search-box input {
  height: 58px;
  padding: 0 22px;
  font-size: 17px;
  box-shadow: var(--shadow);
}

.filter-row {
  flex-wrap: wrap;
  margin-top: 24px;
}

.filter-row input {
  flex: 1 1 260px;
  height: 48px;
  padding: 0 16px;
}

.filter-row select {
  flex: 0 0 160px;
  height: 48px;
  padding: 0 14px;
}

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

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

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

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

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

.movie-card,
.category-card,
.overview-card,
.ranking-panel,
.detail-text,
.player-box,
.info-table {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px);
}

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

.movie-card[hidden] {
  display: none;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

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

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

.card-shadow {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), transparent 60%);
  opacity: 0.75;
}

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

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

.card-duration {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.66);
  color: white;
  font-size: 12px;
}

.card-body {
  padding: 14px;
}

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

.card-body h3 a:hover {
  color: var(--amber-light);
}

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

.card-meta {
  gap: 9px;
  margin-bottom: 12px;
  font-size: 13px;
}

.tag-row span {
  padding: 4px 8px;
  font-size: 11px;
}

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

.category-card,
.overview-card {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: 24px;
  padding: 20px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-name,
.overview-title {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
  font-weight: 900;
}

.category-desc {
  position: relative;
  z-index: 2;
  display: block;
  font-size: 13px;
}

.category-covers {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  opacity: 0.48;
}

.category-covers img {
  height: 86px;
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
  transform: rotate(-4deg);
}

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

.ranking-panel {
  position: sticky;
  top: 88px;
  border-radius: 24px;
  padding: 20px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 34px 68px 1fr;
  gap: 12px;
  align-items: center;
  border-radius: 16px;
  padding: 10px;
  background: rgba(30, 41, 59, 0.62);
  transition: transform 0.2s ease, background 0.2s ease;
}

.rank-item img {
  width: 68px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
}

.rank-no {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.14);
  color: var(--amber-light);
  font-weight: 900;
}

.rank-copy strong,
.rank-copy small {
  display: block;
}

.rank-copy strong {
  overflow: hidden;
  color: white;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-copy small {
  color: var(--muted);
  font-size: 12px;
}

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

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

.page-hero {
  padding: 72px 0 28px;
}

.small-hero,
.channel-hero {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.breadcrumb {
  margin: 0 0 18px;
  color: #cbd5e1;
  font-size: 14px;
}

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

.overview-card {
  min-height: 0;
}

.overview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.overview-links a {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-size: 13px;
}

.detail-main {
  padding-bottom: 48px;
}

.detail-hero {
  position: relative;
  min-height: 660px;
  overflow: hidden;
  padding-top: 68px;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  filter: saturate(1.08);
}

.detail-backdrop span {
  background: linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.88) 42%, rgba(2, 6, 23, 0.55) 100%);
}

.detail-shell {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0 42px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 38px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.detail-line {
  max-width: 780px;
  margin: 0 0 22px;
  font-size: 19px;
}

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

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

.player-section {
  margin-top: -52px;
  position: relative;
  z-index: 4;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: black;
}

.player-box video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.2), rgba(2, 6, 23, 0.68));
  color: white;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 24px 58px rgba(245, 158, 11, 0.34);
  font-size: 34px;
}

.player-overlay strong {
  font-size: 18px;
}

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

.player-state {
  position: absolute;
  left: 18px;
  bottom: 14px;
  margin: 0;
  color: #cbd5e1;
  font-size: 13px;
}

.detail-text {
  border-radius: 26px;
  padding: 30px;
}

.detail-text h2 {
  margin: 0 0 12px;
}

.detail-text p {
  margin: 0 0 24px;
  font-size: 17px;
}

.info-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border-radius: 20px;
  background: var(--line);
}

.info-table div {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.92);
}

.info-table dt {
  color: var(--muted);
}

.info-table dd {
  margin: 0;
  color: white;
}

.site-footer {
  margin-top: 50px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.72);
}

.footer-shell {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 30px;
  padding: 42px 0;
}

.footer-logo {
  margin-bottom: 10px;
  font-size: 20px;
}

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

.footer-links a {
  color: #cbd5e1;
}

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

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

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

  .ranking-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .site-header.is-open .mobile-panel {
    display: block;
  }

  .hero-slider {
    min-height: 620px;
  }

  .hero-copy h1 {
    font-size: 48px;
  }

  .hero-arrow {
    display: none;
  }

  .movie-grid,
  .home-grid,
  .related-grid,
  .featured-three,
  .large-rank {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

  .info-table,
  .footer-shell {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 540px) {
  .hero-slider {
    height: auto;
    min-height: 600px;
  }

  .hero-copy {
    padding-top: 96px;
  }

  .hero-copy h1,
  .detail-copy h1,
  .page-hero h1 {
    font-size: 38px;
  }

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

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .movie-grid,
  .home-grid,
  .related-grid,
  .featured-three,
  .large-rank {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 30px 62px 1fr;
  }

  .content-section,
  .page-hero {
    padding: 34px 0;
  }

  .detail-hero {
    min-height: 560px;
  }

  .detail-shell {
    padding-top: 44px;
  }
}
