* {
  box-sizing: border-box;
}

:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --teal: #0d9488;
  --cyan: #0891b2;
  --blue: #1d4ed8;
  --amber: #f59e0b;
  --rose: #e11d48;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

body.menu-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

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

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

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

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

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: white;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 14px 28px rgba(13, 148, 136, 0.30);
}

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

.nav-link,
.mobile-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #334155;
  font-weight: 700;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--teal);
  background: #ecfeff;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #f1f5f9;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #0f172a;
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px 16px;
  background: white;
}

.hero-section {
  position: relative;
  overflow: hidden;
  color: white;
  background: radial-gradient(circle at 10% 15%, rgba(34, 211, 238, 0.45), transparent 28%), linear-gradient(135deg, #0f766e 0%, #0891b2 46%, #1d4ed8 100%);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: radial-gradient(circle, rgba(255,255,255,0.7) 1px, transparent 1px);
  background-size: 30px 30px;
}

.hero-shell {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 72px 0;
}

.hero-carousel {
  position: relative;
  width: 100%;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  align-items: center;
  gap: 56px;
}

.hero-slide.is-active {
  display: grid;
  animation: fadeUp 0.55s ease both;
}

.hero-copy h1 {
  margin: 18px 0;
  max-width: 760px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 700px;
  margin: 0 0 24px;
  color: #e0f2fe;
  font-size: clamp(17px, 2.2vw, 24px);
  line-height: 1.7;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--teal);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-section .eyebrow,
.detail-hero .eyebrow,
.page-hero .eyebrow {
  color: #cffafe;
}

.hero-tags,
.tag-row,
.detail-meta,
.quick-links,
.hero-actions,
.page-actions,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.hero-tags span {
  color: white;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: 0.25s ease;
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 16px 30px rgba(13, 148, 136, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(13, 148, 136, 0.34);
}

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

.btn-ghost.dark {
  color: var(--ink);
  background: white;
  border-color: var(--line);
}

.hero-actions {
  margin-top: 30px;
}

.hero-poster {
  position: relative;
  display: block;
  min-height: 460px;
  overflow: hidden;
  border-radius: 34px;
  box-shadow: 0 35px 90px rgba(8, 47, 73, 0.42);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  min-height: 460px;
  object-fit: cover;
  transition: transform 0.55s ease;
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.78));
}

.hero-poster span {
  position: absolute;
  left: 22px;
  bottom: 22px;
  z-index: 2;
  padding: 8px 14px;
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(10px);
  font-weight: 800;
}

.hero-dots {
  position: absolute;
  left: 0;
  bottom: -48px;
  display: flex;
  gap: 10px;
}

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

.hero-dot.is-active {
  width: 36px;
  background: white;
}

.section {
  padding: 72px 0;
}

.section-head {
  margin-bottom: 30px;
}

.section-head h2,
.intro-card h2,
.page-hero h1,
.ranking-layout h2 {
  margin: 8px 0 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-head p,
.page-hero p,
.ranking-layout p,
.intro-card p {
  color: var(--muted);
  line-height: 1.8;
}

.centered {
  text-align: center;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

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

.intro-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.85fr 0.85fr;
  gap: 20px;
}

.intro-card,
.content-card,
.player-card {
  padding: 28px;
  border-radius: 28px;
  background: white;
  box-shadow: var(--soft-shadow);
  border: 1px solid rgba(226, 232, 240, 0.85);
}

.intro-large {
  background: linear-gradient(135deg, #ffffff, #ecfeff);
}

.quick-links a {
  padding: 9px 13px;
  border-radius: 999px;
  background: #ecfeff;
  color: var(--teal);
  font-weight: 900;
}

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

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

.category-card {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: 28px;
  background: #0f172a;
  box-shadow: var(--soft-shadow);
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  opacity: 0.54;
  transition: 0.45s ease;
}

.category-card:hover img {
  transform: scale(1.07);
  opacity: 0.72;
}

.category-card-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 22px;
  color: white;
  background: linear-gradient(180deg, transparent 20%, rgba(15, 23, 42, 0.9));
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p {
  margin: 0 0 18px;
  color: #dbeafe;
  line-height: 1.7;
}

.category-card strong {
  color: #67e8f9;
}

.highlight-section {
  background: linear-gradient(135deg, #fff7ed, #ecfeff);
}

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

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

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

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

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

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

.featured-grid .poster-link {
  aspect-ratio: 16 / 10;
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(2, 6, 23, 0.7));
  opacity: 0.8;
}

.play-badge,
.rank-mark {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-weight: 900;
}

.play-badge {
  right: 12px;
  bottom: 12px;
  padding: 7px 12px;
  color: white;
  background: rgba(13, 148, 136, 0.92);
}

.rank-mark {
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--amber), var(--rose));
}

