* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.14), transparent 34rem),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: #e5e7eb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid rgba(51, 65, 85, 0.9);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #022c22;
  background: linear-gradient(135deg, #34d399, #22d3ee);
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.45);
  font-size: 14px;
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(90deg, #34d399, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #cbd5e1;
  font-size: 15px;
}

.nav-link {
  position: relative;
  padding: 20px 0;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #34d399;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 13px;
  height: 2px;
  transform: scaleX(0);
  background: linear-gradient(90deg, #34d399, #22d3ee);
  transition: transform 0.2s ease;
}

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

.site-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.78);
  border: 1px solid rgba(100, 116, 139, 0.35);
}

.site-search input,
.mobile-search input {
  width: 190px;
  border: 0;
  outline: 0;
  color: #f8fafc;
  background: transparent;
  padding: 7px 8px 7px 12px;
}

.site-search button,
.mobile-search button,
.primary-btn,
.ghost-btn,
.section-more,
.filter-button {
  border: 0;
  border-radius: 999px;
  color: #04111d;
  background: linear-gradient(135deg, #34d399, #22d3ee);
  padding: 9px 16px;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.site-search button:hover,
.mobile-search button:hover,
.primary-btn:hover,
.filter-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(16, 185, 129, 0.35);
}

.ghost-btn,
.section-more {
  color: #d1fae5;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(52, 211, 153, 0.5);
  box-shadow: none;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(100, 116, 139, 0.55);
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.75);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #e2e8f0;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.mobile-link {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.52);
}

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

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

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  filter: blur(2px) saturate(1.05);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 48%, rgba(2, 6, 23, 0.4) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.98) 0%, transparent 34%);
}

.hero-content {
  position: relative;
  z-index: 1;
  min-height: 72vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 54px;
  padding: 62px 0 86px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #67e8f9;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 18px 0 8px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.05;
  color: #f8fafc;
  letter-spacing: -0.05em;
}

.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(24px, 3.2vw, 42px);
  color: #34d399;
}

.hero-copy p {
  max-width: 660px;
  margin: 0;
  color: #cbd5e1;
  font-size: 17px;
}

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

.hero-tags {
  margin: 24px 0;
}

.hero-tags span,
.movie-tags span,
.detail-tags span {
  border: 1px solid rgba(52, 211, 153, 0.42);
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(6, 95, 70, 0.22);
  padding: 5px 10px;
  font-size: 12px;
}

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

.hero-poster {
  position: relative;
  min-height: 480px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 38px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(148, 163, 184, 0.18);
  transform: rotate(2deg);
}

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

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

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  color: #022c22;
  background: rgba(52, 211, 153, 0.92);
  box-shadow: 0 0 50px rgba(52, 211, 153, 0.42);
}

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

.hero-arrow,
.hero-dot {
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #f8fafc;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(14px);
}

.hero-arrow {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 28px;
  line-height: 1;
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border-radius: 999px;
}

.hero-dot.is-active {
  width: 34px;
  background: linear-gradient(90deg, #34d399, #22d3ee);
}

.main-content,
.page-main {
  padding: 54px 0 72px;
}

.content-section {
  margin-top: 54px;
}

.section-head,
.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}

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

.section-head h2,
.page-head h1 {
  font-size: clamp(26px, 4vw, 42px);
}

.section-head p,
.page-head p {
  max-width: 780px;
  margin: 8px 0 0;
  color: #94a3b8;
}

.movie-grid,
.category-grid,
.rank-grid,
.related-grid,
.search-grid {
  display: grid;
  gap: 20px;
}

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

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

.related-grid,
.search-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.88));
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.28);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(52, 211, 153, 0.55);
  box-shadow: 0 25px 60px rgba(2, 6, 23, 0.46), 0 0 32px rgba(16, 185, 129, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

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

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

.poster-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(2, 6, 23, 0.9) 100%);
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: #022c22;
  background: #34d399;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
  transform: scale(1);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border-radius: 999px;
  color: #04111d;
  background: linear-gradient(135deg, #fbbf24, #34d399);
}

