:root {
  --emerald: #059669;
  --emerald-dark: #047857;
  --teal: #0d9488;
  --teal-soft: #ccfbf1;
  --slate: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --card: #ffffff;
  --bg: #f8fafc;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--slate);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f7fffc 100%);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

.nav-wrap {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

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

.brand-text,
.footer-brand {
  font-size: 24px;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: #334155;
  font-weight: 700;
  border-radius: 999px;
  transition: 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
}

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

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 999px;
  overflow: hidden;
}

.header-search input,
.mobile-search input {
  width: 190px;
  border: 0;
  outline: 0;
  padding: 10px 12px 10px 16px;
  background: transparent;
}

.header-search button,
.mobile-search button,
.primary-btn,
.secondary-btn,
.filter-controls button {
  border: 0;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 12px 24px rgba(5, 150, 105, 0.20);
}

.header-search button,
.mobile-search button {
  padding: 10px 16px;
  border-radius: 999px;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: #f1f5f9;
  border-radius: 14px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: #334155;
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid var(--line);
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mobile-link {
  padding: 12px 14px;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: radial-gradient(circle at 12% 8%, rgba(16, 185, 129, 0.24), transparent 30%), radial-gradient(circle at 88% 15%, rgba(20, 184, 166, 0.22), transparent 34%), linear-gradient(135deg, #f0fdf4 0%, #ffffff 52%, #ecfeff 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, #000 30%, transparent 95%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  gap: 42px;
  align-items: center;
  padding: 70px 0 56px;
}

.hero-copy {
  display: grid;
  gap: 22px;
}

.eyebrow {
  margin: 0;
  color: var(--emerald-dark);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.filter-panel h1,
.detail-title h1 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.05em;
  color: #0f172a;
}

.hero h1 {
  font-size: clamp(44px, 7vw, 76px);
}

.gradient-text {
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 680px;
  margin: 0;
  color: #475569;
  font-size: 18px;
}

.hero-actions,
.section-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

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

.secondary-btn {
  color: var(--emerald-dark);
  background: #ffffff;
  border: 1px solid rgba(5, 150, 105, 0.22);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.primary-btn:hover,
.secondary-btn:hover,
.movie-card:hover,
.category-tile:hover,
.rank-row:hover {
  transform: translateY(-3px);
}

.hero-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-cats a,
.tag-row span,
.detail-tags a,
.meta-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid rgba(5, 150, 105, 0.14);
  font-weight: 800;
}

.hero-cats a {
  padding: 9px 14px;
}

.hero-slider {
  position: relative;
  min-height: 510px;
  border-radius: 34px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 34px 80px rgba(15, 23, 42, 0.24);
}

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

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.88));
}

.hero-slide-content {
  position: absolute;
  inset: auto 28px 30px 28px;
  z-index: 2;
  color: #ffffff;
}

.hero-slide-content h2 {
  margin: 10px 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
}

.hero-slide-content p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.86);
}

.slide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.slide-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  font-weight: 800;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  right: 26px;
  top: 26px;
  display: flex;
  gap: 8px;
}

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

.hero-dots button.active {
  width: 28px;
  background: #ffffff;
}

.section {
  padding: 66px 0;
}

.section.alt {
  background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
}

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

.section-head h2,
.page-hero h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-head p,
.page-hero p,
.category-tile p,
.detail-title p,
.detail-copy p,
.search-empty {
  color: #64748b;
}

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(226, 232, 240, 0.86);
  background: var(--card);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  border-color: rgba(5, 150, 105, 0.26);
  box-shadow: var(--shadow);
}

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

.movie-card.compact .poster-link {
  aspect-ratio: 16 / 10;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(15, 23, 42, 0.72));
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 7px 11px;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
}

.rank-badge {
  left: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(10px);
}

.card-body {
  padding: 16px;
}

.meta-line {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--emerald-dark);
  font-size: 13px;
  font-weight: 900;
}

