* {
  box-sizing: border-box;
}

:root {
  --bg: #08110f;
  --panel: #101d1a;
  --panel-soft: #152622;
  --mist-50: #f5fbf8;
  --mist-100: #e1eee9;
  --mist-200: #c2d7ce;
  --mist-300: #94afa4;
  --mist-500: #627a70;
  --mist-700: #2c4039;
  --mist-800: #172822;
  --mist-900: #0b1714;
  --swamp-300: #8ce6b5;
  --swamp-400: #45d58c;
  --swamp-500: #19b66a;
  --swamp-600: #0d8d50;
  --gold: #f4c86a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--mist-100);
  background:
    radial-gradient(circle at top left, rgba(25, 182, 106, 0.24), transparent 32rem),
    radial-gradient(circle at 82% 8%, rgba(140, 230, 181, 0.14), transparent 30rem),
    linear-gradient(180deg, #07100e 0%, #0b1714 45%, #08110f 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 17, 15, 0.82);
  backdrop-filter: blur(18px);
}

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

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #042118;
  background: linear-gradient(135deg, var(--swamp-300), var(--swamp-500));
  box-shadow: 0 12px 34px rgba(25, 182, 106, 0.28);
}

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

.nav-link,
.nav-drop-button,
.mobile-panel a {
  color: var(--mist-200);
  font-size: 15px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.nav-drop-button:hover {
  color: #fff;
}

.nav-dropdown {
  position: relative;
}

.nav-drop-button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-drop-panel {
  position: absolute;
  top: 32px;
  left: 0;
  width: 190px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(16, 29, 26, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

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

.nav-drop-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--mist-200);
  font-size: 14px;
}

.nav-drop-panel a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.top-search {
  display: flex;
  align-items: center;
  width: min(300px, 30vw);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.top-search input {
  width: 100%;
  padding: 11px 0 11px 16px;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.top-search input::placeholder {
  color: var(--mist-300);
}

.top-search button,
.hero-button,
.play-button,
.section-more,
.category-link,
.filter-button {
  border: 0;
  cursor: pointer;
  color: #062016;
  font-weight: 700;
  background: linear-gradient(135deg, var(--swamp-300), var(--swamp-500));
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.top-search button {
  padding: 11px 16px;
}

.top-search button:hover,
.hero-button:hover,
.play-button:hover,
.section-more:hover,
.category-link:hover,
.filter-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(25, 182, 106, 0.25);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 24px;
}

.mobile-panel {
  display: none;
  padding: 8px 18px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 17, 15, 0.96);
}

.mobile-panel.is-open {
  display: grid;
  gap: 8px;
}

.mobile-panel a {
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  min-height: 570px;
  padding: 56px 0 34px;
  align-items: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 24px -32px 0;
  z-index: -1;
  border-radius: 36px;
  background:
    linear-gradient(135deg, rgba(25, 182, 106, 0.18), rgba(255, 255, 255, 0.03)),
    radial-gradient(circle at 72% 24%, rgba(244, 200, 106, 0.16), transparent 20rem);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), var(--shadow);
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--swamp-300);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.page-title h1 {
  margin: 18px 0 18px;
  color: #fff;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero p,
.page-title p {
  color: var(--mist-200);
  font-size: 18px;
  line-height: 1.75;
}

.hero-actions,
.hero-tags,
.card-tags,
.meta-list,
.breadcrumbs,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-actions {
  margin-top: 28px;
}

.hero-button,
.play-button,
.category-link,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 14px;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags a,
.card-tags span,
.meta-list span,
.breadcrumbs a,
.breadcrumbs span {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--mist-200);
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.hero-stage {
  position: relative;
  min-height: 470px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 0.68fr 1fr;
  gap: 18px;
  align-items: end;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 32px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateX(20px) scale(0.98);
  transition: opacity 0.45s ease, transform 0.45s ease;
  overflow: hidden;
}

.hero-slide.is-active {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.hero-poster {
  align-self: stretch;
  min-height: 430px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.42);
}

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

.hero-card {
  position: relative;
  padding: 28px;
  border-radius: 24px;
  background: rgba(8, 17, 15, 0.72);
  backdrop-filter: blur(16px);
}

.hero-card h2 {
  margin: 10px 0 12px;
  color: #fff;
  font-size: 34px;
  line-height: 1.12;
}

.hero-card p {
  display: -webkit-box;
  margin: 0 0 18px;
  color: var(--mist-200);
  line-height: 1.7;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-dots {
  position: absolute;
  right: 28px;
  bottom: 24px;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
}

.hero-dots button.is-active {
  width: 28px;
  background: var(--swamp-400);
}

.content-section {
  padding: 42px 0;
}

.section-head,
.page-title,
.category-card,
.info-panel,
.detail-hero,
.player-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
}

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

.section-head h2,
.info-panel h2,
.detail-text h1,
.detail-text h2 {
  margin: 0 0 8px;
  color: #fff;
}

.section-head p,
.info-panel p,
.detail-text p,
.category-card p {
  margin: 0;
  color: var(--mist-200);
  line-height: 1.75;
}

.section-more {
  flex: 0 0 auto;
  padding: 12px 16px;
  border-radius: 13px;
}

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

.movie-card {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(140, 230, 181, 0.34);
  background: rgba(255, 255, 255, 0.08);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, var(--mist-800), var(--mist-700));
  overflow: hidden;
}

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

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.75));
}

