:root {
  color-scheme: light;
  --ink: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.1);
  --soft: #f4fbfb;
  --card: rgba(255, 255, 255, 0.9);
  --teal: #0f766e;
  --cyan: #0891b2;
  --gold: #f59e0b;
  --shadow: 0 24px 70px rgba(15, 118, 110, 0.15);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.16), transparent 38rem),
    linear-gradient(180deg, #f7fefe 0%, #f7fafc 44%, #eef8f8 100%);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(15, 118, 110, 0.12);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
}

.header-inner,
.footer-inner,
.section,
.hero-shell,
.detail-shell,
.search-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--teal);
}

.site-logo::before,
.footer-logo::before {
  content: "";
  width: 34px;
  height: 34px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.24);
}

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

.site-nav a {
  padding: 10px 16px;
  border-radius: 999px;
  color: #334155;
  font-weight: 700;
  transition: 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 14px 28px rgba(8, 145, 178, 0.22);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #e6fffb;
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 99px;
  background: var(--teal);
}

.hero-shell {
  padding: 24px 0 34px;
}

.hero-carousel {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border-radius: 36px;
  box-shadow: var(--shadow);
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 38px;
  align-items: end;
  padding: 56px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(5, 15, 32, 0.92) 0%, rgba(15, 118, 110, 0.72) 46%, rgba(5, 15, 32, 0.24) 100%),
    var(--poster);
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 1;
}

.hero-content {
  color: #fff;
  max-width: 710px;
}

.hero-kicker,
.section-kicker,
.detail-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.14);
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

.hero-kicker {
  background: rgba(255, 255, 255, 0.16);
  color: #bff7ed;
}

.hero-content h1,
.hero-content h2 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 620px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

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

.button-primary,
.button-secondary,
.button-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 900;
  transition: 0.2s ease;
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 16px 30px rgba(8, 145, 178, 0.28);
}

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

.button-secondary {
  color: var(--teal);
  background: #e6fffb;
  border-color: rgba(15, 118, 110, 0.15);
}

.button-light {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.92);
}

.hero-poster {
  min-height: 470px;
  border-radius: 30px;
  background-image:
    linear-gradient(160deg, rgba(15, 118, 110, 0.04), rgba(8, 145, 178, 0.3)),
    var(--poster);
  background-size: cover;
  background-position: center;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.34);
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 56px;
  bottom: 28px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

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

.section {
  padding: 34px 0;
}

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

.section-title h2,
.section-title h1,
.detail-title h1 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.05em;
}

.section-title p,
.detail-title p,
.category-intro p {
  margin: 10px 0 0;
  max-width: 760px;
  color: var(--muted);
}

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.06);
  transition: 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(15, 118, 110, 0.25);
  box-shadow: 0 24px 48px rgba(15, 118, 110, 0.12);
}

.poster-link {
  display: block;
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.16;
  overflow: hidden;
  border-radius: 22px 22px 0 0;
  background-color: #0f172a;
  background-image:
    linear-gradient(160deg, rgba(15, 118, 110, 0.16), rgba(8, 145, 178, 0.34)),
    var(--poster);
  background-size: cover;
  background-position: center;
}

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

.rank-mark {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--gold), #ef4444);
  font-weight: 900;
}

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

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

.movie-card-meta span,
.detail-meta span,
.result-meta span,
.movie-tags span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
}

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--teal);
}

.movie-card p {
  min-height: 62px;
  margin: 0;
  color: #475569;
  font-size: 14px;
}

.movie-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 8px;
  padding: 22px;
  border-radius: 28px;
  color: #fff;
  background-color: #0f172a;
  background-image:
    linear-gradient(160deg, rgba(15, 118, 110, 0.25), rgba(8, 145, 178, 0.38)),
    var(--poster);
  background-size: cover;
  background-position: center;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.9) 100%);
}

.category-card strong,
.category-card em {
  position: relative;
  z-index: 1;
}

