:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.88);
  --bg-card-solid: #111827;
  --border: rgba(148, 163, 184, 0.16);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --primary: #10b981;
  --primary-dark: #059669;
  --primary-soft: rgba(16, 185, 129, 0.16);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.20), transparent 28rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.15), transparent 30rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

img {
  max-width: 100%;
}

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1200px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ecfdf5;
  font-weight: 900;
  background: linear-gradient(135deg, #10b981, #047857);
  box-shadow: 0 16px 35px rgba(16, 185, 129, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.04em;
}

.brand-text em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--soft);
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(16, 185, 129, 0.15);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.85);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.icon-button:hover {
  transform: translateY(-1px);
  border-color: rgba(16, 185, 129, 0.55);
  background: rgba(16, 185, 129, 0.14);
}

.menu-button {
  display: none;
}

.search-panel {
  display: none;
  border-top: 1px solid var(--border);
}

.search-panel.open {
  display: block;
}

.search-form {
  width: min(900px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0;
  display: flex;
  gap: 10px;
}

.search-input {
  flex: 1;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 18px;
  outline: none;
  color: #fff;
  background: rgba(15, 23, 42, 0.92);
}

.search-input:focus {
  border-color: rgba(16, 185, 129, 0.8);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  gap: 10px;
  flex-wrap: wrap;
}

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

.mobile-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.88);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 84px 0 64px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.42;
  background-position: center;
  background-size: cover;
  filter: saturate(1.1);
  transform: scale(1.04);
}

.hero-bg::after {
  content: "";
  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.35) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.28) 46%, rgba(2, 6, 23, 0.50) 100%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: 42px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 8px 13px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.10);
  font-size: 13px;
  letter-spacing: 0.05em;
}

.hero h1 {
  margin: 22px 0 18px;
  max-width: 780px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 720px;
  color: #d1d5db;
  font-size: 18px;
  line-height: 1.85;
}

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

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #ecfdf5;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 18px 36px rgba(16, 185, 129, 0.28);
}

.secondary-button {
  color: #e2e8f0;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.78);
}

.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-2px);
}

.primary-button.compact {
  min-height: 42px;
  padding: 0 18px;
}

.hero-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-poster {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(30, 41, 59, 0.70));
}

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

.hero-card-info {
  padding: 22px;
}

.hero-card-info strong {
  display: block;
  font-size: 20px;
}

.hero-card-info span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

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

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

.hero-dot.active {
  width: 28px;
  background: var(--primary);
}

.main-content {
  padding: 56px 0 72px;
}

.section {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 64px;
}

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

.section-head h2,
.category-hero h1,
.library-hero h1,
.detail-title h1,
.rank-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-head p,
.category-hero p,
.library-hero p,
.rank-hero p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  flex: 0 0 auto;
  color: #a7f3d0;
  font-weight: 700;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 26px 65px rgba(0, 0, 0, 0.32);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, rgba(16, 185, 129, 0.25), transparent 36%),
    linear-gradient(135deg, #111827, #020617);
}

.poster-frame img,
.mini-img,
.rank-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

.image-hidden {
  opacity: 0;
}

.movie-card:hover .poster-frame img {
  transform: scale(1.07);
}

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent);
}

.poster-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ecfdf5;
  background: rgba(16, 185, 129, 0.92);
  box-shadow: 0 12px 26px rgba(16, 185, 129, 0.28);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #a7f3d0;
  font-size: 12px;
}

.card-body h2 {
  margin: 8px 0 8px;
  color: #fff;
  font-size: 17px;
  line-height: 1.35;
}

.card-body p {
  min-height: 48px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

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

.tag-row span,
.meta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.12);
  font-size: 12px;
}

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

.category-tile {
  min-height: 132px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.18), transparent 55%),
    rgba(15, 23, 42, 0.78);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(16, 185, 129, 0.48);
}

