*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: #111827;
  background: #f9fafb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, #0891b2, #2563eb, #14b8a6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 12px 28px rgba(8, 145, 178, 0.32);
  font-size: 14px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  position: relative;
  padding: 22px 0;
  color: #374151;
  font-weight: 650;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  height: 3px;
  border-radius: 999px;
  background: #0891b2;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #0891b2;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #334155;
  border-radius: 999px;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  min-height: 660px;
  background: radial-gradient(circle at top left, rgba(6, 182, 212, 0.22), transparent 36%), linear-gradient(135deg, #f0fdfa, #eff6ff 52%, #ffffff);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.35)), var(--hero-image) center/cover no-repeat;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 160px;
  background: linear-gradient(to bottom, transparent, #ffffff);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: 56px;
  padding: 86px 0 120px;
}

.hero-copy {
  animation: slideUp 0.6s ease both;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 18px;
  border: 1px solid rgba(6, 182, 212, 0.22);
  border-radius: 999px;
  color: #0e7490;
  background: rgba(236, 254, 255, 0.9);
  font-size: 14px;
  font-weight: 700;
}

.hero-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.03;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.gradient-text {
  background: linear-gradient(135deg, #0891b2, #2563eb, #14b8a6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 28px;
  color: #4b5563;
  font-size: clamp(17px, 2vw, 22px);
}

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

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

.hero-meta span,
.detail-meta span,
.movie-tags span,
.meta-row span,
.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: #0e7490;
  background: #ecfeff;
  font-size: 13px;
  font-weight: 700;
}

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

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.28);
}

.btn-secondary {
  color: #0e7490;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(8, 145, 178, 0.25);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  min-height: 430px;
  border-radius: 32px;
  background: linear-gradient(135deg, #cffafe, #dbeafe);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.24);
  animation: scaleIn 0.55s ease both;
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-poster:hover img {
  transform: scale(1.06);
}

.poster-caption {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  padding: 18px;
  border-radius: 22px;
  color: #ffffff;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.42));
  backdrop-filter: blur(8px);
}

.poster-caption strong {
  display: block;
  font-size: 24px;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 42px;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.25);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 34px;
  background: #0891b2;
}

.section {
  padding: 74px 0;
}

.section.alt {
  background: #ffffff;
}

.section-heading {
  max-width: 760px;
  margin: 0 auto 34px;
  text-align: center;
}

.section-heading h2,
.page-hero h1,
.detail-title {
  margin: 0 0 12px;
  color: #111827;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.section-heading p,
.page-hero p {
  margin: 0;
  color: #64748b;
  font-size: 18px;
}

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

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

.movie-card,
.category-card,
.info-panel,
.listing-tools,
.player-shell,
.detail-card,
.ranking-item,
.simple-card {
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.movie-card,
.category-card,
.simple-card {
  overflow: hidden;
  border-radius: 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover,
.category-card:hover,
.simple-card:hover {
  border-color: rgba(6, 182, 212, 0.42);
  transform: translateY(-6px);
  box-shadow: 0 22px 46px rgba(8, 145, 178, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  height: 260px;
  background: linear-gradient(135deg, #ecfeff, #eff6ff);
}

.movie-card.compact .poster-link {
  height: 220px;
}

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.72), transparent 62%);
}

.year-badge,
.rank-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 28px;
  padding: 0 10px;
  border-radius: 9px;
  color: #ffffff;
  background: #dc2626;
  font-size: 12px;
  font-weight: 900;
}

.rank-badge {
  left: 14px;
  right: auto;
  background: #0891b2;
}

.play-hover {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(6, 182, 212, 0.86);
  box-shadow: 0 20px 45px rgba(6, 182, 212, 0.32);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.82);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 30px;
  margin-bottom: 10px;
}

.movie-card h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 850;
}

.movie-card h3 a:hover,
.ranking-content h3 a:hover {
  color: #0891b2;
}

.movie-card p {
  min-height: 52px;
  margin: 0 0 14px;
  color: #64748b;
  font-size: 14px;
}

.meta-row {
  gap: 8px;
}

.meta-row span {
  color: #475569;
  background: #f1f5f9;
}

.card-more {
  display: inline-flex;
  align-items: center;
  margin-top: 14px;
  color: #0891b2;
  font-weight: 800;
}

.card-more::after {
  content: "→";
  margin-left: 6px;
}

.category-card {
  display: grid;
  gap: 16px;
  min-height: 220px;
  padding: 22px;
}

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

.category-card p {
  margin: 0;
  color: #64748b;
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.category-preview img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 14px;
  background: linear-gradient(135deg, #ecfeff, #dbeafe);
}

.category-link {
  color: #0891b2;
  font-weight: 850;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 52px 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 20px;
}

.ranking-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  font-weight: 900;
}

