* {
  box-sizing: border-box;
}

:root {
  --bg: #f6f7f8;
  --panel: #ffffff;
  --text: #1f2937;
  --muted: #64748b;
  --line: #e2e8f0;
  --teal: #0f766e;
  --teal-dark: #134e4a;
  --teal-soft: #ccfbf1;
  --amber: #d97706;
  --red: #dc2626;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #ecfeff 0, var(--bg) 280px, #f8fafc 100%);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, #0f766e, #134e4a);
  box-shadow: 0 10px 32px rgba(15, 76, 74, 0.28);
}

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

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

.brand {
  font-size: 21px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #0f766e;
  background: #fff;
  box-shadow: inset 0 0 0 2px rgba(15, 118, 110, 0.12);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-weight: 700;
  opacity: 0.92;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ccfbf1;
  opacity: 1;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

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

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 14px;
}

.mobile-panel.is-open {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.mobile-link {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  font-weight: 700;
}

.nav-pills {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 14px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
}

.nav-pill {
  flex: 0 0 auto;
  padding: 7px 13px;
  border-radius: 999px;
  color: #ccfbf1;
  background: rgba(255, 255, 255, 0.1);
  font-size: 14px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nav-pill:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.18);
}

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

.hero {
  position: relative;
  min-height: 620px;
  margin: 28px auto 32px;
  overflow: hidden;
  border-radius: 30px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

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

.hero-slide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 34px;
  align-items: center;
  padding: 70px 72px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: saturate(1.05) contrast(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 76% 24%, rgba(20, 184, 166, 0.34), transparent 38%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 76, 74, 0.74) 54%, rgba(15, 23, 42, 0.5));
}

.hero-content,
.hero-poster {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 7px 13px;
  border-radius: 999px;
  color: #115e59;
  background: #ccfbf1;
  font-size: 14px;
  font-weight: 800;
}

.hero-content h1 {
  max-width: 760px;
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 20px;
  color: #d1fae5;
  font-size: 19px;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #0f766e;
  background: rgba(204, 251, 241, 0.92);
  font-size: 13px;
  font-weight: 700;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-primary,
.btn-ghost,
.hero-search button,
.category-block-head a,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  color: #fff;
  background: #0f766e;
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.28);
}

.btn-primary:hover,
.hero-search button:hover,
.category-block-head a:hover {
  transform: translateY(-2px);
  background: #115e59;
}

.btn-ghost {
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

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

.hero-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 26px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  transform: rotate(2deg);
}

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

.hero-dots {
  position: absolute;
  right: 30px;
  bottom: 26px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #fff;
}

