:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --teal: #14b8a6;
  --teal-dark: #0f766e;
  --amber: #f59e0b;
  --rose: #fb7185;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(20, 184, 166, 0.18), transparent 32rem),
    radial-gradient(circle at 80% 12%, rgba(244, 63, 94, 0.14), transparent 28rem),
    var(--bg);
  color: var(--text);
}

body.menu-open {
  overflow: hidden;
}

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

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

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

.header-inner,
.footer-inner,
.page-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--teal), #22d3ee);
  color: #001f1d;
  box-shadow: 0 12px 28px rgba(20, 184, 166, 0.28);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--soft);
  font-size: 15px;
}

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

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

.nav-link.active::after,
.nav-link:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1px;
  height: 2px;
  border-radius: 999px;
  background: var(--teal);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--line);
  font-size: 22px;
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-nav .nav-link {
  display: block;
  padding: 12px 8px;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.68) 42%, rgba(0, 0, 0, 0.16)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent 42%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-panel {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 52px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  color: #99f6e4;
  background: rgba(20, 184, 166, 0.13);
  border: 1px solid rgba(20, 184, 166, 0.35);
  font-weight: 700;
  font-size: 13px;
}

.hero h1 {
  margin: 22px 0 16px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.hero-meta,
.detail-meta,
.movie-meta,
.rank-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
}

.hero-meta span,
.detail-meta span,
.movie-meta span,
.rank-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(15, 23, 42, 0.55);
}

.hero-desc {
  max-width: 680px;
  margin: 18px 0 30px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.85;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #001f1d;
  background: linear-gradient(135deg, #2dd4bf, #5eead4);
  box-shadow: 0 18px 40px rgba(20, 184, 166, 0.25);
}

.btn-secondary {
  color: #ffffff;
  border-color: var(--line);
  background: rgba(15, 23, 42, 0.64);
  backdrop-filter: blur(12px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  width: min(1200px, calc(100% - 32px));
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.hero-arrows,
.hero-dots {
  display: flex;
  gap: 10px;
  pointer-events: auto;
}

.hero-arrow,
.hero-dot {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.62);
  color: #ffffff;
  backdrop-filter: blur(12px);
  cursor: pointer;
}

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

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

.hero-dot.active {
  background: var(--teal);
  border-color: var(--teal);
}

.page-shell {
  padding: 42px 0 70px;
}

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

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

.section-heading h2,
.page-heading h1,
.detail-main h1,
.category-hero h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.045em;
}

.section-heading p,
.page-heading p,
.category-hero p {
  margin: 9px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  color: #99f6e4;
  font-weight: 800;
}

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

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

.movie-card,
.category-card,
.rank-card,
.detail-panel,
.search-panel,
.player-shell {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.movie-card {
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(20, 184, 166, 0.52);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.16), rgba(15, 23, 42, 0.9));
}

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

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #001f1d;
  background: #5eead4;
  font-weight: 900;
  font-size: 12px;
}

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

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

.movie-card p {
  min-height: 64px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.58;
}

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

.tag-row span,
.detail-tags span {
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(148, 163, 184, 0.12);
  color: #cbd5e1;
  font-size: 12px;
}

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

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

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(20, 184, 166, 0.5);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.category-card p {
  color: var(--muted);
  line-height: 1.7;
}

.category-link {
  color: #99f6e4;
  font-weight: 800;
}

.category-hero,
.page-hero {
  padding: 36px;
  border-radius: 30px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(15, 23, 42, 0.94)),
    radial-gradient(circle at 80% 30%, rgba(251, 113, 133, 0.15), transparent 22rem);
  box-shadow: var(--shadow);
}

.search-panel {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.7fr;
  gap: 12px;
  padding: 16px;
  margin-bottom: 26px;
}

.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.5);
  color: #ffffff;
  padding: 0 14px;
  outline: none;
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: rgba(20, 184, 166, 0.65);
}

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

.rank-card {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 18px;
  padding: 14px;
  align-items: center;
}

.rank-cover {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
}

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

.rank-num {
  position: absolute;
  left: 8px;
  top: 8px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #001f1d;
  background: #5eead4;
  font-weight: 900;
}

.rank-card h2,
.rank-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-card p {
  color: var(--muted);
  line-height: 1.65;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 34px;
  align-items: stretch;
}

.detail-poster {
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 30px;
  border-radius: 30px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(20, 184, 166, 0.15), rgba(15, 23, 42, 0.88)),
    radial-gradient(circle at 80% 20%, rgba(251, 113, 133, 0.12), transparent 20rem);
}

.detail-main h1 {
  margin-top: 18px;
}

.detail-main .intro {
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.9;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.player-shell {
  margin-top: 38px;
  padding: 18px;
  background: rgba(2, 6, 23, 0.88);
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.64));
  cursor: pointer;
  z-index: 3;
}

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

.play-button {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #001f1d;
  background: #5eead4;
  font-size: 32px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 20px 48px rgba(20, 184, 166, 0.32);
}

.detail-panel {
  padding: 28px;
  margin-top: 30px;
}

.detail-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-panel p {
  color: #dbeafe;
  line-height: 2;
}

.breadcrumb {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #99f6e4;
}

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

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 34px 0;
  color: var(--muted);
}

.footer-logo {
  color: #ffffff;
  font-size: 20px;
}

.footer-inner p {
  max-width: 620px;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}

.footer-links a {
  color: #cbd5e1;
}

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

.empty-result {
  display: none;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.72);
}

.empty-result.show {
  display: block;
}

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

  .menu-toggle {
    display: block;
  }

  .mobile-nav.open {
    display: block;
  }

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

@media (max-width: 760px) {
  .header-inner,
  .footer-inner,
  .page-shell,
  .hero-panel,
  .hero-controls {
    width: min(100% - 22px, 1200px);
  }

  .hero {
    min-height: 76vh;
  }

  .hero h1 {
    font-size: clamp(36px, 12vw, 56px);
  }

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

  .section-heading,
  .page-heading,
  .footer-inner {
    display: block;
  }

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

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

  .movie-card p {
    min-height: auto;
  }

  .search-panel,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .rank-card {
    grid-template-columns: 86px 1fr;
    gap: 12px;
  }

  .category-hero,
  .page-hero,
  .detail-main,
  .detail-panel {
    padding: 22px;
    border-radius: 24px;
  }
}

@media (max-width: 480px) {
  .brand-text {
    font-size: 18px;
  }

  .movie-grid,
  .movie-grid.wide,
  .category-grid,
  .rank-list {
    grid-template-columns: 1fr;
  }

  .rank-card {
    grid-template-columns: 104px 1fr;
  }

  .hero-controls {
    bottom: 18px;
  }

  .hero-arrows {
    display: none;
  }
}