.rank-badge,
.row-rank {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  border-radius: 12px;
  color: #201403;
  background: linear-gradient(135deg, #ffe29a, var(--gold));
  font-weight: 900;
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}

.card-body {
  padding: 15px;
}

.card-meta {
  display: flex;
  gap: 8px;
  color: var(--swamp-300);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

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

.card-tags span {
  padding: 5px 8px;
  font-size: 12px;
}

.page-wrap {
  padding: 34px 0 58px;
}

.page-title {
  margin: 18px 0 28px;
  padding: 28px;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(25, 182, 106, 0.16), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.05);
}

.page-title h1 {
  font-size: clamp(32px, 4vw, 54px);
}

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

.category-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  padding: 24px;
  border-radius: 26px;
}

.category-card h2 {
  margin: 0 0 10px;
  color: #fff;
}

.category-card strong {
  color: var(--swamp-300);
}

.category-link {
  align-self: center;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
}

.filter-bar input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  outline: 0;
  color: #fff;
  background: rgba(0, 0, 0, 0.18);
}

.result-count {
  color: var(--mist-300);
  white-space: nowrap;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px 62px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
  transition: 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  border-color: rgba(140, 230, 181, 0.34);
  background: rgba(255, 255, 255, 0.08);
}

.rank-row img {
  width: 62px;
  height: 82px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info strong {
  color: #fff;
  font-size: 18px;
}

.rank-info em {
  margin-top: 6px;
  color: var(--mist-300);
  font-style: normal;
  line-height: 1.45;
}

.hot-score {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--swamp-300);
  background: rgba(25, 182, 106, 0.12);
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  padding: 26px;
  border-radius: 30px;
}

.detail-cover {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

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

.detail-text h1 {
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
}

.detail-text .lead {
  color: #fff;
  font-size: 20px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 22px;
  margin-top: 24px;
}

.info-panel,
.player-card {
  padding: 24px;
  border-radius: 26px;
}

.info-panel + .info-panel {
  margin-top: 18px;
}

.player-shell {
  position: relative;
  border-radius: 24px;
  background: #020706;
  overflow: hidden;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.28));
  cursor: pointer;
}

.player-cover.is-hidden {
  display: none;
}

.play-button {
  min-height: 56px;
  padding: 0 28px;
  border-radius: 999px;
  font-size: 18px;
}

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

.side-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
}

.side-card img {
  width: 72px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
}

.side-card strong {
  display: block;
  margin-bottom: 6px;
  color: #fff;
}

.side-card span {
  color: var(--mist-300);
  font-size: 13px;
  line-height: 1.45;
}

.site-footer {
  margin-top: 38px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.16);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 32px 0;
  color: var(--mist-300);
}

.footer-inner strong {
  color: #fff;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hidden-by-search {
  display: none !important;
}

@media (max-width: 980px) {
  .main-nav,
  .top-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

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

  .hero-stage {
    min-height: 520px;
  }

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

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

@media (max-width: 640px) {
  .header-inner,
  .footer-inner,
  .page-wrap,
  .hero,
  .content-section {
    width: min(100% - 22px, 1200px);
  }

  .hero {
    min-height: auto;
    padding-top: 30px;
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    min-height: 310px;
  }

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

  .section-head,
  .footer-inner,
  .filter-bar {
    display: grid;
  }

  .category-card,
  .rank-row {
    grid-template-columns: 1fr;
  }

  .rank-row img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
  }
}
