:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --emerald: #059669;
  --emerald-dark: #047857;
  --teal: #0d9488;
  --rose: #e11d48;
  --amber: #d97706;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

img {
  display: block;
  width: 100%;
  height: auto;
}

button,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 900;
  font-size: 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 14px 30px rgba(5, 150, 105, 0.3);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-copy strong {
  font-size: 19px;
  background: linear-gradient(90deg, var(--emerald), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-copy small {
  color: var(--muted);
  margin-top: 4px;
}

.nav-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  width: 100%;
}

.nav-link {
  color: #334155;
  font-weight: 700;
  transition: color 0.2s ease;
}

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

.site-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  background: #f1f5f9;
  border-radius: 999px;
}

.site-search-form input {
  width: 220px;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 8px 10px;
  color: var(--ink);
}

.site-search-form button,
.search-page-form button {
  border: 0;
  color: #ffffff;
  font-weight: 800;
  background: var(--emerald);
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.site-search-form button:hover,
.search-page-form button:hover {
  background: var(--emerald-dark);
  transform: translateY(-1px);
}

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

.mobile-menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #0f172a;
  border-radius: 99px;
}

main {
  min-height: 70vh;
}

.hero-section {
  position: relative;
  height: min(680px, 92vh);
  min-height: 560px;
  overflow: hidden;
  margin-top: 72px;
  background: #020617;
}

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

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

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

.hero-slide img {
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.82) 0%, rgba(2, 6, 23, 0.62) 42%, rgba(2, 6, 23, 0.12) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.8) 0%, transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1180px;
  color: #ffffff;
  padding-right: 390px;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.92);
  box-shadow: 0 10px 25px rgba(5, 150, 105, 0.28);
}

.hero-content h1,
.page-hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-content p,
.page-hero p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2vw, 20px);
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.hero-meta span,
.detail-meta span,
.movie-tags span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: var(--emerald);
  box-shadow: 0 18px 35px rgba(5, 150, 105, 0.35);
}

.primary-button:hover {
  transform: translateY(-2px) scale(1.02);
  background: var(--emerald-dark);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.ghost-button.dark {
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 36px;
  height: 8px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

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

.hero-rail {
  position: absolute;
  z-index: 5;
  right: max(24px, calc((100vw - 1180px) / 2));
  top: 50%;
  width: 330px;
  transform: translateY(-50%);
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.hero-rail h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 20px;
}

.hero-rail a {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  color: #ffffff;
  border-radius: 16px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-rail a:hover {
  background: rgba(255, 255, 255, 0.13);
  transform: translateX(-3px);
}

.hero-rail img {
  height: 58px;
  border-radius: 13px;
  object-fit: cover;
}

.hero-rail strong,
.hero-rail em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-rail em {
  color: rgba(255, 255, 255, 0.7);
  font-style: normal;
  font-size: 13px;
}

.page-main {
  padding-top: 96px;
}

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

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
}

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

.section-more {
  color: var(--emerald);
  font-weight: 900;
}

.movie-grid {
  display: grid;
  gap: 24px;
}

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

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

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

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(5, 150, 105, 0.3);
  box-shadow: var(--shadow);
}

.movie-cover {
  position: relative;
  display: block;
  height: 250px;
  overflow: hidden;
  background: #e2e8f0;
}

.movie-card-wide .movie-cover {
  height: 220px;
}

.movie-card-feature .movie-cover {
  height: 310px;
}

.movie-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.38s ease;
}

.movie-card:hover .movie-cover img {
  transform: scale(1.08);
}

.movie-type,
.rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
}

.rank-badge {
  left: 12px;
  right: auto;
  background: var(--rose);
}

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

.movie-title {
  display: -webkit-box;
  min-height: 52px;
  overflow: hidden;
  color: var(--ink);
  font-weight: 900;
  font-size: 19px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-title:hover {
  color: var(--emerald);
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 46px;
  margin: 10px 0 14px;
  overflow: hidden;
  color: var(--muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.movie-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: #cbd5e1;
}

.movie-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.movie-tags span,
.detail-tags span {
  color: var(--emerald-dark);
  background: #d1fae5;
}

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

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
  background: #0f172a;
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.22);
}

.category-card img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.category-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.2));
}

.category-card-content {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  color: #ffffff;
}

.category-card-content strong,
.category-card-content em {
  display: block;
}

.category-card-content strong {
  font-size: 24px;
  font-weight: 900;
}

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

