:root {
  --primary: #0d9488;
  --primary-soft: #ccfbf1;
  --primary-dark: #115e59;
  --secondary: #2563eb;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --paper: #ffffff;
  --bg: #f8fafc;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

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

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

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

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

.nav-shell {
  max-width: 1240px;
  height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 10px 25px rgba(13, 148, 136, 0.24);
}

.brand-text {
  font-size: 21px;
}

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

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

.nav-link:hover,
.mobile-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-button span {
  width: 20px;
  height: 2px;
  background: #111827;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 10px 18px 18px;
  border-top: 1px solid var(--line);
  background: white;
}

.mobile-nav.is-open {
  display: grid;
  gap: 6px;
}

.hero-wrap {
  max-width: 1240px;
  margin: 28px auto 0;
  padding: 0 22px;
}

.hero-stage {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  border-radius: 28px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  min-height: 70vh;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: absolute;
  left: clamp(26px, 6vw, 76px);
  top: 50%;
  max-width: 680px;
  transform: translateY(-50%);
  color: white;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: white;
  background: rgba(20, 184, 166, 0.9);
}

.hero-content h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 620px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-actions,
.section-heading,
.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.primary-button,
.ghost-button,
.quick-search button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.25s ease;
}

.primary-button,
.quick-search button {
  padding: 13px 22px;
  color: white;
  background: var(--primary);
  box-shadow: 0 12px 28px rgba(13, 148, 136, 0.24);
}

.primary-button:hover,
.quick-search button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.ghost-button,
.text-button {
  padding: 12px 18px;
  color: white;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
}

.text-button {
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-color: transparent;
}

.hero-control {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
  transition: 0.25s ease;
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.32);
}

.hero-control.prev {
  left: 18px;
}

.hero-control.next {
  right: 18px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: 0.25s ease;
}

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

.section-shell,
.detail-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 54px 22px 0;
}

.intro-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  align-items: end;
  gap: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-shell h2,
.page-hero h1,
.intro-panel h2,
.detail-info h1 {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.intro-panel h2,
.section-heading h2,
.category-panel h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.intro-panel p,
.page-hero p,
.category-overview-card p,
.prose-card p {
  color: var(--muted);
  line-height: 1.85;
}

.quick-search,
.filter-box {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 18px;
  background: white;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
}

.quick-search input,
.filter-box input {
  width: 100%;
  min-height: 48px;
  border: 0;
  outline: none;
  padding: 0 14px;
  color: var(--ink);
  font-size: 16px;
  background: transparent;
}

.section-heading {
  margin-bottom: 24px;
}

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

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

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

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

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

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

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5.5;
  overflow: hidden;
  background: linear-gradient(135deg, #e2e8f0, #f8fafc);
}

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

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

.card-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: white;
  background: rgba(13, 148, 136, 0.9);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 16px;
}

.card-body h2 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h2 a:hover {
  color: var(--primary);
}

.card-body p {
  height: 48px;
  margin: 0 0 14px;
  color: var(--muted);
  overflow: hidden;
  line-height: 1.65;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span,
.detail-meta span {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
  gap: 28px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 46px 58px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 16px;
  background: white;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  transition: 0.25s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
}

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

.rank-item img {
  width: 58px;
  height: 74px;
  object-fit: cover;
  border-radius: 12px;
  background: #e2e8f0;
}

.rank-main {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.rank-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-main em {
  overflow: hidden;
  color: var(--muted);
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-arrow {
  color: var(--primary);
  font-size: 24px;
}

.category-panel,
.prose-card,
.category-overview-card {
  border-radius: 24px;
  background: white;
  padding: 26px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.mini-category-list,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mini-category-list a,
.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: var(--primary-soft);
  font-weight: 750;
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 22px;
  color: white;
  background: #0f172a;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.74;
  transition: 0.45s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.06));
}

.category-tile span,
.category-tile small {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 1;
}

.category-tile span {
  bottom: 62px;
  font-size: 24px;
  font-weight: 900;
}

.category-tile small {
  bottom: 18px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.5;
}

.page-hero {
  max-width: 1240px;
  margin: 28px auto 0;
  padding: 64px 22px 24px;
}

.page-hero h1 {
  max-width: 880px;
  font-size: clamp(38px, 6vw, 68px);
}

.page-hero p {
  max-width: 760px;
  font-size: 18px;
}

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

.category-overview-list {
  display: grid;
  gap: 24px;
}

.category-overview-head h2 {
  font-size: 32px;
}

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

.compact-card {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.compact-card img {
  width: 100%;
  aspect-ratio: 4 / 5.4;
  object-fit: cover;
  border-radius: 14px;
  background: #e2e8f0;
  transition: 0.35s ease;
}

.compact-card span {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-card small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-rank-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.detail-shell {
  padding-top: 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  color: var(--muted);
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.75fr);
  gap: 28px;
  align-items: stretch;
}

.player-panel,
.detail-info {
  border-radius: 26px;
  background: white;
  box-shadow: var(--shadow);
}

.player-panel {
  overflow: hidden;
}

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

.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: white;
  background: rgba(2, 6, 23, 0.28);
  cursor: pointer;
  transition: 0.25s ease;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.92);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
  font-size: 34px;
  text-indent: 5px;
}

.play-overlay:hover {
  background: rgba(2, 6, 23, 0.08);
}

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

.detail-info {
  padding: 28px;
}

.detail-info h1 {
  margin: 8px 0 14px;
  font-size: clamp(28px, 4vw, 46px);
}

.detail-one-line {
  color: #475569;
  line-height: 1.85;
}

.detail-meta {
  margin-top: 18px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.prose-card h2 {
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: 900;
}

.prose-card p {
  margin: 0;
  color: #374151;
  font-size: 16px;
}

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

.footer-shell {
  max-width: 1240px;
  margin: 0 auto;
  padding: 46px 22px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 28px;
}

.footer-brand {
  margin-bottom: 14px;
  color: white;
  font-size: 22px;
}

.site-footer p {
  margin: 0;
  max-width: 520px;
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: white;
  font-size: 18px;
}

.footer-links a {
  color: #ccfbf1;
  background: rgba(20, 184, 166, 0.14);
}

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

.empty-state {
  grid-column: 1 / -1;
  padding: 34px;
  border-radius: 20px;
  color: var(--muted);
  background: white;
  text-align: center;
}

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

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

  .split-section,
  .detail-layout,
  .detail-content,
  .intro-panel {
    grid-template-columns: 1fr;
  }
}

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

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

  .brand-text {
    font-size: 18px;
  }

  .hero-wrap {
    margin-top: 14px;
    padding: 0 14px;
  }

  .hero-stage,
  .hero-image {
    min-height: 68vh;
  }

  .hero-content {
    left: 22px;
    right: 22px;
  }

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

  .hero-actions,
  .section-heading,
  .category-overview-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-control {
    display: none;
  }

  .section-shell,
  .detail-shell,
  .page-hero {
    padding-left: 14px;
    padding-right: 14px;
  }

  .movie-grid,
  .feature-grid,
  .latest-grid,
  .category-movie-grid,
  .related-grid,
  .category-grid,
  .top-rank-grid,
  .compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .card-body {
    padding: 13px;
  }

  .card-body h2 {
    font-size: 16px;
  }

  .card-body p,
  .tag-row {
    display: none;
  }

  .meta-row {
    flex-direction: column;
    gap: 4px;
  }

  .quick-search {
    flex-direction: column;
  }

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

  .detail-info,
  .prose-card,
  .category-overview-card {
    padding: 20px;
  }
}
