:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --emerald: #059669;
  --emerald-strong: #047857;
  --teal: #0d9488;
  --orange: #f97316;
  --slate: #0f172a;
  --slate-soft: #1e293b;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 44%, #f8fafc 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 52%, #0f172a 100%);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(14px);
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 14px 30px rgba(5, 150, 105, 0.35);
  font-size: 18px;
}

.brand strong {
  display: block;
  font-size: 23px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.brand small {
  display: block;
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  color: #cbd5e1;
  font-weight: 650;
}

.nav-links a,
.mobile-nav a {
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active,
.mobile-nav a:hover {
  color: #ffffff;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 24px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
}

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

.mobile-nav a {
  padding: 10px 0;
  color: #cbd5e1;
  font-weight: 650;
}

.hero {
  position: relative;
  min-height: 650px;
  color: #ffffff;
  background: #0f172a;
  overflow: hidden;
}

.hero-track {
  position: relative;
  min-height: 650px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.78) 42%, rgba(15, 23, 42, 0.2) 100%), var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 210px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0), #f8fafc 92%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  min-height: 650px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 360px;
  align-items: center;
  gap: 50px;
  padding: 96px 0 140px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.18);
  color: #a7f3d0;
  font-size: 14px;
  font-weight: 750;
  backdrop-filter: blur(10px);
}

.hero h1 {
  margin: 24px 0 18px;
  max-width: 820px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.065em;
}

.hero-lead {
  max-width: 760px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.85;
}

.hero-meta,
.detail-meta,
.card-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta {
  margin: 24px 0 30px;
}

.pill,
.tag,
.meta-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 750;
}

.pill {
  padding: 8px 13px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(226, 232, 240, 0.22);
}

.tag {
  padding: 6px 11px;
  color: #047857;
  background: #d1fae5;
  font-size: 13px;
}

.meta-chip {
  padding: 6px 10px;
  color: #475569;
  background: #f1f5f9;
  font-size: 13px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 18px 34px rgba(5, 150, 105, 0.32);
}

.btn-primary:hover {
  box-shadow: 0 22px 44px rgba(5, 150, 105, 0.42);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

.btn-light {
  color: #047857;
  background: #ffffff;
  border: 1px solid #d1fae5;
}

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(0, 0, 0, 0.72));
}

.hero-poster-title {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 1;
  font-size: 24px;
  font-weight: 900;
}

.hero-controls {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 70px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-arrows {
  display: flex;
  gap: 10px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(10px);
}

.hero-arrow {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 26px;
}

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

.hero-dot {
  width: 36px;
  height: 8px;
  padding: 0;
  border-radius: 999px;
  opacity: 0.55;
}

.hero-dot.is-active {
  width: 58px;
  opacity: 1;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
}

.section {
  padding: 72px 0 0;
}

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

.section-title {
  margin: 12px 0 0;
  color: #1e293b;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.section-desc {
  max-width: 720px;
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.8;
}

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

.category-tile,
.overview-tile {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  padding: 22px;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #059669 52%, #14b8a6);
  box-shadow: var(--shadow);
}

.category-tile:nth-child(2n),
.overview-tile:nth-child(2n) {
  background: linear-gradient(135deg, #0f172a, #334155 58%, #047857);
}

.category-tile::after,
.overview-tile::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -65px;
  bottom: -65px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.category-tile strong,
.overview-tile strong {
  position: relative;
  z-index: 1;
  display: block;
  font-size: 24px;
  font-weight: 900;
}

.category-tile span,
.overview-tile span {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
}

.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));
  gap: 18px;
}

.movie-card {
  min-width: 0;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.42);
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.14);
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #e2e8f0;
}

.movie-grid.compact .poster-wrap,
.related-grid .poster-wrap {
  aspect-ratio: 3 / 4;
}

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.62));
}

.badge {
  position: absolute;
  z-index: 1;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(5, 150, 105, 0.94);
  font-size: 12px;
  font-weight: 850;
}

.score {
  position: absolute;
  z-index: 1;
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.82);
  font-size: 13px;
  font-weight: 850;
}

.movie-body {
  padding: 17px;
}

.movie-title {
  margin: 0 0 9px;
  color: #1e293b;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 850;
}