.category-tile strong {
  display: block;
  color: #fff;
  font-size: 20px;
}

.category-tile span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 58px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.78);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(16, 185, 129, 0.42);
}

.rank-number {
  color: #a7f3d0;
  font-weight: 900;
  font-size: 18px;
}

.rank-thumb {
  width: 58px;
  height: 78px;
  border-radius: 12px;
  overflow: hidden;
  background: #111827;
}

.rank-info strong,
.mini-info strong {
  display: block;
  color: #fff;
  line-height: 1.35;
}

.rank-info em,
.mini-info em {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.category-hero,
.library-hero,
.rank-hero {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0 34px;
}

.filter-bar {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-button {
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.78);
  cursor: pointer;
}

.filter-button.active,
.filter-button:hover {
  color: #fff;
  border-color: rgba(16, 185, 129, 0.54);
  background: rgba(16, 185, 129, 0.16);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  background-position: center;
  background-size: cover;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 48%, rgba(2, 6, 23, 0.35) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.20) 60%);
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 96px 0 56px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  aspect-ratio: 2 / 3;
  background: rgba(15, 23, 42, 0.92);
  box-shadow: var(--shadow);
}

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

.detail-title h1 {
  max-width: 860px;
}

.detail-title p {
  max-width: 880px;
  margin-top: 18px;
  color: #d1d5db;
  font-size: 17px;
  line-height: 1.85;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.detail-layout {
  padding: 52px 0 78px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 34px;
}

.content-card,
.sidebar-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.20);
}

.content-card {
  padding: 26px;
  margin-bottom: 24px;
}

.content-card h2,
.sidebar-card h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 24px;
}

.content-card p {
  color: #cbd5e1;
  line-height: 2;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
}

.video-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  cursor: pointer;
  background:
    radial-gradient(circle at center, rgba(16, 185, 129, 0.22), transparent 36%),
    rgba(2, 6, 23, 0.62);
}

.player-overlay span {
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 18px 45px rgba(16, 185, 129, 0.30);
}

.player-overlay strong {
  font-size: 18px;
}

.player-shell.is-playing .player-overlay {
  display: none;
}

.sidebar-card {
  padding: 18px;
  margin-bottom: 20px;
}

.meta-list {
  display: grid;
  gap: 12px;
}

.meta-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
  padding-bottom: 10px;
}

.meta-list strong {
  color: #e2e8f0;
  font-weight: 600;
}

.mini-list {
  display: grid;
  gap: 12px;
}

.mini-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.mini-poster {
  width: 58px;
  height: 78px;
  overflow: hidden;
  border-radius: 12px;
  background: #111827;
}

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

.empty-state {
  display: none;
  padding: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.72);
}

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

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.88);
}

.footer-grid {
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.7fr;
  gap: 32px;
}

.footer-brand {
  display: inline-block;
  margin-bottom: 12px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 16px;
}

.site-footer a {
  display: block;
  margin: 6px 0;
}

.site-footer a:hover {
  color: #a7f3d0;
}

.copyright {
  border-top: 1px solid rgba(148, 163, 184, 0.10);
  padding: 18px 16px;
  color: #64748b;
  text-align: center;
}

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

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

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

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

  .menu-button {
    display: inline-block;
  }

  .brand-text em {
    display: none;
  }

  .hero {
    min-height: 720px;
  }

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

  .hero-card {
    max-width: 320px;
  }

  .detail-poster {
    width: 210px;
  }

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

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

@media (max-width: 560px) {
  .nav-wrap {
    height: 64px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }

  .brand-text strong {
    font-size: 17px;
  }

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

  .hero h1 {
    font-size: 42px;
  }

  .hero p,
  .detail-title p {
    font-size: 15px;
  }

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

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

  .detail-hero {
    min-height: 620px;
  }

  .detail-layout {
    padding-top: 28px;
  }

  .content-card {
    padding: 20px;
  }
}