.feature-panel {
  width: min(1220px, calc(100% - 24px));
  padding: 42px;
  border-radius: 32px;
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

.ranking-strip {
  padding-bottom: 70px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 58px 74px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-row:hover {
  transform: translateX(4px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
}

.ranking-number {
  color: var(--rose);
  font-weight: 950;
  font-size: 23px;
  text-align: center;
}

.ranking-row img {
  height: 62px;
  border-radius: 14px;
  object-fit: cover;
}

.ranking-copy strong,
.ranking-copy em {
  display: block;
}

.ranking-copy strong {
  font-weight: 900;
}

.ranking-copy em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.ranking-heat {
  color: var(--emerald);
  font-weight: 900;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 58px;
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(6, 95, 70, 0.88));
  box-shadow: var(--shadow);
  color: #ffffff;
}

.compact-hero h1,
.category-hero h1 {
  max-width: 900px;
}

.category-hero,
.search-hero,
.ranking-hero {
  background: radial-gradient(circle at 20% 0%, rgba(20, 184, 166, 0.45), transparent 38%), linear-gradient(135deg, #0f172a, #064e3b);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.filter-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  font-weight: 800;
  padding: 9px 16px;
}

.filter-btn.is-active,
.filter-btn:hover {
  color: #ffffff;
  border-color: var(--emerald);
  background: var(--emerald);
}

.movie-card.is-hidden {
  display: none;
}

.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

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

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 26px 70px rgba(2, 6, 23, 0.34);
  aspect-ratio: 16 / 9;
}

.player-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.5), rgba(2, 6, 23, 0.18));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-play-button {
  width: 92px;
  height: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 36px;
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.94);
  box-shadow: 0 18px 45px rgba(5, 150, 105, 0.38);
  padding-left: 6px;
  transition: transform 0.2s ease;
}

.player-overlay:hover .player-play-button {
  transform: scale(1.08);
}

.detail-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 34px;
  padding: 38px 0 10px;
}

.detail-poster img {
  min-height: 430px;
  border-radius: 28px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.detail-copy {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
}

.detail-copy h1 {
  margin: 18px 0 10px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.detail-one-line {
  margin: 0 0 18px;
  color: #334155;
  font-size: 18px;
  font-weight: 700;
}

.detail-meta span {
  color: #065f46;
  background: #d1fae5;
}

.detail-copy h2 {
  margin: 28px 0 10px;
  font-size: 24px;
}

.detail-copy p {
  color: #334155;
  font-size: 17px;
}

.detail-nav-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.detail-nav-links a {
  padding: 14px 16px;
  border-radius: 16px;
  background: #ecfdf5;
  color: var(--emerald-dark);
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.related-section {
  padding-top: 28px;
}

.search-page-form {
  display: flex;
  gap: 12px;
  width: min(720px, 100%);
  margin-top: 24px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.search-page-form input {
  flex: 1;
  min-width: 0;
  color: #ffffff;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 10px 16px;
}

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

.hot-searches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 24px;
}

.hot-searches strong,
.hot-searches a {
  color: #ffffff;
}

.hot-searches a {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
  margin-top: 40px;
}

.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 36px;
  padding: 46px 0;
}

.footer-brand {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.footer-brand strong {
  display: block;
  color: #ffffff;
  font-size: 22px;
}

.footer-brand p {
  max-width: 560px;
  margin: 8px 0 0;
}

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

.footer-grid h3 {
  margin: 0 0 12px;
  color: #ffffff;
}

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

.footer-grid a:hover {
  color: #6ee7b7;
}

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

@media (max-width: 1050px) {
  .site-search-form input {
    width: 170px;
  }

  .hero-content {
    padding-right: 0;
  }

  .hero-rail {
    display: none;
  }

  .movie-grid-four,
  .movie-grid-three,
  .category-grid,
  .large-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-layout,
  .footer-shell {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 820px) {
  .nav-shell {
    height: 68px;
  }

  .mobile-menu-button {
    display: block;
  }

  .nav-menu {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: var(--shadow);
  }

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

  .site-search-form {
    border-radius: 18px;
  }

  .site-search-form input {
    width: 100%;
  }

  .hero-section {
    margin-top: 68px;
    min-height: 560px;
  }

  .hero-content {
    padding: 0 16px;
  }

  .hero-content h1,
  .page-hero h1 {
    font-size: 38px;
  }

  .page-main {
    padding-top: 88px;
  }

  .page-hero {
    padding: 34px 24px;
    border-radius: 26px;
  }

  .content-section,
  .feature-panel {
    width: min(100% - 24px, 1180px);
    padding: 34px 0;
  }

  .feature-panel {
    padding: 28px 16px;
  }

  .section-heading {
    display: block;
  }

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

  .ranking-row {
    grid-template-columns: 44px 58px 1fr;
  }

  .ranking-heat {
    display: none;
  }

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

@media (max-width: 560px) {
  .brand-copy small {
    display: none;
  }

  .movie-grid-four,
  .movie-grid-three,
  .category-grid,
  .large-category-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .search-page-form,
  .detail-nav-links {
    flex-direction: column;
    display: flex;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }

  .movie-cover,
  .movie-card-wide .movie-cover,
  .movie-card-feature .movie-cover {
    height: 260px;
  }

  .detail-copy {
    padding: 18px;
  }

  .player-play-button {
    width: 74px;
    height: 74px;
    font-size: 28px;
  }
}