.movie-card:hover .movie-title {
  color: var(--emerald);
}

.movie-summary {
  min-height: 46px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  margin-top: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 130px 1fr;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}

.rank-no {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), #f59e0b);
  font-size: 20px;
  font-weight: 900;
}

.rank-cover {
  border-radius: 15px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #e2e8f0;
}

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

.rank-title {
  margin: 0 0 8px;
  color: #1e293b;
  font-size: 18px;
  font-weight: 900;
}

.rank-meta {
  color: #64748b;
  font-size: 13px;
}

.page-hero {
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.33), transparent 30%), linear-gradient(135deg, #0f172a 0%, #1e293b 58%, #0f766e 100%);
  padding: 70px 0;
}

.page-hero h1 {
  margin: 14px 0 12px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 820px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.9;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16);
}

.empty-state {
  display: none;
  padding: 42px;
  color: #64748b;
  text-align: center;
  background: #ffffff;
  border-radius: 22px;
  border: 1px solid #e2e8f0;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: #047857;
  font-weight: 750;
}

.detail-wrap {
  padding: 44px 0 0;
}

.detail-hero {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 34px;
  align-items: stretch;
  padding: 28px;
  border-radius: 30px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: #e2e8f0;
}

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

.detail-info h1 {
  margin: 12px 0 16px;
  color: #0f172a;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.detail-lead {
  color: #475569;
  font-size: 18px;
  line-height: 1.9;
}

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

.watch-panel {
  margin-top: 34px;
  padding: 26px;
  border-radius: 30px;
  background: linear-gradient(135deg, #0f172a, #111827 62%, #064e3b);
  box-shadow: var(--shadow);
}

.watch-panel h2 {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: 28px;
  font-weight: 900;
}

.player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
}

.player video {
  width: 100%;
  height: 100%;
  cursor: pointer;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  color: #ffffff;
  background-size: cover;
  background-position: center;
  isolation: isolate;
}

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.72));
  backdrop-filter: blur(1px);
}

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

.play-ring {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 20px 45px rgba(5, 150, 105, 0.35);
  font-size: 34px;
}

.player-cover strong {
  font-size: 22px;
  font-weight: 900;
}

.player-message {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: none;
  padding: 12px 14px;
  border-radius: 14px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.75);
}

.player-message.is-visible {
  display: block;
}

.detail-content {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 26px;
  margin-top: 34px;
}

.content-card {
  padding: 28px;
  border-radius: 26px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
  margin: 0 0 18px;
  color: #1e293b;
  font-size: 26px;
  font-weight: 900;
}

.content-card p {
  margin: 0 0 18px;
  color: #475569;
  line-height: 1.95;
}

.info-list {
  margin: 0;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid #e2e8f0;
}

.info-list dt {
  color: #64748b;
}

.info-list dd {
  margin: 0;
  color: #0f172a;
  font-weight: 850;
  text-align: right;
}

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

.site-footer {
  margin-top: 88px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b 62%, #0f172a);
}

.footer-inner {
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.25fr repeat(3, 1fr);
  gap: 28px;
}

.footer-title {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.footer-inner p,
.footer-inner li {
  color: #94a3b8;
  line-height: 1.8;
}

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

.footer-inner a:hover {
  color: #6ee7b7;
}

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

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

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

  .hero-poster {
    display: none;
  }

  .rank-list {
    grid-template-columns: 1fr;
  }
}

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

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

  .hero,
  .hero-track,
  .hero-content {
    min-height: 590px;
  }

  .hero-content {
    padding: 78px 0 130px;
  }

  .hero-controls {
    bottom: 45px;
  }

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

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

  .detail-poster img {
    min-height: auto;
  }
}

@media (max-width: 560px) {
  .brand strong {
    font-size: 19px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .section {
    padding-top: 54px;
  }

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

  .category-strip,
  .movie-grid,
  .movie-grid.compact,
  .related-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 44px 100px 1fr;
    gap: 12px;
  }

  .rank-no {
    width: 40px;
    height: 40px;
    font-size: 17px;
  }

  .detail-hero,
  .watch-panel,
  .content-card {
    padding: 18px;
    border-radius: 22px;
  }
}
