:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-panel: rgba(15, 23, 42, 0.78);
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --amber: #f59e0b;
  --rose: #f43f5e;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.55);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.24), transparent 34rem),
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.18), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
}

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

img {
  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;
  border-bottom: 1px solid rgba(51, 65, 85, 0.95);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
  box-shadow: 0 14px 45px rgba(2, 6, 23, 0.42);
  backdrop-filter: blur(18px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.logo-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.32);
  transition: transform 0.2s ease;
}

.logo:hover .logo-icon {
  transform: scale(1.08) rotate(-2deg);
}

.logo-title {
  display: block;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo-subtitle {
  display: block;
  margin-top: 2px;
  color: var(--soft);
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 26px;
}

.nav-link,
.dropdown-button {
  border: 0;
  padding: 8px 0;
  color: #cbd5e1;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease;
}

.nav-link:hover,
.dropdown-button:hover,
.nav-link.is-active {
  color: #fff;
}

.dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: 38px;
  left: 0;
  display: grid;
  width: 235px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.dropdown:hover .dropdown-panel,
.dropdown:focus-within .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  padding: 9px 10px;
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 14px;
}

.dropdown-panel a:hover {
  color: #fff;
  background: rgba(51, 65, 85, 0.86);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-search {
  position: relative;
  width: 260px;
}

.nav-search input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  padding: 10px 42px 10px 16px;
  color: #fff;
  background: rgba(51, 65, 85, 0.7);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input:focus {
  border-color: rgba(37, 99, 235, 0.85);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
}

.search-button {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #cbd5e1;
  background: transparent;
  cursor: pointer;
}

.search-button:hover {
  background: rgba(100, 116, 139, 0.35);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: rgba(51, 65, 85, 0.75);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 0 0 18px;
}

.mobile-nav {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.mobile-nav a {
  padding: 12px 14px;
  border-radius: 12px;
  color: #dbeafe;
  background: rgba(51, 65, 85, 0.45);
}

.hero {
  position: relative;
  height: 700px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1s ease, transform 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-media {
  position: absolute;
  inset: 0;
}

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

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 44%, rgba(2, 6, 23, 0.24) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.48) 36%, transparent 74%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  height: 100%;
}

.hero-copy {
  width: min(660px, 100%);
  padding: 92px 0 84px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  border-radius: 999px;
  padding: 7px 14px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.28);
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-description {
  max-width: 650px;
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-meta span,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  padding: 7px 12px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(10px);
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 35px rgba(37, 99, 235, 0.38);
}

.btn-secondary {
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.66);
}

.btn-secondary:hover {
  background: rgba(51, 65, 85, 0.78);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(226, 232, 240, 0.22);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.58);
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-control:hover {
  background: rgba(37, 99, 235, 0.72);
}

.hero-prev {
  left: 28px;
}

.hero-next {
  right: 28px;
}

.hero-dots {
  position: absolute;
  right: 0;
  bottom: 34px;
  left: 0;
  z-index: 4;
  display: flex;
  justify-content: center;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: rgba(203, 213, 225, 0.46);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 34px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.main-content {
  padding: 60px 0 72px;
}

.section {
  margin-bottom: 66px;
}

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

.section-heading h2,
.page-title,
.detail-title {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-lead,
.detail-lead {
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.view-more {
  color: #67e8f9;
  font-weight: 800;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.24);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(6, 182, 212, 0.45);
  box-shadow: 0 26px 64px rgba(2, 6, 23, 0.42);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(6, 182, 212, 0.12));
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(2, 6, 23, 0.86) 100%);
}

.score-badge,
.type-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.score-badge {
  top: 10px;
  left: 10px;
  background: rgba(245, 158, 11, 0.92);
}

.type-badge {
  top: 10px;
  right: 10px;
  background: rgba(37, 99, 235, 0.86);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: block;
  margin: 0 0 9px;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
}

