:root {
  --emerald-50: #ecfdf5;
  --emerald-100: #d1fae5;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --cyan-600: #0891b2;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-900: #0f172a;
  --white: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.08);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--slate-900);
  background: linear-gradient(180deg, #f8fffb 0%, #f8fafc 44%, #eefcf7 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--emerald-600), var(--teal-600), var(--cyan-600));
  box-shadow: 0 12px 26px rgba(13, 148, 136, 0.24);
}

.nav-bar {
  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;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--emerald-700);
  background: var(--white);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

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

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

.brand-text small {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 500;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-weight: 650;
}

.desktop-nav > a,
.nav-dropdown > button {
  color: rgba(255, 255, 255, 0.94);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav > a:hover,
.desktop-nav > a.active,
.nav-dropdown > button:hover {
  color: var(--emerald-100);
  transform: translateY(-1px);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-panel {
  position: absolute;
  top: calc(100% + 14px);
  right: 0;
  width: 188px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow);
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--slate-700);
}

.nav-dropdown-panel a:hover {
  color: var(--emerald-700);
  background: var(--emerald-50);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

.mobile-nav a {
  display: block;
  padding: 12px 14px;
  margin-top: 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
}

.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: #06241d;
}

.hero-track {
  position: relative;
  min-height: 620px;
}

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

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

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 36, 29, 0.94), rgba(6, 36, 29, 0.68) 42%, rgba(6, 36, 29, 0.18)), linear-gradient(0deg, rgba(6, 36, 29, 0.88), transparent 46%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 620px;
  align-content: center;
  padding: 96px 0 80px;
  width: min(680px, calc(100% - 32px));
  margin-left: max(16px, calc((100vw - 1200px) / 2));
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--emerald-100);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 7vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: var(--emerald-700);
  background: var(--white);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  background: var(--emerald-50);
}

.btn-secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.btn-green {
  color: var(--white);
  background: linear-gradient(90deg, var(--emerald-600), var(--teal-600));
  box-shadow: 0 14px 28px rgba(5, 150, 105, 0.24);
}

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

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

.hero-dot.active {
  background: var(--white);
}

.section {
  padding: 72px 0;
}

.section.compact {
  padding: 42px 0;
}

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

.section-title h2,
.section-title h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-title p {
  color: var(--slate-600);
  line-height: 1.75;
}

.search-panel {
  position: relative;
  z-index: 5;
  margin-top: -36px;
}

.search-box {
  display: grid;
  grid-template-columns: 1.5fr 1fr auto;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.search-box input,
.search-box select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--slate-900);
  background: var(--white);
  outline: none;
}

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

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 152px;
  padding: 22px;
  border: 1px solid rgba(226, 232, 240, 0.82);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  right: -46px;
  bottom: -56px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(20, 184, 166, 0.08));
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #d1fae5, #ecfeff);
}

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

.movie-card:hover .poster-link img,
.related-card:hover img,
.rank-item:hover img {
  transform: scale(1.055);
}

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(5, 150, 105, 0.9);
  font-size: 12px;
  font-weight: 800;
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--emerald-700);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
}

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

.movie-meta-line {
  color: var(--emerald-700);
  font-size: 13px;
  font-weight: 750;
}

.movie-card h2,
.rank-info h2,
.related-card h3 {
  margin: 8px 0;
  color: var(--slate-900);
  font-size: 19px;
  line-height: 1.35;
}

.movie-card h2 a:hover,
.rank-info h2 a:hover,
.related-card h3 a:hover {
  color: var(--emerald-700);
}

.movie-card p,
.rank-info p {
  color: var(--slate-600);
  font-size: 14px;
  line-height: 1.75;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--emerald-700);
  background: var(--emerald-50);
  font-size: 12px;
  font-weight: 700;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 82px 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.rank-num {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--slate-600);
  background: var(--slate-100);
  font-weight: 900;
}

.rank-num.hot {
  color: var(--white);
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.rank-thumb {
  overflow: hidden;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  background: var(--emerald-50);
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.page-hero {
  color: var(--white);
  background: radial-gradient(circle at 20% 20%, rgba(209, 250, 229, 0.28), transparent 26%), linear-gradient(135deg, #065f46, #0f766e 48%, #155e75);
}

.page-hero-inner {
  padding: 82px 0;
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.85;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--white);
}

.detail-hero {
  padding: 54px 0 42px;
  color: var(--white);
  background: linear-gradient(135deg, #052e26 0%, #134e4a 58%, #155e75 100%);
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: 0 28px 58px rgba(0, 0, 0, 0.32);
}

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

.detail-title p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.85;
}

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

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--emerald-100);
  background: rgba(255, 255, 255, 0.12);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.92fr);
  gap: 28px;
}

.panel {
  padding: 24px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

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

.panel p {
  color: var(--slate-600);
  line-height: 1.9;
}

.player-panel {
  overflow: hidden;
  padding: 0;
  background: #020617;
}

.player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.64;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.32));
}

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

.play-button {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border: 0;
  border-radius: 50%;
  color: var(--emerald-700);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.32);
  cursor: pointer;
}

.play-button span {
  margin-left: 5px;
  font-size: 32px;
}

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

.related-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.related-card a:first-child {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.related-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-card div {
  padding: 14px;
}

.related-card p {
  color: var(--slate-600);
  font-size: 13px;
  line-height: 1.7;
}

.empty-result {
  display: none;
  padding: 24px;
  border-radius: var(--radius-lg);
  color: var(--slate-600);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

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

.site-footer {
  margin-top: 72px;
  color: rgba(255, 255, 255, 0.82);
  background: #052e26;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.7fr;
  gap: 36px;
  padding: 48px 0;
}

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

.site-footer p {
  max-width: 520px;
  margin: 12px 0 0;
  line-height: 1.75;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: var(--white);
  font-size: 17px;
}

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

.site-footer a:hover {
  color: var(--emerald-100);
}

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  color: rgba(255, 255, 255, 0.66);
}

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

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

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

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

  .desktop-nav {
    display: none;
  }

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

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

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

  .hero-track,
  .hero-content {
    min-height: 560px;
  }

  .hero-content {
    align-content: end;
    padding-bottom: 74px;
  }

  .hero h1,
  .page-hero h1,
  .detail-title h1 {
    font-size: 36px;
  }

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

  .section-header {
    display: block;
  }

  .section-header .btn {
    margin-top: 14px;
  }

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

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

  .category-strip,
  .footer-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    max-width: 240px;
  }

  .rank-item {
    grid-template-columns: 44px 70px 1fr;
    gap: 12px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .rank-info p {
    display: none;
  }
}
