html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #020617;
  color: #e2e8f0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 15% 10%, rgba(8, 145, 178, 0.22), transparent 32rem),
    radial-gradient(circle at 85% 20%, rgba(30, 58, 138, 0.2), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(30, 41, 59, 0.9);
  background: rgba(2, 6, 23, 0.86);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.9rem 1rem;
}

.site-logo,
.brand-line {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 16px 30px rgba(6, 182, 212, 0.22);
  color: #ffffff;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 1.2rem;
  color: #cbd5e1;
  font-size: 0.95rem;
}

.nav-link {
  padding: 0.45rem 0;
  transition: color 180ms ease;
}

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

.nav-dropdown {
  position: relative;
}

.nav-drop-button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.dropdown-panel {
  position: absolute;
  right: 0;
  top: 2.2rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(7rem, 1fr));
  min-width: 20rem;
  padding: 0.8rem;
  border: 1px solid rgba(51, 65, 85, 0.95);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.5rem);
  transition: all 180ms ease;
}

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

.dropdown-panel a,
.mobile-nav a {
  padding: 0.55rem 0.75rem;
  border-radius: 0.75rem;
  color: #cbd5e1;
  transition: background 180ms ease, color 180ms ease;
}

.dropdown-panel a:hover,
.mobile-nav a:hover {
  background: rgba(8, 145, 178, 0.16);
  color: #67e8f9;
}

.mobile-menu-button {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid rgba(51, 65, 85, 0.9);
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.9);
}

.mobile-menu-button span {
  display: block;
  width: 1.2rem;
  height: 2px;
  margin: 0 auto;
  background: #e2e8f0;
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem 1rem;
}

.mobile-nav.open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
}

.hero-carousel {
  position: relative;
  height: 500px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1000ms ease;
}

.hero-slide.active {
  opacity: 1;
}

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

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.86) 36%, rgba(2, 6, 23, 0.2) 100%);
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(100% - 2rem, 1280px);
  transform: translate(-50%, -50%);
  max-width: 1280px;
}

.hero-content > * {
  max-width: 42rem;
}

.hero-kicker,
.region-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.18);
  color: #67e8f9;
}

.hero-kicker {
  padding: 0.45rem 0.8rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.hero-content h1,
.sub-hero h1,
.detail-info h1 {
  margin: 0;
  color: #ffffff;
  font-weight: 900;
  line-height: 1.05;
}

.hero-content h1 {
  font-size: clamp(2.2rem, 6vw, 4.8rem);
}

.hero-content p,
.sub-hero p,
.detail-info p {
  color: #cbd5e1;
  line-height: 1.8;
}

.hero-content p {
  max-width: 38rem;
  font-size: 1.1rem;
}

.hero-tags,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.hero-tags span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.82);
  color: #94a3b8;
  font-size: 0.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0 1.25rem;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.primary-button {
  background: #06b6d4;
  color: #ffffff;
}

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

.primary-button:hover {
  background: #0891b2;
}

.ghost-button {
  border: 1px solid rgba(103, 232, 249, 0.45);
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.45);
}

.hero-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: #ffffff;
  font-size: 2rem;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 180ms ease;
}

.hero-nav:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 1rem;
}

.hero-next {
  right: 1rem;
}

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

.hero-dot {
  width: 0.55rem;
  height: 0.55rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 180ms ease, background 180ms ease;
}

.hero-dot.active {
  width: 2rem;
  background: #22d3ee;
}

.quick-categories {
  border-bottom: 1px solid rgba(30, 41, 59, 0.86);
  background: rgba(15, 23, 42, 0.45);
}

.quick-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 1rem;
}

.quick-inner strong {
  color: #ffffff;
}

.quick-inner div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.quick-inner a {
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(8, 145, 178, 0.35);
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 0.9rem;
}

.quick-inner a:hover {
  background: rgba(8, 145, 178, 0.18);
  color: #67e8f9;
}

.page-container {
  width: min(100% - 2rem, 1280px);
  margin: 0 auto;
}

