:root {
  --teal: #14b8a6;
  --teal-dark: #0f766e;
  --blue: #3b82f6;
  --blue-deep: #1d4ed8;
  --ink: #0f172a;
  --muted: #64748b;
  --line: rgba(148, 163, 184, 0.25);
  --panel: rgba(255, 255, 255, 0.92);
  --shadow: 0 20px 55px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

.nav-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 10px 25px rgba(20, 184, 166, 0.28);
}

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

.desktop-nav a {
  color: #334155;
  font-weight: 650;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active {
  color: var(--teal-dark);
}

.top-search,
.mobile-search,
.wide-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.wide-search input {
  width: 210px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 10px 14px;
  outline: none;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.wide-search input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

.top-search button,
.mobile-search button,
.wide-search button,
.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
  cursor: pointer;
}

.top-search button,
.mobile-search button,
.wide-search button,
.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 14px 30px rgba(20, 184, 166, 0.24);
}

.primary-btn:hover,
.top-search button:hover,
.mobile-search button:hover,
.wide-search button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(59, 130, 246, 0.28);
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 8px 12px;
  background: #f1f5f9;
  color: #0f172a;
}

.mobile-panel {
  display: none;
  padding: 0 20px 18px;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
}

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

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

.mobile-panel nav a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #334155;
  background: #f8fafc;
}

.hero {
  position: relative;
  min-height: 560px;
  height: 72vh;
  overflow: hidden;
  background: #020617;
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transition: opacity 0.7s ease;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.58), rgba(2, 6, 23, 0.1));
}

.hero-content {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(1180px, calc(100% - 40px));
  transform: translate(-50%, -50%);
  color: #ffffff;
}

.hero-content > * {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  color: #5eead4;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.hero h1,
.page-hero h1,
.detail-intro h1 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5.6rem);
}

.hero p {
  margin: 22px 0 0;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: rgba(226, 232, 240, 0.96);
  line-height: 1.75;
}

.hero-meta {
  margin-top: 18px;
  color: #bfdbfe;
  font-weight: 700;
}

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

.hero-actions a {
  padding: 14px 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.hero-dots button.is-active {
  background: #5eead4;
}

.search-band {
  padding: 34px 20px 0;
}

.search-panel {
  max-width: 1080px;
  margin: -78px auto 0;
  position: relative;
  z-index: 3;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 30px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.search-panel h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.search-panel p {
  margin: 0 0 20px;
  color: var(--muted);
}

.wide-search input {
  width: min(560px, 100%);
  padding: 13px 18px;
}

.inline-search {
  margin-top: 22px;
}

.content-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 20px;
}

.soft-bg {
  max-width: none;
  padding-left: max(20px, calc((100vw - 1180px) / 2 + 20px));
  padding-right: max(20px, calc((100vw - 1180px) / 2 + 20px));
  background: linear-gradient(135deg, rgba(240, 253, 250, 0.8), rgba(239, 246, 255, 0.86));
}

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

.section-title h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  letter-spacing: -0.03em;
}

.section-title a {
  color: var(--teal-dark);
  font-weight: 800;
}

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

.movie-card {
  min-width: 0;
}

