* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #e5eefb;
  background: #020617;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(2, 6, 23, 0.78);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

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

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

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.28);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link,
.dropdown-toggle {
  border: 0;
  background: transparent;
  color: #cbd5e1;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.dropdown-toggle:hover {
  color: #ffffff;
  background: rgba(14, 165, 233, 0.16);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: 44px;
  right: 0;
  display: none;
  width: 180px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.nav-dropdown:hover .dropdown-panel {
  display: grid;
  gap: 4px;
}

.dropdown-link {
  padding: 9px 10px;
  border-radius: 12px;
  color: #cbd5e1;
}

.dropdown-link:hover {
  background: rgba(14, 165, 233, 0.14);
  color: #ffffff;
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 99px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.mobile-panel.is-open {
  display: grid;
  gap: 8px;
}

.mobile-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #cbd5e1;
}

.mobile-panel a:hover {
  background: rgba(14, 165, 233, 0.14);
  color: #ffffff;
}

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

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

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.72) 42%, rgba(2, 6, 23, 0.14) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 72px;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.88);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
}

.hero h1,
.hero h2 {
  width: min(780px, 100%);
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  color: #ffffff;
  letter-spacing: -0.04em;
}

.hero p {
  width: min(680px, 100%);
  margin: 0 0 28px;
  color: #dbeafe;
  font-size: clamp(16px, 2vw, 20px);
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

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

.primary-button {
  color: #ffffff;
  background: #0284c7;
  box-shadow: 0 16px 40px rgba(2, 132, 199, 0.28);
}

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

.primary-button:hover {
  background: #0369a1;
  box-shadow: 0 20px 50px rgba(2, 132, 199, 0.38);
}

.secondary-button {
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(186, 230, 253, 0.22);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.68);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-control:hover {
  background: rgba(2, 132, 199, 0.88);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: #ffffff;
}

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

.page-main.spacious {
  padding-top: 40px;
}

.section-block {
  margin-bottom: 72px;
}

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

.section-kicker,
.page-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: #38bdf8;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: #ffffff;
  line-height: 1.15;
}

.section-head h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.section-more {
  color: #7dd3fc;
  font-weight: 700;
}

.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));
}

.horizontal-scroll {
  overflow-x: auto;
  padding-bottom: 10px;
}

.horizontal-scroll-inner {
  display: flex;
  gap: 20px;
}

.horizontal-scroll .movie-card {
  width: 292px;
  flex: 0 0 auto;
}

.movie-card {
  border-radius: 18px;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.52);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.16);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px) scale(1.01);
  border-color: rgba(56, 189, 248, 0.38);
  box-shadow: 0 24px 65px rgba(2, 132, 199, 0.12);
}

.movie-card a {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

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

.poster-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 38px;
  opacity: 0;
  background: rgba(0, 0, 0, 0.22);
  transition: opacity 0.2s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
}

.poster-time {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 8px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.72);
  font-size: 12px;
}

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

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.card-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.13);
  font-size: 12px;
  font-weight: 700;
}

.movie-card h2,
.movie-card h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 44px;
  margin: 0 0 14px;
  overflow: hidden;
  color: #94a3b8;
  font-size: 14px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #94a3b8;
  font-size: 13px;
}

.card-meta span:first-child {
  color: #facc15;
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  padding: 24px;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(30, 41, 59, 0.82));
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.category-tile:hover {
  border-color: rgba(56, 189, 248, 0.38);
}

.category-tile h2 {
  position: relative;
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 24px;
}

.category-tile p {
  position: relative;
  margin: 0 0 20px;
  color: #cbd5e1;
}

.category-cover-row {
  position: relative;
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.category-cover-row img {
  width: 31%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.page-title {
  margin-bottom: 30px;
}

.page-title h1 {
  font-size: clamp(32px, 5vw, 54px);
  margin-bottom: 12px;
}

.page-title p {
  max-width: 780px;
  margin: 0;
  color: #b6c3d1;
  font-size: 17px;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  margin: 28px 0 30px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  outline: 0;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.75);
  padding: 0 14px;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(56, 189, 248, 0.7);
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 58px 120px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #ffffff;
  background: rgba(2, 132, 199, 0.9);
  font-weight: 900;
}

.ranking-row img {
  width: 120px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
}

.ranking-row h2 {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: 18px;
}

.ranking-row p {
  margin: 0;
  color: #94a3b8;
  font-size: 14px;
}

.rank-score {
  color: #facc15;
  font-weight: 900;
  white-space: nowrap;
}

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

.detail-hero img {
  width: 100%;
  height: 46vh;
  object-fit: cover;
  opacity: 0.46;
  filter: saturate(1.05);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617, rgba(2, 6, 23, 0.64), rgba(2, 6, 23, 0.08));
}

.detail-title {
  position: absolute;
  left: 50%;
  bottom: 42px;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
}

.detail-title h1 {
  font-size: clamp(32px, 5vw, 58px);
  margin-bottom: 14px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.breadcrumb a {
  color: #7dd3fc;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
}

.player-panel,
.detail-section,
.side-panel {
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.18);
}

.player-panel {
  overflow: hidden;
  margin-bottom: 28px;
}

.video-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.video-box video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.video-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  cursor: pointer;
  background: #000000;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.video-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.video-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

.play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(2, 132, 199, 0.94);
  font-size: 34px;
  cursor: pointer;
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 48px rgba(2, 132, 199, 0.34);
}

.player-copy {
  padding: 22px;
}

.player-copy h2,
.detail-section h2,
.side-panel h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 24px;
}

.player-copy p,
.detail-section p,
.side-panel p {
  margin: 0;
  color: #b6c3d1;
}

.detail-section {
  padding: 24px;
  margin-bottom: 22px;
}

.info-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  color: #cbd5e1;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.info-list span:first-child {
  color: #94a3b8;
}

.side-panel {
  position: sticky;
  top: 98px;
  padding: 20px;
}

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

.related-card a {
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.42);
  transition: background 0.2s ease;
}

.related-card a:hover {
  background: rgba(14, 165, 233, 0.14);
}

.related-card img {
  width: 94px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
}

.related-card span {
  color: #ffffff;
  font-weight: 700;
  line-height: 1.35;
}

.site-footer {
  padding: 52px 0 24px;
  background: #020617;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 36px;
}

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

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

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-links a {
  color: #94a3b8;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 0;
  padding-top: 22px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  text-align: center;
}

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

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

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

  .side-panel {
    position: static;
  }
}

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

  .menu-button {
    display: block;
  }

  .hero {
    min-height: 76vh;
  }

  .hero-control {
    display: none;
  }

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

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

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

  .ranking-row {
    grid-template-columns: 44px 92px 1fr;
  }

  .rank-score {
    grid-column: 3;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

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

  .site-logo,
  .footer-logo {
    font-size: 18px;
  }

  .hero-content {
    bottom: 58px;
  }

  .hero h1,
  .hero h2 {
    font-size: 38px;
  }

  .page-main {
    width: min(100% - 24px, 1180px);
    padding-top: 38px;
  }

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

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

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

  .ranking-row img {
    display: none;
  }

  .rank-score {
    grid-column: 2;
  }

  .play-button {
    width: 70px;
    height: 70px;
  }
}