.content-section {
  margin-top: 4rem;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.section-heading h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.section-heading p {
  margin: 0.45rem 0 0;
  color: #94a3b8;
}

.section-more {
  color: #67e8f9;
  font-weight: 700;
}

.search-panel,
.filter-panel {
  margin-top: 2rem;
  border: 1px solid rgba(51, 65, 85, 0.88);
  border-radius: 1.2rem;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.search-panel {
  padding: 1rem;
}

.search-box {
  display: flex;
  gap: 0.6rem;
}

.search-box input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgba(51, 65, 85, 0.96);
  border-radius: 0.9rem;
  background: rgba(2, 6, 23, 0.75);
  color: #e2e8f0;
  outline: none;
}

.search-box input {
  min-height: 3rem;
  padding: 0 1rem;
}

.search-box input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #22d3ee;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.search-box button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 0.9rem;
  padding: 0 1rem;
  background: #164e63;
  color: #cffafe;
  cursor: pointer;
}

.search-results {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.search-results.open {
  display: grid;
}

.search-result-item {
  display: block;
  padding: 0.75rem;
  border: 1px solid rgba(51, 65, 85, 0.82);
  border-radius: 0.9rem;
  background: rgba(2, 6, 23, 0.55);
}

.search-result-item strong {
  display: block;
  color: #ffffff;
}

.search-result-item span {
  color: #94a3b8;
  font-size: 0.86rem;
}

.filter-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.filter-panel label {
  display: block;
  margin-bottom: 0.4rem;
  color: #94a3b8;
  font-size: 0.85rem;
}

.filter-panel input,
.filter-panel select {
  min-height: 2.8rem;
  padding: 0 0.85rem;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.35rem;
}

.home-grid {
  grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr));
}

.compact-grid {
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
}

.category-movie-grid {
  grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr));
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.8);
  border-radius: 1rem;
  background: rgba(30, 41, 59, 0.72);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.18);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.movie-card[hidden],
.rank-table tr[hidden] {
  display: none;
}

.movie-card:hover {
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: 0 22px 58px rgba(6, 182, 212, 0.1);
  transform: translateY(-4px);
}

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

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

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

.poster-layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.42);
  opacity: 0;
  transition: opacity 200ms ease;
}

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

.play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.9);
  color: #ffffff;
  box-shadow: 0 0 0 8px rgba(6, 182, 212, 0.18);
}

.badge {
  position: absolute;
  z-index: 2;
  padding: 0.25rem 0.55rem;
  border-radius: 0.5rem;
  background: rgba(0, 0, 0, 0.72);
  color: #ffffff;
  font-size: 0.75rem;
}

.top-left {
  top: 0.65rem;
  left: 0.65rem;
}

.bottom-right {
  right: 0.65rem;
  bottom: 0.65rem;
}

.card-body {
  padding: 1rem;
}

.region-pill {
  min-height: auto;
  padding: 0.25rem 0.55rem;
}

.movie-card h2 {
  margin: 0.75rem 0 0.45rem;
  color: #ffffff;
  font-size: 1.05rem;
  line-height: 1.35;
}

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

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24rem;
  gap: 1.5rem;
  align-items: start;
}

.ranking-card {
  position: sticky;
  top: 6rem;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.9);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.88);
}

.ranking-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.78);
}

.ranking-head h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.2rem;
}

.ranking-head a {
  color: #67e8f9;
  font-size: 0.9rem;
}

.ranking-card ol {
  margin: 0;
  padding: 0.5rem 1rem 1rem;
  list-style: none;
}

.ranking-card li a {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(51, 65, 85, 0.45);
}

.ranking-card li:last-child a {
  border-bottom: 0;
}

.ranking-card span,
.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 0.55rem;
  background: rgba(6, 182, 212, 0.18);
  color: #67e8f9;
  font-weight: 800;
}

.ranking-card strong {
  overflow: hidden;
  color: #ffffff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-card em {
  color: #94a3b8;
  font-style: normal;
  font-size: 0.85rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
  gap: 1.3rem;
}

.category-grid.wide {
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
}

.category-card {
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.82);
  border-radius: 1.1rem;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.86));
}

.category-card > a {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem;
}

.category-card img {
  width: 7rem;
  height: 7rem;
  object-fit: cover;
  border-radius: 0.9rem;
  background: #334155;
}

.category-card h2 {
  margin: 0 0 0.55rem;
  color: #ffffff;
}

.category-card p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.7;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0 1rem 1rem;
}

.category-samples a {
  max-width: 11rem;
  overflow: hidden;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.14);
  color: #bae6fd;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.85rem;
}

.sub-hero {
  border-bottom: 1px solid rgba(30, 41, 59, 0.86);
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.62)),
    radial-gradient(circle at 70% 35%, rgba(8, 145, 178, 0.22), transparent 28rem);
}

