:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.86);
  --panel-strong: #111827;
  --line: #1e293b;
  --line-soft: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --teal: #14b8a6;
  --teal-dark: #0f766e;
  --teal-soft: rgba(20, 184, 166, 0.18);
  --orange: #f59e0b;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.12), transparent 32rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.10), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

[hidden] {
  display: none !important;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

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

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--teal), #22d3ee);
  color: #001917;
  font-size: 15px;
  box-shadow: 0 12px 34px rgba(20, 184, 166, 0.26);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

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

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

.nav-link:hover {
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.92);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px 16px;
}

.mobile-nav.is-open {
  display: flex;
}

.mobile-link {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.36);
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 540px;
  overflow: hidden;
  background: #000;
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.70) 42%, rgba(0, 0, 0, 0.18)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent 46%);
}

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

.hero-copy {
  width: min(680px, 100%);
}

.eyebrow {
  margin: 0 0 14px;
  color: #5eead4;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.inner-hero h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-desc {
  max-width: 680px;
  margin: 22px 0 30px;
  color: var(--muted);
  font-size: 18px;
}

.hero-actions,
.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

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

.primary-button {
  background: var(--teal);
  color: #001917;
  box-shadow: 0 16px 36px rgba(20, 184, 166, 0.24);
}

.primary-button:hover,
.section-more:hover {
  transform: translateY(-2px);
  background: #2dd4bf;
}

.ghost-button {
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--text);
  background: rgba(15, 23, 42, 0.45);
}

.ghost-button:hover {
  transform: translateY(-2px);
  border-color: rgba(94, 234, 212, 0.55);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.46);
  color: white;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

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

.section-block {
  padding: 54px 0;
}

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

.section-heading h2,
.filter-head h2,
.footer-main h2,
.info-panel h2,
.detail-content h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
}

.section-heading p,
.filter-head p,
.inner-hero p,
.footer-main p,
.movie-brief,
.detail-meta,
.lead-text {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  background: rgba(20, 184, 166, 0.14);
  color: #7dd3fc;
  border: 1px solid rgba(20, 184, 166, 0.28);
}

.home-search {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.8fr);
  gap: 22px;
  margin-top: -44px;
  position: relative;
  z-index: 10;
}

.search-link-card,
.filter-box,
.category-card,
.movie-card,
.info-panel,
.detail-content,
.player-card {
  border: 1px solid var(--line-soft);
  background: var(--panel-soft);
  box-shadow: var(--shadow);
}

.search-link-card,
.filter-box {
  border-radius: var(--radius);
  padding: 22px;
}

.search-link-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.search-link-card p {
  color: var(--muted);
}

.filter-controls input,
.filter-controls select,
.inline-filter input {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.72);
  color: var(--text);
  outline: none;
}

.filter-controls input,
.inline-filter input {
  flex: 1 1 260px;
  padding: 0 16px;
}

.filter-controls select {
  padding: 0 42px 0 14px;
}

.filter-controls input:focus,
.filter-controls select:focus,
.inline-filter input:focus {
  border-color: rgba(20, 184, 166, 0.72);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.empty-state {
  margin: 22px 0 0;
  padding: 18px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
  color: var(--muted);
}

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

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

.category-card {
  min-height: 150px;
  padding: 22px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(20, 184, 166, 0.16), transparent),
    rgba(15, 23, 42, 0.88);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(45, 212, 191, 0.42);
  background:
    linear-gradient(145deg, rgba(20, 184, 166, 0.24), transparent),
    rgba(15, 23, 42, 0.94);
}

.category-card strong {
  display: block;
  margin-bottom: 12px;
  font-size: 22px;
}

.category-card span {
  color: var(--muted);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(20, 184, 166, 0.42);
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.62);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.20), rgba(15, 23, 42, 0.86)),
    #0f172a;
}

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

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

.play-circle,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-grid;
  place-items: center;
}

.play-circle {
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(20, 184, 166, 0.88);
  color: #001917;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.82);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f97316, var(--orange));
  color: #160900;
  font-weight: 900;
}

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

.movie-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 20px;
  margin: 0 0 8px;
  color: var(--subtle);
  font-size: 13px;
}

.movie-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 850;
}

.movie-card h3 a:hover {
  color: #5eead4;
}

.movie-brief {
  display: -webkit-box;
  min-height: 46px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 14px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.chip-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: #99f6e4;
  font-size: 12px;
  font-weight: 700;
}

.inline-filter {
  margin-bottom: 20px;
}

.inner-hero {
  padding: 90px 0 66px;
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.72));
  border-bottom: 1px solid var(--line);
}

.inner-hero .container {
  max-width: 880px;
}

.inner-hero p:last-child {
  font-size: 18px;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--subtle);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #5eead4;
}

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

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  background:
    radial-gradient(circle, rgba(20, 184, 166, 0.20), transparent 28%),
    rgba(0, 0, 0, 0.36);
  color: var(--text);
  border: 0;
  cursor: pointer;
}

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

.big-play {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: var(--teal);
  color: #001917;
  font-size: 32px;
  box-shadow: 0 16px 44px rgba(20, 184, 166, 0.34);
}

.detail-content,
.info-panel {
  border-radius: 22px;
  padding: 24px;
}

.detail-content {
  margin-top: 22px;
}

.detail-content h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.15;
  font-weight: 900;
}

.detail-content h2 {
  margin-top: 26px;
  font-size: 24px;
}

.detail-content p {
  color: var(--muted);
}

.lead-text {
  font-size: 18px;
  color: var(--text);
}

.info-panel {
  position: sticky;
  top: 86px;
}

.info-panel img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
  object-fit: cover;
  background: #0f172a;
}

.info-panel h2 {
  margin-top: 18px;
  font-size: 24px;
}

.info-panel dl {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.info-panel dl div {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.info-panel dt {
  color: var(--subtle);
}

.info-panel dd {
  margin: 0;
  color: var(--text);
}

.full {
  width: 100%;
  margin-top: 18px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: 36px;
  padding: 42px 0;
}

.footer-main p {
  max-width: 560px;
}

.footer-links {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}

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

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

.site-footer h2 {
  margin: 0;
  font-size: 17px;
}

.footer-bottom {
  padding: 18px;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  text-align: center;
}

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

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

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

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

  .info-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: block;
  }

  .hero {
    min-height: 620px;
  }

  .hero-shade {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.34));
  }

  .hero-content {
    align-items: flex-end;
    padding-bottom: 86px;
  }

  .hero-arrow {
    top: auto;
    bottom: 24px;
    transform: none;
  }

  .hero-arrow:hover {
    transform: scale(1.05);
  }

  .home-search {
    grid-template-columns: 1fr;
  }

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

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

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

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

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

  .hero-copy h1,
  .hero-copy h2,
  .inner-hero h1 {
    font-size: 38px;
  }

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

  .hero-prev {
    left: 12px;
  }

  .hero-next {
    right: 12px;
  }

  .category-grid,
  .category-grid.large,
  .movie-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .filter-controls {
    display: grid;
  }

  .filter-controls input,
  .filter-controls select {
    width: 100%;
  }

  .detail-content,
  .info-panel {
    padding: 18px;
  }
}
