:root {
  --page-bg: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #111827;
  --text-muted: #64748b;
  --line: #e5e7eb;
  --emerald: #059669;
  --emerald-bright: #10b981;
  --teal: #0d9488;
  --dark: #0f172a;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text-main);
  background: var(--page-bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--emerald);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #334155;
  font-size: 15px;
  font-weight: 650;
}

.main-nav a {
  padding: 8px 0;
  transition: color 0.25s ease;
}

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: #ecfdf5;
  border-radius: 12px;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--emerald);
  border-radius: 999px;
}

.hero-carousel {
  position: relative;
  min-height: 76vh;
  overflow: hidden;
  background: var(--dark);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease, transform 0.65s ease;
  transform: scale(1.02);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-slide img {
  height: 100%;
  min-height: 76vh;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.1)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.7), transparent 55%);
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100vw - 1180px) / 2));
  bottom: 12vh;
  width: min(720px, calc(100% - 64px));
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--emerald-bright);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-summary {
  width: min(680px, 100%);
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: 18px;
}

.hero-tags,
.detail-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-tags span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  color: #047857;
  background: #d1fae5;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: #ecfdf5;
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(167, 243, 208, 0.28);
}

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

.primary-btn,
.ghost-btn,
.search-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn,
.search-form button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 16px 35px rgba(5, 150, 105, 0.28);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.primary-btn:hover,
.ghost-btn:hover,
.search-form button:hover {
  transform: translateY(-2px);
}

.hero-dots {
  position: absolute;
  left: max(32px, calc((100vw - 1180px) / 2));
  bottom: 6vh;
  display: flex;
  gap: 10px;
}

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

.hero-dot.is-active {
  background: var(--emerald-bright);
}

.quick-search,
.section-block,
.split-section,
.detail-content,
.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.quick-search {
  margin-top: -42px;
  position: relative;
  z-index: 5;
}

.quick-search-inner,
.search-panel,
.feature-panel,
.content-card,
.category-overview-card {
  background: var(--card-bg);
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.quick-search-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 28px;
}

.quick-search h2,
.section-head h2,
.feature-panel h2,
.content-card h2,
.page-hero h1,
.detail-info h1,
.category-overview-card h2 {
  margin: 0;
  color: #0f172a;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.quick-search h2,
.section-head h2,
.feature-panel h2,
.content-card h2,
.category-overview-card h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.search-form {
  display: flex;
  width: min(520px, 100%);
  padding: 6px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
}

.search-form input,
.search-input {
  width: 100%;
  border: 0;
  outline: none;
  color: #0f172a;
  background: transparent;
}

.search-form input {
  padding: 0 16px;
}

.section-block {
  margin-top: 72px;
}

.section-block.no-margin {
  width: auto;
  margin: 0;
}

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

.section-head p:not(.eyebrow) {
  margin: 10px 0 0;
  color: var(--text-muted);
}

.section-head.compact {
  align-items: center;
}

.text-link {
  color: var(--emerald);
  font-weight: 800;
}

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

.category-card {
  position: relative;
  min-height: 200px;
  overflow: hidden;
  color: #ffffff;
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}

.category-card img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.category-card-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.1));
}

.category-card strong,
.category-card small {
  position: absolute;
  left: 18px;
  right: 18px;
}

.category-card strong {
  bottom: 54px;
  font-size: 22px;
}

.category-card small {
  bottom: 18px;
  color: #dbeafe;
}

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

.movie-card {
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5.7;
  overflow: hidden;
  background: #0f172a;
}

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

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

.poster-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.55), transparent 58%);
}

.poster-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #ffffff;
  background: rgba(16, 185, 129, 0.92);
  border-radius: 50%;
  box-shadow: 0 12px 25px rgba(5, 150, 105, 0.28);
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 750;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.25;
}

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

.movie-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.movie-card .tag-row {
  margin-top: 14px;
  gap: 7px;
}

.movie-card .tag-row span {
  min-height: 24px;
  padding: 3px 9px;
  font-size: 12px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 26px;
  margin-top: 72px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, border 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(16, 185, 129, 0.4);
}

