:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.76);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(20, 184, 166, 0.42);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --teal: #14b8a6;
  --cyan: #67e8f9;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.34);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 14% 8%, rgba(20, 184, 166, 0.18), transparent 28rem),
    radial-gradient(circle at 84% 10%, rgba(103, 232, 249, 0.12), transparent 26rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(2, 6, 23, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.header-inner {
  max-width: 1320px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #031316;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 10px 28px rgba(20, 184, 166, 0.3);
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.nav-link,
.mobile-link {
  color: var(--muted-2);
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--cyan);
}

.header-search {
  display: flex;
  width: min(360px, 32vw);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.72);
}

.header-search input,
.big-search input,
.local-filter input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.header-search input {
  padding: 11px 14px;
}

.header-search button,
.big-search button,
.small-button,
.section-more,
.primary-button,
.ghost-button {
  border: 0;
  cursor: pointer;
  color: white;
  font-weight: 700;
}

.header-search button {
  padding: 0 18px;
  background: linear-gradient(135deg, var(--teal), #0891b2);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.menu-button span {
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 8px 24px 18px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.96);
}

.mobile-nav.open {
  display: grid;
  gap: 14px;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  background-size: cover;
  background-position: center;
  transition: opacity 0.85s ease, visibility 0.85s ease, transform 5s ease;
  transform: scale(1.02);
}

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

.hero-shade,
.detail-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.74) 38%, rgba(2, 6, 23, 0.32) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.22) 58%, rgba(2, 6, 23, 0.4) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1320px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px 92px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
}

.hero-tags,
.card-meta,
.tag-row,
.detail-meta-grid,
.year-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags span,
.tag-row span,
.detail-meta-grid span,
.year-buttons button {
  padding: 7px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.12);
  color: var(--cyan);
  font-size: 13px;
}

.hero-content h1 {
  max-width: 780px;
  margin: 20px 0 14px;
  font-size: clamp(38px, 6vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 30px;
  color: var(--muted-2);
  font-size: clamp(16px, 1.8vw, 21px);
  line-height: 1.8;
}

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

.primary-button,
.ghost-button,
.section-more,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.primary-button,
.small-button {
  background: linear-gradient(135deg, var(--teal), #0891b2);
  box-shadow: 0 16px 36px rgba(20, 184, 166, 0.22);
}

.ghost-button,
.section-more {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.68);
  color: var(--muted-2);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.5);
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

.hero-dot.active {
  width: 34px;
  background: var(--teal);
}

.home-search-panel,
.content-section,
.detail-content,
.player-section,
.rank-list {
  max-width: 1320px;
  margin: 0 auto;
  padding: 58px 24px;
}

.home-search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 560px);
  gap: 30px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.home-search-panel h2,
.section-head h2,
.sub-hero h1,
.detail-intro h1,
.text-panel h2 {
  margin: 0;
  letter-spacing: -0.02em;
}

.home-search-panel h2,
.section-head h2 {
  font-size: clamp(24px, 3vw, 36px);
}

.big-search {
  display: flex;
  min-height: 56px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.78);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.big-search input {
  padding: 0 18px;
  font-size: 16px;
}

.big-search button {
  padding: 0 24px;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--teal), #0891b2);
}

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

.horizontal-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 250px);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 14px;
  scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
  display: none;
}

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

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

.movie-card,
.compact-card,
.category-tile,
.category-overview-card,
.rank-row,
.text-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.movie-card {
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.movie-card:hover,
.compact-card:hover,
.category-tile:hover,
.category-overview-card:hover,
.rank-row:hover {
  border-color: var(--line-strong);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(20, 184, 166, 0.12);
}

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

.poster-link img,
.compact-card img,
.category-overview-card img,
.rank-poster img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-link img {
  transition: transform 0.35s ease;
}

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

.card-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.92);
  color: #031316;
  font-size: 13px;
  font-weight: 800;
}

.card-body {
  padding: 15px;
}