.category-card strong {
  font-size: 24px;
  line-height: 1.1;
}

.category-card em {
  color: rgba(255, 255, 255, 0.78);
  font-style: normal;
}

.feature-layout {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 22px;
}

.ranking-panel,
.info-panel,
.search-panel,
.detail-card,
.category-intro {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.06);
}

.ranking-panel,
.info-panel,
.search-panel,
.category-intro {
  padding: 24px;
}

.ranking-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #f8ffff;
}

.ranking-number {
  display: inline-grid;
  place-items: center;
  height: 38px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  font-weight: 900;
}

.ranking-name strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-name span {
  color: var(--muted);
  font-size: 13px;
}

.search-panel form,
.search-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.search-input,
.select-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  outline: none;
  padding: 0 16px;
}

.search-input:focus,
.select-input:focus {
  border-color: rgba(15, 118, 110, 0.55);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-chip {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  background: #fff;
  color: var(--teal);
  font-weight: 800;
  cursor: pointer;
}

.filter-chip.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
}

.detail-hero {
  padding: 24px 0 16px;
}

.detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 360px;
  gap: 26px;
  align-items: start;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--teal);
  font-weight: 800;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: #020617;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.28);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background-image:
    linear-gradient(160deg, rgba(2, 6, 23, 0.46), rgba(15, 118, 110, 0.34)),
    var(--poster);
  background-size: cover;
  background-position: center;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-trigger {
  display: inline-grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--teal);
  cursor: pointer;
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.36);
}

.player-trigger span {
  margin-left: 6px;
  font-size: 44px;
  line-height: 1;
}

.detail-card {
  margin-top: 22px;
  padding: 28px;
}

.detail-title h1 {
  margin-top: 8px;
}

.detail-meta {
  margin: 16px 0 0;
}

.content-block {
  margin-top: 26px;
}

.content-block h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.content-block p {
  margin: 0;
  color: #334155;
}

.side-poster {
  min-height: 500px;
  border-radius: 32px;
  background-color: #0f172a;
  background-image:
    linear-gradient(160deg, rgba(15, 118, 110, 0.12), rgba(8, 145, 178, 0.28)),
    var(--poster);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
}

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

.search-shell {
  padding: 34px 0;
}

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

.site-footer {
  margin-top: 44px;
  border-top: 1px solid rgba(15, 118, 110, 0.12);
  background: rgba(255, 255, 255, 0.72);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 28px;
  padding: 38px 0;
}

.footer-inner p {
  max-width: 560px;
  color: var(--muted);
}

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

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: #e6fffb;
  color: var(--teal);
  font-weight: 800;
}

.empty-result {
  display: none;
  padding: 34px;
  border-radius: 24px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

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

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

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

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

  .hero-poster,
  .side-poster {
    display: none;
  }
}

@media (max-width: 760px) {
  .header-inner,
  .footer-inner,
  .section,
  .hero-shell,
  .detail-shell,
  .search-shell {
    width: min(100% - 22px, 1180px);
  }

  .menu-button {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 74px;
    left: 11px;
    right: 11px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid rgba(15, 118, 110, 0.12);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
  }

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

  .hero-carousel {
    min-height: 530px;
    border-radius: 26px;
  }

  .hero-slide {
    padding: 34px 24px 62px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .hero-controls {
    left: 24px;
    bottom: 24px;
  }

  .section-head,
  .footer-inner,
  .search-panel form,
  .search-toolbar {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: start;
  }

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

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

  .movie-card p {
    min-height: auto;
  }

  .footer-links {
    justify-content: start;
  }

  .detail-card,
  .ranking-panel,
  .info-panel,
  .search-panel,
  .category-intro {
    padding: 18px;
    border-radius: 22px;
  }
}

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

  .site-logo,
  .footer-logo {
    font-size: 20px;
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 40px;
  }
}
