:root {
  --brand: #0f766e;
  --brand-dark: #115e59;
  --brand-soft: #ccfbf1;
  --cyan-soft: #ecfeff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --paper: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f0fdfa 100%);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #0f766e, #0891b2);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.25);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  font-size: 1.15rem;
  white-space: nowrap;
}

.logo-mark {
  width: 2.15rem;
  height: 2.15rem;
  display: grid;
  place-items: center;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.nav-desktop a,
.mobile-menu a {
  padding: 0.55rem 0.8rem;
  border-radius: 0.75rem;
  color: rgba(255, 255, 255, 0.92);
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-desktop a:hover,
.mobile-menu a:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.header-search {
  position: relative;
  width: min(18rem, 25vw);
}

.header-search input {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 0.8rem;
  padding: 0.65rem 0.95rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

.menu-button {
  display: none;
  border: 0;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-radius: 0.85rem;
  width: 2.6rem;
  height: 2.6rem;
  font-size: 1.35rem;
}

.mobile-menu {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem 1rem;
}

.mobile-menu.is-open {
  display: grid;
  gap: 0.35rem;
}

.page-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 3rem 1rem 4rem;
}

.hero {
  position: relative;
  min-height: 76vh;
  overflow: hidden;
  background: #042f2e;
  color: #ffffff;
}

.hero-slide {
  display: none;
  min-height: 76vh;
  position: relative;
}

.hero-slide.is-active {
  display: block;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.54;
  filter: saturate(1.1) contrast(1.05);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(4, 47, 46, 0.96), rgba(15, 118, 110, 0.68), rgba(8, 145, 178, 0.18)), linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 46%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  margin: 0 auto;
  min-height: 76vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.54fr);
  gap: 2.5rem;
  align-items: center;
  padding: 4rem 1rem;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.72rem;
  border-radius: 999px;
  color: #ccfbf1;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(204, 251, 241, 0.35);
  font-weight: 700;
  margin-bottom: 1.1rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 5.8rem);
  line-height: 0.98;
  margin: 0 0 1.2rem;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 46rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.12rem;
  line-height: 1.8;
  margin: 0 0 1.4rem;
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  background: #ccfbf1;
  color: #115e59;
  font-weight: 800;
  font-size: 0.82rem;
}

.hero .badge {
  background: rgba(204, 251, 241, 0.18);
  color: #ecfeff;
  border: 1px solid rgba(204, 251, 241, 0.3);
}

.hero-actions,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-actions {
  margin-top: 2rem;
  justify-content: flex-start;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 0.9rem;
  padding: 0.78rem 1.08rem;
  color: #ffffff;
  background: linear-gradient(135deg, #0d9488, #06b6d4);
  font-weight: 850;
  box-shadow: 0 16px 36px rgba(6, 182, 212, 0.24);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(6, 182, 212, 0.32);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: none;
}

.hero-poster {
  border-radius: 2rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 3 / 4;
  background: rgba(255, 255, 255, 0.12);
  transform: rotate(2deg);
}

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

.hero-dots {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
}

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

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

.section {
  margin-bottom: 4rem;
}

.section-panel {
  background: linear-gradient(135deg, #f0fdfa, #ecfeff);
  border-radius: 2rem;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  box-shadow: inset 0 0 0 1px rgba(20, 184, 166, 0.14);
}

.section-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.65rem, 3vw, 2.5rem);
  line-height: 1.15;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.section-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

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

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border-radius: 1.25rem;
  overflow: hidden;
  background: var(--paper);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.9);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.card-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

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

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

.card-ribbon {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 118, 110, 0.88);
  backdrop-filter: blur(8px);
  font-size: 0.78rem;
  font-weight: 800;
}

.card-body {
  padding: 1rem;
  display: grid;
  gap: 0.65rem;
  flex: 1;
}

.card-title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 900;
}

.card-title a:hover {
  color: var(--brand);
}

.card-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  color: #64748b;
  font-size: 0.84rem;
  justify-content: space-between;
}

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

