:root {
  --bg: #f7faf9;
  --surface: #ffffff;
  --text: #10201b;
  --muted: #66756f;
  --line: #e4ece8;
  --emerald: #059669;
  --emerald-dark: #047857;
  --cyan: #0891b2;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f3faf7 0%, #f7faf9 36%, #ffffff 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.88);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  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;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(5, 150, 105, 0.28);
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 9px 14px;
  color: #4b5b55;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--emerald-dark);
  background: #ecfdf5;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #ecfdf5;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--emerald-dark);
  border-radius: 4px;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #ffffff;
  background: #0b1714;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.08);
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 74% 32%, rgba(34, 211, 238, 0.24), transparent 30%),
    linear-gradient(90deg, rgba(4, 20, 17, 0.96) 0%, rgba(4, 20, 17, 0.78) 42%, rgba(4, 20, 17, 0.24) 100%),
    linear-gradient(180deg, rgba(4, 20, 17, 0.28), rgba(4, 20, 17, 0.86));
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  align-items: center;
  gap: 52px;
  padding: 74px 0 92px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #a7f3d0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-main h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-desc,
.page-hero p,
.detail-line {
  max-width: 720px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-tags,
.detail-tags,
.card-tags,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.detail-tags span {
  padding: 6px 12px;
  color: #ecfdf5;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

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

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

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 16px 32px rgba(5, 150, 105, 0.28);
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  min-height: 430px;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 34px;
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.38);
}

.hero-poster-img,
.poster-bg,
.category-cover,
.rank-poster,
.detail-cover {
  display: block;
  width: 100%;
  height: 100%;
  background-color: #dce8e3;
  background-size: cover;
  background-position: center;
  transition: transform 0.55s ease;
}

.hero-poster:hover .hero-poster-img,
.movie-card:hover .poster-bg,
.category-card:hover .category-cover,
.rank-item:hover .rank-poster {
  transform: scale(1.06);
}

.hero-poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  color: var(--emerald);
  background: rgba(255, 255, 255, 0.94);
  border-radius: 999px;
  transform: translate(-50%, -50%);
  box-shadow: var(--shadow);
}

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

.hero-controls button {
  pointer-events: auto;
  border: 0;
  cursor: pointer;
}

.hero-controls > button {
  width: 44px;
  height: 44px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 30px;
  height: 5px;
  padding: 0;
  background: rgba(255, 255, 255, 0.34);
  border-radius: 999px;
}

.hero-dot.is-active {
  background: #ffffff;
}

.search-band,
.content-section,
.page-hero,
.detail-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.search-band {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 22px;
  margin-top: -52px;
  position: relative;
  z-index: 3;
}

.home-search,
.quick-links,
.filter-panel,
.text-panel,
.player-card,
.category-card,
.rank-item,
.movie-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(226, 232, 240, 0.94);
  box-shadow: var(--soft-shadow);
}

.home-search,
.quick-links,
.filter-panel {
  padding: 22px;
  border-radius: var(--radius-md);
  backdrop-filter: blur(14px);
}

.home-search label,
.filter-panel label {
  display: block;
  color: #34453f;
  font-weight: 800;
}

.search-row {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.search-row input,
.filter-search input,
.filter-selects select {
  width: 100%;
  min-height: 46px;
  color: #10201b;
  background: #f8fbfa;
  border: 1px solid #dfe8e4;
  border-radius: 14px;
  outline: none;
}

.search-row input,
.filter-search input {
  padding: 0 15px;
}

.search-row input:focus,
.filter-search input:focus,
.filter-selects select:focus {
  border-color: rgba(5, 150, 105, 0.54);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.11);
}

.search-row button {
  min-width: 104px;
  color: #ffffff;
  background: var(--emerald);
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
}

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

.quick-links a {
  display: grid;
  place-items: center;
  min-height: 48px;
  color: var(--emerald-dark);
  background: #ecfdf5;
  border-radius: 14px;
  font-weight: 800;
}

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

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3.5vw, 38px);
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-link {
  flex: 0 0 auto;
  color: var(--emerald-dark);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-md);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.58));
  opacity: 0.82;
}

.play-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 5px 10px;
  color: #ffffff;
  background: rgba(5, 150, 105, 0.88);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

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

.card-body h3 a:hover,
.rank-title:hover,
.category-examples a:hover {
  color: var(--emerald-dark);
}