.rank-num {
  color: var(--emerald);
  font-size: 22px;
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-year {
  color: var(--text-muted);
  font-size: 13px;
}

.feature-panel {
  padding: 30px;
  background: linear-gradient(135deg, #ecfdf5, #ffffff);
}

.feature-panel p:not(.eyebrow) {
  color: var(--text-muted);
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding: clamp(34px, 6vw, 70px);
  color: #ffffff;
  background:
    radial-gradient(circle at 18% 0%, rgba(16, 185, 129, 0.35), transparent 34%),
    linear-gradient(135deg, #0f172a, #115e59 58%, #064e3b);
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.page-hero h1 {
  color: #ffffff;
  font-size: clamp(42px, 6vw, 72px);
}

.page-hero p:not(.eyebrow) {
  max-width: 720px;
  margin: 18px 0 0;
  color: #d1fae5;
  font-size: 18px;
}

.category-hero,
.search-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.page-search {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.26);
}

.page-search input {
  color: #ffffff;
}

.page-search input::placeholder {
  color: #d1fae5;
}

.search-panel {
  width: min(480px, 100%);
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.26);
}

.search-input {
  min-height: 46px;
  color: #ffffff;
}

.search-input::placeholder {
  color: #d1fae5;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
}

.category-thumb {
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 4 / 3;
}

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

.category-overview-card p {
  color: var(--text-muted);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  color: var(--text-muted);
  font-size: 14px;
}

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

.detail-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 34px;
  color: #ffffff;
  background:
    radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.26), transparent 36%),
    linear-gradient(135deg, #020617, #0f172a 52%, #064e3b);
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

.detail-poster img {
  aspect-ratio: 4 / 5.7;
  object-fit: cover;
}

.detail-info h1 {
  color: #ffffff;
  font-size: clamp(40px, 5vw, 68px);
}

.detail-one-line {
  margin: 20px 0 0;
  color: #dbeafe;
  font-size: 18px;
}

.detail-tags span,
.detail-meta span {
  color: #ecfdf5;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(167, 243, 208, 0.24);
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  background: #020617;
  border-radius: 30px;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 20px;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.28));
  border: 0;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.big-play {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  border-radius: 50%;
  box-shadow: 0 20px 45px rgba(5, 150, 105, 0.4);
  font-size: 34px;
}

.play-cover strong {
  font-size: clamp(22px, 3vw, 34px);
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 34px;
}

.content-card {
  padding: 30px;
}

.content-card p {
  color: #334155;
  font-size: 16px;
}

.related-section {
  margin-bottom: 72px;
}

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

.sticky-panel {
  position: sticky;
  top: 98px;
  align-self: start;
}

.site-footer {
  margin-top: 72px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #020617, #111827 48%, #064e3b);
}

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

.footer-logo {
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer p,
.site-footer ul {
  margin: 0;
}

.site-footer ul {
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

.site-footer a:hover {
  color: var(--emerald-bright);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  color: #94a3b8;
  font-size: 14px;
}

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

@media (max-width: 1100px) {
  .category-grid,
  .movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .category-overview-grid,
  .detail-content,
  .split-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .nav-wrap {
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 16px;
  }

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

  .main-nav a {
    padding: 12px 4px;
    border-top: 1px solid #e2e8f0;
  }

  .quick-search-inner,
  .category-hero,
  .search-hero {
    flex-direction: column;
    align-items: stretch;
  }

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

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

  .detail-poster {
    width: min(320px, 100%);
    margin: 0 auto;
  }

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

@media (max-width: 560px) {
  .brand {
    font-size: 20px;
  }

  .hero-content {
    left: 18px;
    width: calc(100% - 36px);
    bottom: 13vh;
  }

  .hero-summary {
    font-size: 15px;
  }

  .hero-dots {
    left: 18px;
  }

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

  .quick-search,
  .section-block,
  .split-section,
  .detail-content,
  .breadcrumb,
  .player-section,
  .detail-hero,
  .page-hero {
    width: min(100% - 22px, 1180px);
  }

  .detail-hero,
  .page-hero,
  .quick-search-inner,
  .content-card,
  .feature-panel {
    border-radius: 22px;
    padding: 22px;
  }
}