.card-body h2 {
  margin: 7px 0 8px;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.movie-card.compact .card-body h2 {
  font-size: 18px;
}

.card-body h2 a:hover,
.rank-row a:hover,
.footer-grid a:hover {
  color: var(--emerald-dark);
}

.card-body p {
  min-height: 54px;
  margin: 0 0 14px;
  color: #64748b;
  font-size: 14px;
}

.tag-row,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span,
.detail-tags a,
.meta-pill {
  padding: 5px 9px;
  font-size: 12px;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 218px;
  padding: 24px;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
  transition: 0.2s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  right: -55px;
  top: -55px;
  width: 150px;
  height: 150px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.17), rgba(13, 148, 136, 0.12));
}

.category-tile h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-tile p {
  margin: 0 0 20px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 56px 88px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  transition: 0.2s ease;
}

.rank-num {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  font-weight: 900;
}

.rank-row img {
  width: 88px;
  height: 64px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-row h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.rank-row p {
  margin: 0;
  color: #64748b;
}

.page-hero {
  padding: 64px 0 42px;
  background: linear-gradient(135deg, #ecfdf5, #ffffff 50%, #ecfeff);
  border-bottom: 1px solid rgba(226, 232, 240, 0.86);
}

.page-hero p {
  max-width: 720px;
  margin: 12px 0 0;
}

.filter-panel {
  width: min(1180px, calc(100% - 32px));
  margin: 42px auto 24px;
  padding: 24px;
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 22px;
  align-items: center;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.filter-panel h1 {
  font-size: 30px;
}

.filter-controls {
  display: grid;
  grid-template-columns: 1fr 150px 140px auto;
  gap: 10px;
}

.filter-controls input,
.filter-controls select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  outline: 0;
  padding: 0 14px;
}

.filter-controls input:focus,
.filter-controls select:focus,
.header-search:focus-within,
.mobile-search:focus-within {
  border-color: rgba(5, 150, 105, 0.55);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.11);
}

.filter-controls button {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
}

.search-empty {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 46px;
  padding: 20px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.search-empty.is-visible {
  display: block;
}

.detail-hero {
  padding: 42px 0 26px;
  background: linear-gradient(135deg, #f0fdf4, #ffffff 50%, #ecfeff);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-weight: 700;
  margin-bottom: 18px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px;
  align-items: start;
}

.detail-title h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.detail-title p {
  max-width: 830px;
  margin: 16px 0 0;
  font-size: 18px;
}

.detail-poster {
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #ecfdf5;
}

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

.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
}

.watch-section {
  padding: 36px 0 66px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 34px 80px rgba(15, 23, 42, 0.22);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.28), rgba(15, 23, 42, 0.76));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-ring {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 24px 50px rgba(5, 150, 105, 0.35);
  font-size: 32px;
  padding-left: 5px;
}

.play-overlay strong {
  font-size: 22px;
}

.detail-copy {
  display: grid;
  gap: 22px;
  margin-top: 30px;
}

.detail-copy article {
  padding: 26px;
  border-radius: 26px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.detail-copy h2 {
  margin: 0 0 10px;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.detail-copy p {
  margin: 0;
  font-size: 16px;
}

.related-section {
  padding: 0 0 72px;
}

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

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  padding: 54px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.7fr;
  gap: 42px;
}

.footer-grid p {
  max-width: 520px;
  color: #94a3b8;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
}

.footer-grid a {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

.footer-bottom {
  margin-top: 38px;
  padding: 18px;
  text-align: center;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

@media (max-width: 1050px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    margin-left: auto;
  }

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

  .hero-slider {
    min-height: 460px;
  }

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

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

@media (max-width: 760px) {
  .container,
  .content-wrap,
  .filter-panel,
  .search-empty {
    width: min(100% - 24px, 1180px);
  }

  .nav-wrap {
    min-height: 66px;
  }

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

  .hero-inner {
    padding: 42px 0;
    gap: 28px;
  }

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

  .hero-slider {
    min-height: 390px;
    border-radius: 28px;
  }

  .hero-slide-content {
    inset: auto 20px 22px 20px;
  }

  .section {
    padding: 44px 0;
  }

  .section-head,
  .page-hero-content {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .card-body {
    padding: 13px;
  }

  .card-body h2 {
    font-size: 17px;
  }

  .card-body p {
    min-height: auto;
    font-size: 13px;
  }

  .rank-row {
    grid-template-columns: 44px 72px 1fr;
  }

  .rank-row .primary-btn {
    grid-column: 1 / -1;
  }

  .rank-row img {
    width: 72px;
    height: 54px;
  }

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

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

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