.search-band {
  margin: 0 0 44px;
  padding: 24px;
  border-radius: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  gap: 24px;
  align-items: center;
  background: linear-gradient(135deg, #ffffff, #ecfeff);
  box-shadow: 0 14px 42px rgba(15, 23, 42, 0.08);
}

.search-band h2 {
  margin: 0 0 6px;
  font-size: clamp(24px, 3vw, 34px);
}

.search-band p {
  margin: 0;
  color: var(--muted);
}

.hero-search,
.page-filter {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.hero-search input,
.page-filter input {
  flex: 1;
  min-width: 0;
  padding: 15px 18px;
  border: 0;
  outline: none;
  background: transparent;
}

.hero-search button {
  padding: 0 22px;
  color: #fff;
  background: var(--teal);
}

.content-section {
  margin: 0 0 56px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(25px, 3vw, 34px);
  color: #1f2937;
}

.section-link {
  color: var(--teal);
  font-size: 15px;
}

.section-link:hover {
  color: var(--teal-dark);
  transform: translateX(2px);
}

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

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

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

.six-cols {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

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

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

.movie-year,
.movie-type {
  position: absolute;
  top: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

.movie-year {
  left: 12px;
}

.movie-type {
  right: 12px;
  background: rgba(15, 118, 110, 0.82);
}

.movie-card-body {
  padding: 14px 14px 16px;
}

.movie-title {
  display: block;
  margin-bottom: 8px;
  color: #111827;
  font-weight: 800;
  line-height: 1.35;
}

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

.movie-one-line {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #0f766e;
  font-size: 13px;
  font-weight: 700;
}

.movie-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #ecfeff;
}

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

.category-card,
.category-block {
  border: 1px solid rgba(15, 118, 110, 0.13);
  border-radius: 22px;
  background: linear-gradient(135deg, #fff, #f0fdfa);
  box-shadow: 0 10px 34px rgba(15, 23, 42, 0.07);
}

.category-card {
  min-height: 156px;
  padding: 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card span {
  display: block;
  margin-bottom: 10px;
  color: var(--teal-dark);
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  color: var(--muted);
}

.ranking-section {
  padding: 24px;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.ranking-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.ranking-link {
  display: grid;
  grid-template-columns: 42px 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-link:hover {
  transform: translateX(3px);
  background: #ecfeff;
}

.ranking-number {
  color: var(--amber);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.ranking-link img {
  width: 64px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
}

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

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

.ranking-info strong {
  font-size: 15px;
}

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

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

.page-hero {
  margin-bottom: 34px;
  padding: clamp(28px, 5vw, 56px);
  border-radius: 30px;
  color: #fff;
  background:
    radial-gradient(circle at 72% 20%, rgba(20, 184, 166, 0.38), transparent 35%),
    linear-gradient(135deg, #0f766e, #0f172a);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 860px;
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: #ccfbf1;
  font-size: 18px;
}

.category-hero .page-filter,
.search-hero .page-filter {
  max-width: 720px;
  margin-top: 28px;
}

.large-filter {
  min-height: 58px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.filter-pills button {
  border: 0;
  border-radius: 999px;
  padding: 8px 13px;
  color: #0f766e;
  background: #ccfbf1;
  cursor: pointer;
  font-weight: 800;
}

.category-block {
  margin-bottom: 28px;
  padding: 22px;
}

.category-block-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.category-block-head h2 {
  margin: 0 0 6px;
  color: var(--teal-dark);
}

.category-block-head p {
  margin: 0;
  color: var(--muted);
}

.category-block-head a {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff;
  background: var(--teal);
}

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

.compact-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.compact-card img {
  width: 58px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  grid-row: span 2;
}

.compact-card span,
.compact-card em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-card span {
  font-weight: 800;
}

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

.empty-state {
  display: none;
  padding: 40px;
  border-radius: 22px;
  text-align: center;
  color: var(--muted);
  background: #fff;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 28px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  margin-bottom: 34px;
  padding: 34px;
  border-radius: 30px;
  color: #fff;
  background:
    radial-gradient(circle at 80% 20%, rgba(20, 184, 166, 0.34), transparent 35%),
    linear-gradient(135deg, #0f172a, #115e59);
  box-shadow: var(--shadow);
}

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

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

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.1;
}

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

.detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.detail-meta div {
  padding: 13px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
}

.detail-meta dt {
  margin-bottom: 4px;
  color: #a7f3d0;
  font-size: 13px;
}

.detail-meta dd {
  margin: 0;
  font-weight: 800;
}

.detail-info .btn-primary {
  margin-top: 24px;
  background: #14b8a6;
}

.watch-section {
  margin-bottom: 34px;
}

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

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

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.74));
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.player-start span:last-child {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.9);
  font-weight: 900;
}

.play-symbol {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  padding-left: 5px;
  border-radius: 50%;
  color: var(--teal);
  background: #fff;
  font-size: 34px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.player.is-playing .player-start {
  opacity: 0;
  pointer-events: none;
}

.detail-content {
  display: grid;
  gap: 20px;
  margin-bottom: 48px;
}

.detail-content section {
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.detail-content h2 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 25px;
}

.detail-content p {
  margin: 0;
  color: #334155;
  font-size: 17px;
}

.site-footer {
  margin-top: 72px;
  color: #cbd5e1;
  background: #111827;
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0 34px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
}

.footer-brand {
  margin-bottom: 14px;
  color: #fff;
  font-size: 20px;
}

.footer-grid p {
  margin: 0;
  color: #94a3b8;
}

.footer-grid h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 17px;
}

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

.footer-grid li {
  margin: 0 0 8px;
}

.footer-grid a:hover {
  color: #5eead4;
}

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

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

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

  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 260px;
    padding: 54px;
  }

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

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

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: 720px;
    border-radius: 24px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: end;
    padding: 34px 24px 82px;
  }

  .hero-poster {
    width: min(210px, 55vw);
    margin: 0 auto;
    order: -1;
  }

  .search-band {
    grid-template-columns: 1fr;
  }

  .featured-grid,
  .four-cols,
  .archive-grid,
  .category-grid,
  .six-cols,
  .compact-grid,
  .ranking-list,
  .ranking-page-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-poster {
    width: min(260px, 70vw);
    margin: 0 auto;
  }

  .detail-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 560px) {
  main,
  .page-main,
  .detail-main,
  .nav-wrap,
  .mobile-panel,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    font-size: 18px;
  }

  .hero {
    margin-top: 16px;
    min-height: 680px;
  }

  .hero-content h1 {
    font-size: 34px;
  }

  .hero-content p,
  .detail-one-line,
  .page-hero p {
    font-size: 16px;
  }

  .featured-grid,
  .four-cols,
  .archive-grid,
  .category-grid,
  .six-cols,
  .compact-grid,
  .ranking-list,
  .ranking-page-list {
    grid-template-columns: 1fr;
  }

  .ranking-link {
    grid-template-columns: 38px 58px minmax(0, 1fr);
  }

  .category-block-head {
    display: block;
  }

  .category-block-head a {
    margin-top: 14px;
  }

  .hero-search {
    border-radius: 20px;
    flex-direction: column;
  }

  .hero-search button {
    min-height: 48px;
  }

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