.movie-link {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-link:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

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

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

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

.poster-badge,
.poster-meta {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(20, 184, 166, 0.92);
}

.poster-badge {
  left: 12px;
  top: 12px;
  padding: 6px 10px;
}

.poster-meta {
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
  background: rgba(2, 6, 23, 0.72);
}

.movie-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.movie-card h3 {
  margin: 0;
  min-height: 2.9em;
  font-size: 1.02rem;
  line-height: 1.45;
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.movie-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.movie-tags span,
.detail-tags span {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  color: #0f766e;
  font-size: 12px;
  font-weight: 750;
  background: #ccfbf1;
}

.movie-meta-line {
  margin-top: auto;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card,
.category-overview-card a {
  display: block;
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: var(--shadow);
}

.category-card {
  position: relative;
  min-height: 260px;
  color: #ffffff;
}

.category-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  filter: brightness(0.62);
  transition: transform 0.35s ease;
}

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

.category-card span,
.category-card em {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 2;
  font-style: normal;
}

.category-card span {
  bottom: 66px;
  font-size: 1.45rem;
  font-weight: 900;
}

.category-card em {
  bottom: 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.92rem;
  line-height: 1.45;
}

.category-collage {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 150px;
  overflow: hidden;
}

.category-collage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-overview-body {
  padding: 20px;
}

.category-overview-body h2 {
  margin: 0 0 10px;
}

.category-overview-body p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

.category-overview-body span {
  color: var(--teal-dark);
  font-weight: 850;
}

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

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

.ranking-item a {
  display: grid;
  grid-template-columns: 56px 72px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 98px;
  padding: 12px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.rank-number {
  color: var(--teal-dark);
  font-size: 1.3rem;
  font-weight: 950;
}

.ranking-item img {
  width: 72px;
  height: 74px;
  object-fit: cover;
  border-radius: 16px;
}

.rank-content {
  display: grid;
  gap: 6px;
}

.rank-content strong {
  line-height: 1.4;
}

.rank-content em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.9rem;
}

.page-hero {
  position: relative;
  padding: 86px 20px 74px;
  color: #ffffff;
  background: radial-gradient(circle at 20% 10%, rgba(20, 184, 166, 0.9), transparent 30%), linear-gradient(135deg, #0f172a, #1e3a8a 52%, #0f766e);
}

.page-hero > div {
  max-width: 1180px;
  margin: 0 auto;
}

.page-hero h1 {
  font-size: clamp(2.1rem, 5vw, 4.4rem);
}

.page-hero p {
  max-width: 760px;
  color: rgba(226, 232, 240, 0.94);
  line-height: 1.8;
  font-size: 1.08rem;
}

.slim-hero {
  min-height: 320px;
}

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

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.35;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(8px) saturate(1.1);
  transform: scale(1.04);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.75));
}

.detail-inner {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px 20px 64px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
  color: rgba(226, 232, 240, 0.8);
  font-size: 0.94rem;
}

.breadcrumb a:hover {
  color: #5eead4;
}

.detail-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

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

.detail-intro h1 {
  font-size: clamp(2.2rem, 5vw, 4.6rem);
}

.detail-one-line {
  max-width: 860px;
  margin: 22px 0;
  color: rgba(241, 245, 249, 0.94);
  font-size: 1.16rem;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
  font-weight: 800;
}

.detail-tags {
  margin-bottom: 28px;
}

.detail-section {
  padding-bottom: 18px;
}

.player-box {
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
}

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

.player-frame video,
.player-cover,
.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-frame video {
  z-index: 1;
  object-fit: contain;
}

.player-cover {
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.54);
}

.player-cover img {
  object-fit: cover;
}

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

.play-button {
  position: relative;
  z-index: 4;
  border: 0;
  border-radius: 999px;
  padding: 16px 30px;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 950;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 24px 55px rgba(20, 184, 166, 0.34);
  cursor: pointer;
}

.article-panel {
  padding: 32px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: var(--shadow);
}

.article-panel h2 {
  margin: 0 0 14px;
  font-size: 1.55rem;
}

.article-panel p {
  margin: 0 0 24px;
  color: #334155;
  line-height: 2;
  font-size: 1.04rem;
}

.article-panel p:last-child {
  margin-bottom: 0;
}

.no-results {
  display: none;
  margin-top: 20px;
  padding: 18px;
  border-radius: 18px;
  color: #475569;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.no-results.is-visible {
  display: block;
}

.site-footer {
  padding: 36px 20px;
  background: #0f172a;
  color: #cbd5e1;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-brand {
  color: #ffffff;
}

.footer-inner p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1024px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav-shell {
    gap: 14px;
  }

  .top-search {
    margin-left: auto;
  }

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

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

@media (max-width: 760px) {
  .top-search {
    display: none;
  }

  .mobile-search input {
    width: 100%;
  }

  .mobile-search {
    align-items: stretch;
  }

  .hero {
    min-height: 620px;
    height: 78vh;
  }

  .hero-content {
    top: 52%;
  }

  .hero-actions,
  .wide-search,
  .section-title,
  .footer-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .wide-search input,
  .wide-search button {
    width: 100%;
  }

  .search-panel {
    margin-top: -46px;
    padding: 22px;
  }

  .content-section {
    padding: 46px 16px;
  }

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

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

  .movie-card h3 {
    font-size: 0.98rem;
  }

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

  .detail-poster {
    max-width: 230px;
  }

  .article-panel {
    padding: 24px;
  }

  .ranking-item a {
    grid-template-columns: 42px 64px 1fr;
  }
}

@media (max-width: 520px) {
  .nav-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .brand span:last-child {
    max-width: 7em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

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

  .hero h1 {
    font-size: 2.35rem;
  }

  .hero p {
    font-size: 1rem;
  }
}