.card-body p {
  min-height: 48px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.card-tags {
  margin-top: 14px;
}

.card-tags span,
.rank-meta span {
  padding: 4px 8px;
  background: #f0f7f4;
  border-radius: 999px;
  font-size: 12px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.rank-item.compact {
  grid-template-columns: 112px minmax(0, 1fr);
}

.rank-poster {
  position: relative;
  min-height: 110px;
  overflow: hidden;
  border-radius: 16px;
}

.rank-poster span {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  border-radius: 12px;
  font-weight: 900;
}

.rank-title {
  display: block;
  margin: 4px 0 8px;
  font-size: 20px;
  font-weight: 900;
}

.rank-info p {
  margin: 0 0 14px;
  color: var(--muted);
}

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

.category-tile {
  position: relative;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  overflow: hidden;
  padding: 18px;
  color: #ffffff;
  background-color: #16352c;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-md);
  box-shadow: var(--soft-shadow);
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 20, 17, 0.08), rgba(5, 20, 17, 0.86));
}

.category-tile span,
.category-tile small {
  position: relative;
}

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile small {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.82);
}

.page-hero {
  margin-top: 28px;
  color: #ffffff;
  background:
    radial-gradient(circle at 86% 16%, rgba(34, 211, 238, 0.3), transparent 28%),
    linear-gradient(135deg, #064e3b, #0f172a 58%, #164e63);
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.small-hero {
  padding: 62px;
}

.page-hero p {
  max-width: 760px;
}

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

.category-card {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  overflow: hidden;
  border-radius: var(--radius-md);
}

.category-cover {
  min-height: 190px;
}

.category-card-body {
  padding: 22px 22px 22px 0;
}

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

.category-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.category-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-examples a {
  padding: 5px 10px;
  background: #ecfdf5;
  color: var(--emerald-dark);
  border-radius: 999px;
  font-size: 13px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 18px;
  margin-bottom: 24px;
}

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

.filter-selects select {
  margin-top: 6px;
  padding: 0 12px;
}

.empty-result {
  padding: 44px;
  color: var(--muted);
  text-align: center;
  background: #ffffff;
  border-radius: var(--radius-md);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #071512;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 20, 17, 0.95), rgba(3, 20, 17, 0.72), rgba(3, 20, 17, 0.34)),
    linear-gradient(180deg, rgba(3, 20, 17, 0.28), rgba(3, 20, 17, 0.9));
}

.detail-wrap {
  position: relative;
  z-index: 2;
  padding: 42px 0 70px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: #a7f3d0;
}

.detail-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 36px;
  align-items: end;
}

.detail-cover {
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.detail-main h1 {
  max-width: 820px;
}

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

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

.player-card {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  background: #050b0a;
  border-radius: var(--radius-lg);
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 420px;
  background: #050b0a;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  color: #ffffff;
  background:
    radial-gradient(circle at center, rgba(5, 150, 105, 0.26), transparent 34%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.62));
  cursor: pointer;
}

.player-overlay.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.player-button {
  width: 82px;
  height: 82px;
  color: var(--emerald);
  background: #ffffff;
  border: 0;
  border-radius: 999px;
  box-shadow: var(--shadow);
  cursor: pointer;
  font-size: 32px;
}

.player-overlay span {
  font-size: 18px;
  font-weight: 900;
}

.player-message {
  position: absolute;
  left: 18px;
  bottom: 14px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.text-panel {
  padding: 26px;
  border-radius: var(--radius-lg);
}

.text-panel h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.text-panel h2:not(:first-child) {
  margin-top: 28px;
}

.text-panel p {
  margin: 0;
  color: #46564f;
}

.site-footer {
  margin-top: 72px;
  color: #d1d9d5;
  background: linear-gradient(135deg, #111827, #0f172a 55%, #064e3b);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 26px;
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

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

.footer-inner p {
  max-width: 520px;
  color: #a8b4ae;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: start;
}

.footer-links a {
  padding: 8px 12px;
  color: #d1fae5;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 30px;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

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

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

  .detail-content,
  .filter-panel,
  .search-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .header-inner {
    min-height: 64px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 64px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
  }

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

  .hero,
  .hero-stage,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 54px 0 110px;
  }

  .hero-poster {
    min-height: 320px;
    max-width: 260px;
  }

  .hero-controls {
    bottom: 22px;
  }

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

  .section-link {
    display: inline-flex;
    margin-top: 12px;
  }

  .movie-grid,
  .listing-grid,
  .ranking-grid,
  .category-grid,
  .category-list-grid {
    grid-template-columns: 1fr;
  }

  .rank-item,
  .rank-item.compact,
  .category-card,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .small-hero {
    padding: 36px 24px;
  }

  .filter-selects {
    grid-template-columns: 1fr;
  }

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

  .movie-player,
  .player-card {
    min-height: 240px;
  }
}