.ranking-cover img {
  width: 96px;
  height: 118px;
  object-fit: cover;
  border-radius: 15px;
  background: linear-gradient(135deg, #ecfeff, #dbeafe);
}

.ranking-content h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.ranking-content p {
  margin: 0 0 10px;
  color: #64748b;
}

.ranking-action {
  padding: 10px 16px;
  border-radius: 12px;
  color: #ffffff;
  background: #0891b2;
  font-weight: 800;
}

.page-hero {
  padding: 72px 0 52px;
  background: radial-gradient(circle at 18% 20%, rgba(6, 182, 212, 0.18), transparent 30%), linear-gradient(135deg, #f8fafc, #ecfeff 52%, #eff6ff);
}

.page-hero .container-custom {
  max-width: 900px;
}

.listing-section {
  padding: 42px 0 82px;
}

.listing-tools {
  position: sticky;
  top: 86px;
  z-index: 40;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 24px;
}

.search-box {
  position: relative;
  margin-bottom: 14px;
}

.search-box span {
  position: absolute;
  left: 16px;
  top: 50%;
  color: #94a3b8;
  transform: translateY(-50%);
}

.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px 0 46px;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  outline: none;
  background: #ffffff;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-box input:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  border: 0;
  border-radius: 999px;
  padding: 9px 15px;
  color: #475569;
  background: #f1f5f9;
  font-weight: 800;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.filter-chip:hover,
.filter-chip.active {
  color: #ffffff;
  background: #0891b2;
  transform: translateY(-1px);
}

.empty-state {
  display: none;
  padding: 64px 20px;
  text-align: center;
  color: #64748b;
  background: #ffffff;
  border-radius: 24px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding: 42px 0 82px;
}

.player-shell {
  overflow: hidden;
  border-radius: 28px;
}

.player-box {
  position: relative;
  overflow: hidden;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.player-box video {
  width: 100%;
  height: 100%;
  background: #020617;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.32)), var(--poster-image) center/cover no-repeat;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 26px 60px rgba(6, 182, 212, 0.38);
  font-size: 34px;
  transition: transform 0.25s ease;
}

.play-button:hover {
  transform: scale(1.06);
}

.player-caption,
.detail-card,
.info-panel {
  padding: 24px;
}

.player-caption h1,
.detail-title {
  margin-top: 0;
}

.detail-card,
.info-panel {
  border-radius: 24px;
}

.detail-card h2,
.info-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-card p,
.info-panel p {
  margin: 0 0 16px;
  color: #475569;
  white-space: pre-line;
}

.detail-sidebar {
  display: grid;
  align-content: start;
  gap: 18px;
}

.sidebar-poster {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.sidebar-poster img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  background: linear-gradient(135deg, #ecfeff, #dbeafe);
}

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

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

.breadcrumb a:hover {
  color: #0891b2;
}

.simple-page {
  padding: 60px 0 90px;
}

.simple-card {
  padding: 28px;
}

.simple-card h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.simple-card p {
  margin: 0 0 14px;
  color: #475569;
}

.site-footer {
  padding: 58px 0 24px;
  background: linear-gradient(to bottom, #ffffff, #f1f5f9);
  border-top: 1px solid #e2e8f0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
}

.footer-grid h3 {
  margin: 0 0 14px;
  font-size: 17px;
}

.footer-grid p {
  max-width: 420px;
  color: #64748b;
}

.footer-grid a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: #64748b;
}

.footer-grid a:hover {
  color: #0891b2;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid #cbd5e1;
  color: #64748b;
  font-size: 14px;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 120;
  display: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: #0891b2;
  box-shadow: 0 16px 34px rgba(8, 145, 178, 0.32);
}

.back-to-top.visible {
  display: block;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 1024px) {
  .hero-inner,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-sidebar {
    grid-row: auto;
  }

  .sidebar-poster img {
    height: 360px;
  }
}

@media (max-width: 760px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 24px 52px rgba(15, 23, 42, 0.18);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    padding: 12px 14px;
    border-radius: 12px;
  }

  .nav-link::after {
    display: none;
  }

  .nav-link.active,
  .nav-link:hover {
    background: #ecfeff;
  }

  .hero-carousel,
  .hero-track {
    min-height: 760px;
  }

  .hero-inner {
    gap: 28px;
    padding: 56px 0 116px;
  }

  .hero-poster,
  .hero-poster img {
    min-height: 320px;
  }

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

  .listing-tools {
    position: static;
  }

  .ranking-item {
    grid-template-columns: 42px 76px minmax(0, 1fr);
  }

  .ranking-cover img {
    width: 76px;
    height: 98px;
  }

  .ranking-action {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