.movie-info {
  padding: 18px;
}

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

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

.movie-meta {
  margin: 8px 0 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.movie-desc {
  display: -webkit-box;
  min-height: 66px;
  overflow: hidden;
  margin: 0 0 14px;
  color: #475569;
  line-height: 1.65;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.tag-row span {
  color: var(--teal);
  background: #ecfeff;
}

.search-panel {
  position: relative;
}

.search-box {
  display: grid;
  gap: 8px;
  min-width: min(360px, 100%);
  color: var(--muted);
  font-weight: 900;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  color: var(--ink);
  background: white;
  transition: 0.2s ease;
}

.search-box input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
}

.search-empty {
  display: none;
  margin: 12px 0 0;
  color: var(--rose);
  font-weight: 900;
}

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

.ranking-section {
  color: white;
  background: linear-gradient(135deg, #0f172a, #164e63);
}

.ranking-section.soft {
  color: var(--ink);
  background: linear-gradient(135deg, #f8fafc, #ecfeff);
}

.ranking-layout {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 36px;
  align-items: start;
}

.ranking-layout p {
  color: #dbeafe;
}

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

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

.ranking-item {
  display: grid;
  grid-template-columns: 42px 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 18px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.ranking-no {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: white;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  font-weight: 900;
}

.ranking-item img {
  width: 54px;
  height: 70px;
  object-fit: cover;
  border-radius: 12px;
}

.ranking-text {
  min-width: 0;
}

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

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

.ranking-text em {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.ranking-score {
  color: var(--amber);
  font-size: 20px;
  font-weight: 900;
}

.page-hero {
  padding: 96px 0;
  color: white;
  background: radial-gradient(circle at 20% 20%, rgba(45, 212, 191, 0.35), transparent 28%), linear-gradient(135deg, #0f766e, #1d4ed8);
}

.page-hero h1 {
  max-width: 850px;
}

.page-hero p {
  max-width: 720px;
  color: #e0f2fe;
  font-size: 19px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: white;
  background: #0f172a;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.26;
  filter: blur(18px);
  transform: scale(1.08);
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  min-height: 620px;
  padding: 70px 0;
}

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

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: #bae6fd;
  font-weight: 800;
}

.detail-copy h1 {
  margin: 14px 0 18px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.detail-one-line {
  max-width: 840px;
  color: #dbeafe;
  font-size: 20px;
  line-height: 1.75;
}

.detail-meta {
  margin: 26px 0 18px;
}

.detail-meta span {
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.detail-tags span {
  color: #cffafe;
  background: rgba(20, 184, 166, 0.18);
}

.player-card {
  background: #0f172a;
  color: white;
}

.player-head {
  margin-bottom: 18px;
}

.player-head h2 {
  margin: 8px 0 0;
  font-size: clamp(24px, 4vw, 38px);
}

.video-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.video-element {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

.play-overlay.is-hidden {
  display: none;
}

.play-circle {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--teal);
  font-size: 34px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.32);
}

.play-overlay strong {
  font-size: 20px;
}

.detail-content {
  padding-top: 0;
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.content-card h2:not(:first-child) {
  margin-top: 34px;
}

.content-card p {
  color: #334155;
  font-size: 18px;
  line-height: 1.95;
}

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

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.footer-logo {
  color: white;
  font-size: 24px;
}

.footer-links a {
  color: #e0f2fe;
  font-weight: 800;
}

.copyright {
  margin: 0;
  color: #94a3b8;
}

.more-link {
  color: var(--teal);
  font-weight: 900;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

  .menu-toggle {
    display: block;
  }

  body.menu-open .mobile-nav {
    display: flex;
  }

  .hero-shell {
    min-height: auto;
    padding: 48px 0 86px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero-poster {
    min-height: 380px;
    transform: none;
  }

  .hero-poster img {
    min-height: 380px;
  }

  .hero-dots {
    bottom: -48px;
  }

  .between {
    display: grid;
    align-items: start;
  }

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

  .detail-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

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

@media (max-width: 560px) {
  .container,
  .nav-wrap,
  .hero-shell,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

  .section {
    padding: 48px 0;
  }

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

  .ranking-item {
    grid-template-columns: 34px 48px minmax(0, 1fr);
  }

  .ranking-score {
    display: none;
  }

  .intro-card,
  .content-card,
  .player-card {
    padding: 22px;
    border-radius: 22px;
  }

  .detail-copy h1,
  .hero-copy h1 {
    letter-spacing: -0.04em;
  }
}