.sub-hero > div {
  width: min(100% - 2rem, 1280px);
  margin: 0 auto;
  padding: 5rem 0 4rem;
}

.sub-hero span {
  color: #67e8f9;
  font-weight: 800;
}

.sub-hero h1 {
  margin-top: 0.7rem;
  font-size: clamp(2rem, 5vw, 3.4rem);
}

.sub-hero p {
  max-width: 48rem;
  margin-bottom: 0;
}

.rank-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(51, 65, 85, 0.9);
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.72);
}

.rank-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.rank-table th,
.rank-table td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid rgba(51, 65, 85, 0.65);
  text-align: left;
}

.rank-table th {
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.98);
}

.rank-table td {
  color: #94a3b8;
}

.rank-title {
  color: #ffffff;
  font-weight: 700;
}

.detail-page {
  padding-top: 2rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  color: #94a3b8;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: #67e8f9;
}

.detail-hero {
  display: grid;
  grid-template-columns: 18rem minmax(0, 1fr);
  gap: 2rem;
  align-items: end;
  margin-top: 1.5rem;
  padding: 1.4rem;
  border: 1px solid rgba(51, 65, 85, 0.9);
  border-radius: 1.4rem;
  background:
    linear-gradient(135deg, rgba(30, 41, 59, 0.86), rgba(2, 6, 23, 0.76)),
    radial-gradient(circle at 82% 18%, rgba(6, 182, 212, 0.18), transparent 24rem);
}

.detail-poster {
  overflow: hidden;
  border-radius: 1rem;
  background: #334155;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

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

.detail-info h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
}

.player-section {
  margin-top: 2rem;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.95);
  border-radius: 1.2rem;
  background: #000000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.36);
}

.stream-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.video-launch {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.14), rgba(0, 0, 0, 0.2));
  color: #ffffff;
  cursor: pointer;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.video-launch span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.92);
  box-shadow: 0 0 0 12px rgba(6, 182, 212, 0.18), 0 20px 60px rgba(0, 0, 0, 0.35);
  font-size: 2rem;
}

.player-shell.is-active .video-launch {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-copy {
  padding: 1.5rem;
  border: 1px solid rgba(51, 65, 85, 0.82);
  border-radius: 1.2rem;
  background: rgba(15, 23, 42, 0.74);
}

.detail-copy h2 {
  margin: 0 0 0.75rem;
  color: #ffffff;
}

.detail-copy h2 + p {
  margin-top: 0;
}

.detail-copy p {
  color: #cbd5e1;
  line-height: 1.9;
}

.site-footer {
  margin-top: 5rem;
  border-top: 1px solid rgba(30, 41, 59, 0.9);
  background: rgba(2, 6, 23, 0.92);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  width: min(100% - 2rem, 1280px);
  margin: 0 auto;
  padding: 3rem 0;
}

.footer-brand p,
.footer-links a,
.footer-bottom {
  color: #94a3b8;
}

.footer-brand p {
  max-width: 30rem;
  line-height: 1.8;
}

.footer-links h2 {
  margin: 0 0 0.8rem;
  color: #ffffff;
  font-size: 1rem;
}

.footer-links div {
  display: grid;
  gap: 0.55rem;
}

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

.footer-bottom {
  width: min(100% - 2rem, 1280px);
  margin: 0 auto;
  padding: 1.1rem 0;
  border-top: 1px solid rgba(30, 41, 59, 0.9);
  text-align: center;
  font-size: 0.9rem;
}

@media (min-width: 768px) {
  .desktop-nav {
    display: flex;
  }

  .mobile-menu-button {
    display: none;
  }
}

@media (min-width: 900px) {
  .hero-carousel {
    height: 600px;
  }
}

@media (max-width: 1024px) {
  .split-layout {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    position: static;
  }

  .detail-hero {
    grid-template-columns: 14rem minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .hero-carousel {
    height: 540px;
  }

  .hero-gradient {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.3), rgba(2, 6, 23, 0.95));
  }

  .hero-content {
    top: auto;
    bottom: 4rem;
    transform: translateX(-50%);
  }

  .hero-nav {
    display: none;
  }

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

  .detail-poster {
    max-width: 18rem;
  }

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

  .search-box {
    flex-direction: column;
  }

  .category-card > a {
    grid-template-columns: 5.5rem minmax(0, 1fr);
  }

  .category-card img {
    width: 5.5rem;
    height: 5.5rem;
  }
}