.movie-body {
  padding: 14px;
}

.movie-title {
  display: block;
  color: #f8fafc;
  font-weight: 800;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.movie-title:hover {
  color: #34d399;
}

.movie-line {
  min-height: 42px;
  margin: 8px 0 10px;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: #cbd5e1;
  font-size: 12px;
}

.movie-meta span {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.7);
}

.movie-tags {
  margin-top: 10px;
}

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

.category-tile {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(52, 211, 153, 0.22);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(6, 78, 59, 0.44));
  box-shadow: 0 22px 55px rgba(2, 6, 23, 0.25);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
  opacity: 0.5;
}

.tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.92));
}

.category-tile strong,
.category-tile em {
  position: relative;
  z-index: 1;
}

.category-tile strong {
  color: #f8fafc;
  font-size: 24px;
}

.category-tile em {
  margin-top: 8px;
  color: #cbd5e1;
  font-style: normal;
  font-size: 14px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 160px;
  gap: 12px;
  margin: 28px 0;
  padding: 16px;
  border: 1px solid rgba(51, 65, 85, 0.78);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.7);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid rgba(100, 116, 139, 0.42);
  border-radius: 14px;
  outline: 0;
  color: #f8fafc;
  background: rgba(30, 41, 59, 0.84);
  padding: 12px 14px;
}

.no-results {
  display: none;
  padding: 24px;
  border-radius: 18px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.7);
}

.no-results.is-visible {
  display: block;
}

.detail-hero {
  padding: 34px 0 0;
}

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

.breadcrumb a:hover {
  color: #34d399;
}

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

.detail-copy h1 {
  font-size: clamp(32px, 5vw, 56px);
}

.detail-intro {
  margin: 16px 0 20px;
  color: #cbd5e1;
  font-size: 17px;
}

.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-stats span {
  border-radius: 999px;
  padding: 7px 12px;
  color: #d1fae5;
  background: rgba(6, 95, 70, 0.24);
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(100, 116, 139, 0.32);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

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

.watch-section,
.article-panel {
  margin-top: 36px;
  padding: 22px;
  border: 1px solid rgba(51, 65, 85, 0.7);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 24px 65px rgba(2, 6, 23, 0.34);
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #f8fafc;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.14), rgba(2, 6, 23, 0.7));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-layer span {
  width: 78px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #022c22;
  background: linear-gradient(135deg, #34d399, #22d3ee);
  box-shadow: 0 0 55px rgba(34, 211, 238, 0.35);
}

.play-layer span::before {
  content: "▶";
  margin-left: 4px;
  font-size: 28px;
}

.play-layer.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.article-panel h2 {
  margin: 0 0 12px;
  color: #f8fafc;
  font-size: 26px;
}

.article-panel p {
  margin: 0 0 16px;
  color: #cbd5e1;
  line-height: 1.9;
}

.search-shell {
  min-height: 460px;
}

@media (max-width: 1120px) {
  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .hero-content {
    grid-template-columns: 1fr 300px;
  }
}

@media (max-width: 860px) {
  .desktop-nav,
  .site-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .header-inner {
    height: 64px;
  }

  .hero-carousel,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 42px 0 92px;
  }

  .hero-poster {
    width: min(320px, 100%);
    min-height: 420px;
    margin: 0 auto;
    transform: none;
  }

  .section-head,
  .page-head {
    display: block;
  }

  .section-more {
    display: inline-flex;
    margin-top: 14px;
  }

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

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

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

  .detail-poster {
    max-width: 340px;
  }
}

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

  .brand-text {
    font-size: 19px;
  }

  .movie-grid,
  .rank-grid,
  .related-grid,
  .search-grid,
  .category-grid {
    gap: 14px;
  }

  .movie-body {
    padding: 11px;
  }

  .movie-line,
  .movie-tags {
    display: none;
  }

  .category-tile {
    min-height: 170px;
    padding: 16px;
  }

  .watch-section,
  .article-panel {
    padding: 14px;
    border-radius: 20px;
  }
}