.card-meta {
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.card-body h3 {
  margin: 10px 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.card-body p {
  margin: 0 0 12px;
  min-height: 68px;
  color: var(--muted-2);
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row span {
  padding: 5px 9px;
  font-size: 12px;
}

.compact-card {
  display: grid;
  grid-template-rows: 280px 1fr;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.compact-card span {
  padding: 15px;
}

.compact-card strong,
.compact-card em {
  display: block;
}

.compact-card strong {
  margin-bottom: 6px;
  font-size: 17px;
}

.compact-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

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

.category-tile,
.category-overview-card {
  min-height: 156px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.category-tile span,
.category-overview-card strong {
  font-size: 22px;
  font-weight: 800;
}

.category-tile em,
.category-overview-card em {
  color: var(--muted-2);
  font-style: normal;
  line-height: 1.6;
}

.category-overview-card {
  min-height: 260px;
  padding: 0;
}

.category-overview-card img {
  height: 170px;
}

.category-overview-card span {
  padding: 18px;
}

.sub-hero {
  max-width: 1320px;
  margin: 0 auto;
  padding: 82px 24px 36px;
}

.sub-hero h1 {
  font-size: clamp(38px, 5vw, 68px);
}

.sub-hero p:not(.eyebrow) {
  max-width: 760px;
  color: var(--muted-2);
  font-size: 18px;
  line-height: 1.8;
}

.local-filter {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.local-filter input {
  min-height: 52px;
  max-width: 620px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.82);
}

.year-buttons button {
  cursor: pointer;
}

.year-buttons button.active,
.year-buttons button:hover {
  color: #031316;
  background: var(--cyan);
}

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

.rank-row {
  display: grid;
  grid-template-columns: 70px 96px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.rank-index {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  color: #031316;
  font-weight: 900;
}

.rank-poster {
  display: block;
  width: 96px;
  height: 132px;
  border-radius: 14px;
  overflow: hidden;
}

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

.rank-info p {
  margin: 0 0 12px;
  color: var(--muted-2);
  line-height: 1.65;
}

.detail-hero {
  position: relative;
  overflow: hidden;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(8px);
  transform: scale(1.05);
  opacity: 0.72;
}

.detail-shell {
  position: relative;
  z-index: 2;
  max-width: 1320px;
  margin: 0 auto;
  padding: 48px 24px 58px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  color: var(--muted-2);
  font-size: 14px;
}

.crumbs a {
  color: var(--cyan);
}

.detail-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 36px;
  align-items: end;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.detail-intro h1 {
  margin-top: 18px;
  font-size: clamp(36px, 5vw, 70px);
}

.lead-text {
  max-width: 850px;
  color: var(--muted-2);
  font-size: 19px;
  line-height: 1.8;
}

.detail-meta-grid {
  margin: 24px 0;
}

.detail-meta-grid span {
  display: inline-flex;
  gap: 8px;
  border-radius: 14px;
}

.detail-meta-grid b {
  color: var(--text);
}

.large-tags span {
  font-size: 14px;
}

.player-section {
  padding-top: 30px;
  padding-bottom: 30px;
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background: #000;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.68));
  cursor: pointer;
}

.play-overlay.hidden {
  display: none;
}

.play-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  color: #031316;
  font-size: 34px;
  box-shadow: 0 20px 50px rgba(20, 184, 166, 0.36);
}

.play-overlay strong {
  font-size: 20px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding-top: 28px;
}

.text-panel {
  padding: 28px;
}

.text-panel h2 {
  font-size: 26px;
  margin-bottom: 16px;
}

.text-panel p {
  margin: 0;
  color: var(--muted-2);
  font-size: 16px;
  line-height: 1.95;
}

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

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.74);
}

.footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 32px;
}

.footer-brand {
  color: var(--cyan);
  font-size: 22px;
}

.site-footer p {
  max-width: 420px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  justify-content: flex-end;
  align-content: start;
}

.footer-links a {
  color: var(--muted-2);
}

.footer-links a:hover {
  color: var(--cyan);
}

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

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

  .menu-button {
    display: flex;
    margin-left: auto;
  }

  .hero {
    height: 610px;
  }

  .home-search-panel,
  .detail-layout,
  .detail-content,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

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

  .rank-row {
    grid-template-columns: 50px 84px 1fr;
  }

  .rank-row .small-button {
    grid-column: 3;
    justify-self: start;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .header-inner,
  .hero-content,
  .home-search-panel,
  .content-section,
  .sub-hero,
  .detail-shell,
  .player-section,
  .detail-content,
  .rank-list,
  .footer-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .hero {
    height: 560px;
  }

  .hero-content {
    padding-bottom: 76px;
  }

  .hero-arrow {
    display: none;
  }

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

  .big-search input,
  .big-search button {
    min-height: 52px;
  }

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

  .card-body {
    padding: 12px;
  }

  .card-body p {
    min-height: auto;
    -webkit-line-clamp: 2;
  }

  .compact-card {
    grid-template-rows: 220px 1fr;
  }

  .rank-row {
    grid-template-columns: 42px 72px 1fr;
    gap: 12px;
  }

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

  .rank-info h2 {
    font-size: 17px;
  }

  .rank-info p {
    display: none;
  }

  .detail-intro h1 {
    font-size: 36px;
  }

  .play-icon {
    width: 68px;
    height: 68px;
    font-size: 26px;
  }
}