.card-title:hover {
  color: #67e8f9;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: #94a3b8;
  font-size: 13px;
}

.card-desc {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 0 0 12px;
  overflow: hidden;
  color: #cbd5e1;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.tag {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  padding: 5px 8px;
  color: #bfdbfe;
  font-size: 12px;
  background: rgba(30, 41, 59, 0.62);
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  background:
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.22), transparent 70%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.88));
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.26);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(6, 182, 212, 0.42);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p {
  margin: 0 0 18px;
  color: #cbd5e1;
  line-height: 1.65;
}

.category-card span {
  color: #67e8f9;
  font-weight: 800;
}

.page-hero {
  padding: 74px 0 34px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.2), transparent 28rem),
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.18), transparent 26rem);
}

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

.breadcrumb a:hover {
  color: #fff;
}

.filters {
  display: grid;
  grid-template-columns: 1.7fr repeat(3, 1fr);
  gap: 12px;
  margin: 26px 0 28px;
}

.filters input,
.filters select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  padding: 13px 14px;
  color: #fff;
  background: rgba(15, 23, 42, 0.78);
  outline: none;
}

.filters input:focus,
.filters select:focus {
  border-color: rgba(6, 182, 212, 0.72);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.1);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 74px 96px 1fr auto;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateX(6px);
  border-color: rgba(6, 182, 212, 0.42);
}

.rank-num {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.rank-poster {
  overflow: hidden;
  width: 96px;
  height: 130px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.9);
}

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

.rank-info h2,
.rank-info h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-info p {
  margin: 0 0 10px;
  color: #cbd5e1;
  line-height: 1.6;
}

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: #94a3b8;
  font-size: 14px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 360px;
  gap: 28px;
  align-items: start;
}

.detail-card,
.side-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.22);
}

.detail-card {
  overflow: hidden;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-player {
  width: 100%;
  height: 100%;
  background: #000;
  outline: none;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: rgba(2, 6, 23, 0.12);
  cursor: pointer;
  overflow: hidden;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.58);
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at center, rgba(37, 99, 235, 0.18), transparent 22rem),
    linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.28));
}

.play-core {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 14px;
  justify-items: center;
  font-size: 18px;
  font-weight: 900;
}

.play-icon {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.45);
}

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

.detail-body {
  padding: 26px;
}

.detail-title {
  margin-bottom: 14px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.detail-section {
  margin-top: 26px;
}

.detail-section h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.detail-section p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
}

.side-card {
  padding: 20px;
}

.side-card h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  align-items: center;
}

.related-item img {
  width: 70px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(30, 41, 59, 0.9);
}

.related-item strong {
  display: block;
  margin-bottom: 6px;
}

.related-item span {
  color: #94a3b8;
  font-size: 13px;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding: 36px 0;
  color: #94a3b8;
  background: rgba(2, 6, 23, 0.58);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

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

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

@media (max-width: 1024px) {
  .main-nav,
  .nav-search {
    display: none;
  }

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

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

  .mobile-panel .nav-search {
    display: block;
    width: 100%;
  }

  .hero {
    height: 620px;
  }

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

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

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .header-inner {
    min-height: 68px;
  }

  .logo-icon {
    width: 40px;
    height: 40px;
  }

  .logo-title {
    font-size: 18px;
  }

  .logo-subtitle {
    display: none;
  }

  .hero {
    height: 560px;
  }

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

  .hero-control {
    display: none;
  }

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

  .section-heading {
    display: block;
  }

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

  .rank-item {
    grid-template-columns: 48px 72px 1fr;
  }

  .rank-num {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }

  .rank-poster {
    width: 72px;
    height: 98px;
  }

  .rank-action {
    grid-column: 2 / -1;
  }

  .footer-inner {
    display: block;
  }

  .footer-links {
    margin-top: 14px;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-description {
    font-size: 16px;
  }

  .detail-body {
    padding: 20px;
  }
}