.category-card {
  display: grid;
  gap: 0.75rem;
  border-radius: 1.35rem;
  padding: 1.3rem;
  background: linear-gradient(135deg, #ffffff, #f0fdfa);
  border: 1px solid rgba(20, 184, 166, 0.18);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.category-card strong {
  font-size: 1.15rem;
}

.rank-list {
  display: grid;
  gap: 0.85rem;
}

.rank-item {
  display: grid;
  grid-template-columns: 3.2rem 5rem 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: 1rem;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
}

.rank-num {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.85rem;
  display: grid;
  place-items: center;
  background: #ccfbf1;
  color: #115e59;
  font-weight: 950;
}

.rank-thumb {
  width: 5rem;
  aspect-ratio: 3 / 4;
  border-radius: 0.8rem;
  object-fit: cover;
}

.page-hero {
  margin-bottom: 2.4rem;
  border-radius: 2rem;
  padding: clamp(1.5rem, 4vw, 3.2rem);
  background: linear-gradient(135deg, #0f766e, #06b6d4);
  color: #ffffff;
  overflow: hidden;
  position: relative;
}

.page-hero::after {
  content: "";
  position: absolute;
  width: 18rem;
  height: 18rem;
  right: -6rem;
  top: -8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
}

.page-hero h1 {
  position: relative;
  margin: 0 0 0.85rem;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.page-hero p {
  position: relative;
  max-width: 52rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.85;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
}

.filter-bar input,
.filter-bar select {
  min-height: 2.75rem;
  border-radius: 0.9rem;
  border: 1px solid var(--line);
  padding: 0.6rem 0.9rem;
  background: #ffffff;
  outline: 0;
}

.filter-bar input {
  flex: 1;
  min-width: min(22rem, 100%);
}

.filter-pill {
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 999px;
  padding: 0.58rem 0.9rem;
  cursor: pointer;
  font-weight: 750;
}

.filter-pill.is-active,
.filter-pill:hover {
  border-color: #14b8a6;
  background: #ccfbf1;
  color: #115e59;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22rem;
  gap: 2rem;
  align-items: start;
}

.player-card,
.detail-card,
.side-card {
  border-radius: 1.5rem;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

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

.player-box video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(2, 6, 23, 0.38);
  cursor: pointer;
  z-index: 2;
}

.play-button {
  width: 5.2rem;
  height: 5.2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.94);
  color: #0f766e;
  font-size: 2rem;
  font-weight: 950;
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.26);
}

.player-box.is-playing .play-overlay {
  display: none;
}

.detail-card {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.detail-card h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.detail-card h2,
.side-card h2 {
  margin: 1.7rem 0 0.8rem;
  font-size: 1.45rem;
  font-weight: 900;
}

.detail-card p {
  color: #334155;
  line-height: 1.9;
}

.poster-side {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 1.25rem;
}

.side-card {
  padding: 1rem;
}

.related-list {
  display: grid;
  gap: 0.75rem;
}

.related-mini {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 0.75rem;
  align-items: center;
}

.related-mini img {
  width: 4rem;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 0.7rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tags span {
  padding: 0.35rem 0.62rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 0.86rem;
}

.site-footer {
  color: #e2e8f0;
  background: #0f172a;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.empty-result {
  display: none;
  padding: 2rem;
  border-radius: 1.25rem;
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

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

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

  .menu-button {
    display: inline-grid;
    place-items: center;
  }

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

  .hero-poster {
    max-width: 20rem;
    transform: none;
  }

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

@media (max-width: 760px) {
  .hero,
  .hero-slide,
  .hero-content {
    min-height: 70vh;
  }

  .hero-content {
    padding: 3rem 1rem 5rem;
  }

  .hero-poster {
    display: none;
  }

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

  .rank-item {
    grid-template-columns: 2.7rem 4rem 1fr;
  }

  .rank-item .button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .header-inner {
    padding: 0.75rem;
  }

  .logo {
    font-size: 1rem;
  }

  .page-shell {
    padding: 2rem 0.75rem 3rem;
  }

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