:root {
  --cyan: #0891b2;
  --cyan-dark: #0e7490;
  --blue: #2563eb;
  --teal: #0d9488;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #f1f5f9;
  --line: #e2e8f0;
  --card: #ffffff;
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(135deg, #ecfeff 0%, #eff6ff 42%, #f8fafc 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  color: #ffffff;
  background: linear-gradient(90deg, #0891b2 0%, #2563eb 48%, #0d9488 100%);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
}

.header-main {
  width: min(1180px, calc(100% - 32px));
  height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

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

.brand-text strong {
  font-size: 24px;
}

.brand-text small {
  margin-top: 4px;
  color: #cffafe;
  font-size: 12px;
  font-weight: 600;
}

.header-search {
  flex: 1;
  max-width: 430px;
  margin-left: auto;
  display: flex;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(8, 145, 178, 0.22);
}

.header-search input,
.mobile-search input,
.search-panel input,
.local-filter input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: #ffffff;
}

.header-search input {
  padding: 12px 16px;
}

.header-search button,
.mobile-search button,
.search-panel button {
  border: 0;
  color: #ffffff;
  cursor: pointer;
  padding: 0 18px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

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

.desktop-nav a,
.mobile-panel a,
.strip-scroll a {
  border-radius: 12px;
  transition: background 0.25s ease, transform 0.25s ease;
}

.desktop-nav a {
  padding: 10px 14px;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.strip-scroll a:hover {
  background: rgba(255, 255, 255, 0.14);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  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: #ffffff;
  border-radius: 2px;
}

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

.mobile-search {
  display: flex;
  overflow: hidden;
  border-radius: 14px;
  background: #ffffff;
}

.mobile-search input {
  padding: 12px 14px;
}

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mobile-panel a {
  padding: 12px;
}

.category-strip {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

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

.strip-scroll a {
  white-space: nowrap;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 14px;
}

.hero-slider {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #0f172a;
}

.hero-stage {
  position: relative;
  min-height: 640px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity 0.65s ease, visibility 0.65s ease, transform 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-image {
  height: 100%;
  min-height: 640px;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.02);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 24%, rgba(34, 211, 238, 0.24), transparent 30%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.58) 48%, rgba(15, 23, 42, 0.18)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.88), transparent 42%);
}

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

.hero-eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #ecfeff;
  background: rgba(8, 145, 178, 0.82);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 20px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 590px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.detail-meta span,
.detail-tags span,
.tag-line {
  border-radius: 999px;
  color: #155e75;
  background: #cffafe;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span,
.detail-meta span,
.detail-tags span {
  padding: 8px 12px;
}

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

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button {
  padding: 0 24px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 34px rgba(8, 145, 178, 0.28);
}

.ghost-button {
  padding: 0 22px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.ghost-button.light {
  color: var(--cyan-dark);
  background: #ecfeff;
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover,
.movie-card:hover,
.category-card:hover,
.rank-card:hover {
  transform: translateY(-3px);
}

.hero-controls {
  position: absolute;
  right: max(32px, calc((100% - 1180px) / 2));
  bottom: 72px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-prev,
.hero-next,
.hero-dot {
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.hero-prev,
.hero-next {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 30px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border-radius: 50%;
}

.hero-dot.is-active {
  width: 30px;
  border-radius: 999px;
  background: #22d3ee;
}

.category-showcase,
.content-section,
.ranking-section,
.page-shell,
.detail-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.category-showcase,
.content-section,
.ranking-section {
  padding: 74px 0 0;
}

.page-shell,
.detail-shell {
  padding: 34px 0 82px;
}

.section-heading,
.category-preview-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.compact-heading {
  align-items: center;
}

.section-kicker {
  color: #0e7490;
  background: #cffafe;
}

.section-heading h2,
.category-preview-head h2,
.page-hero h1,
.detail-info h1,
.player-section h2,
.detail-content h2 {
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.04em;
}

.section-heading h2,
.category-preview-head h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.section-heading p,
.category-preview-head p,
.page-hero p,
.detail-one-line,
.detail-content p,
.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

.section-heading p,
.category-preview-head p {
  max-width: 660px;
  margin: 8px 0 0;
}

.section-more {
  flex-shrink: 0;
  padding: 0 18px;
  color: var(--cyan-dark);
  background: #ecfeff;
  box-shadow: inset 0 0 0 1px #bae6fd;
}

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

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

.category-card img {
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  opacity: 0.78;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.category-card span,
.category-card strong {
  position: absolute;
  left: 18px;
  right: 18px;
  color: #ffffff;
  text-shadow: 0 6px 20px rgba(0, 0, 0, 0.38);
}

.category-card span {
  bottom: 52px;
  font-size: 22px;
  font-weight: 900;
}

.category-card strong {
  bottom: 22px;
  font-size: 14px;
  color: #cffafe;
}

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

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

.movie-card,
.rank-card,
.category-preview,
.player-section,
.detail-content article,
.page-hero {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.movie-card,
.rank-card {
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.rank-card:hover {
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.14);
}

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

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

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

.poster-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(8, 145, 178, 0.9);
  font-size: 12px;
  font-weight: 800;
}

.card-content {
  padding: 16px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--cyan-dark);
  font-size: 12px;
  font-weight: 800;
}

.card-meta span {
  color: var(--muted);
  font-weight: 700;
}

.card-content h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.card-content h3 a:hover,
.rank-title:hover {
  color: var(--cyan-dark);
}

.card-content p {
  min-height: 72px;
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.tag-line {
  display: inline-flex;
  max-width: 100%;
  padding: 6px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-card.compact {
  display: grid;
  grid-template-columns: 110px 1fr;
}

.movie-card.compact .poster-link {
  aspect-ratio: 3 / 4;
}

.movie-card.compact .card-content p,
.movie-card.compact .tag-line {
  display: none;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 48px 58px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.rank-item img {
  width: 58px;
  height: 76px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-no {
  color: var(--cyan-dark);
  font-weight: 900;
}

.rank-type {
  max-width: 160px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-hero {
  padding: clamp(32px, 6vw, 64px);
  margin-bottom: 32px;
  background:
    radial-gradient(circle at right top, rgba(34, 211, 238, 0.24), transparent 32%),
    linear-gradient(135deg, #ffffff 0%, #ecfeff 100%);
}

.slim-hero {
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(38px, 7vw, 72px);
}

.page-hero p {
  max-width: 720px;
  margin: 16px auto 0;
  font-size: 18px;
}

.category-preview {
  padding: 26px;
  margin-bottom: 24px;
}

.local-filter,
.search-panel {
  width: min(720px, 100%);
  margin: 28px auto 0;
}

.local-filter input,
.search-panel input {
  min-height: 54px;
  padding: 0 18px;
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px var(--line), 0 16px 34px rgba(15, 23, 42, 0.08);
}

.search-panel {
  display: flex;
  overflow: hidden;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.search-panel input {
  border-radius: 0;
  box-shadow: none;
}

.search-panel button {
  padding: 0 28px;
}

.search-status {
  min-height: 24px;
  margin-top: 16px;
  color: var(--cyan-dark);
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 8px 0 24px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: 34px;
  align-items: center;
  padding: clamp(22px, 4vw, 42px);
  border-radius: 28px;
  color: #ffffff;
  background:
    radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.24), transparent 28%),
    linear-gradient(135deg, #0f172a 0%, #164e63 58%, #0f766e 100%);
  box-shadow: var(--shadow);
}

.detail-poster img {
  border-radius: 22px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.28);
}

.detail-info h1 {
  color: #ffffff;
  font-size: clamp(34px, 6vw, 70px);
}

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

.detail-meta span,
.detail-tags span {
  color: #ecfeff;
  background: rgba(255, 255, 255, 0.14);
}

.detail-tags {
  margin-top: 14px;
}

.player-section,
.detail-content article {
  padding: clamp(20px, 4vw, 34px);
  margin-top: 28px;
}

.player-section h2,
.detail-content h2 {
  margin-bottom: 18px;
  font-size: clamp(24px, 3vw, 34px);
}

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

.player-video,
.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-video {
  z-index: 1;
  background: #020617;
}

.player-cover {
  z-index: 2;
  border: 0;
  padding: 0;
  cursor: pointer;
  background: #020617;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
  height: 100%;
  object-fit: cover;
  opacity: 0.68;
  filter: saturate(1.08) contrast(1.03);
}

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

.play-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 20px 60px rgba(8, 145, 178, 0.45);
  font-size: 34px;
}

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

.detail-content p {
  margin: 0;
}

.related-section {
  width: 100%;
}

.rank-card-link {
  display: grid;
  grid-template-columns: 74px 86px 1fr;
  align-items: center;
  gap: 18px;
  padding: 14px;
}

.rank-card img {
  width: 86px;
  height: 116px;
  border-radius: 16px;
  object-fit: cover;
}

.rank-no.large {
  text-align: center;
  font-size: 22px;
}

.rank-card-body {
  display: grid;
  gap: 8px;
}

.rank-card-body strong {
  font-size: 20px;
}

.rank-card-body em {
  color: var(--cyan-dark);
  font-style: normal;
  font-weight: 800;
}

.rank-card-body span {
  color: var(--muted);
  line-height: 1.6;
}

.empty-state {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border-radius: 18px;
  background: #ffffff;
}

.site-footer {
  margin-top: 50px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b 60%, #0f172a);
}

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

.footer-brand {
  color: #ffffff;
  font-size: 24px;
}

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

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

.site-footer a:hover {
  color: #67e8f9;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  color: #94a3b8;
  font-size: 14px;
}

.center-actions {
  justify-content: center;
}

.not-found {
  min-height: 420px;
  display: grid;
  place-items: center;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1024px) {
  .header-search,
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .site-header.is-open .mobile-panel {
    display: block;
  }

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

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

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

@media (max-width: 720px) {
  .header-main {
    height: 68px;
  }

  .brand-text strong {
    font-size: 20px;
  }

  .hero-slider,
  .hero-stage,
  .hero-image {
    min-height: 560px;
  }

  .hero-content {
    left: 20px;
    bottom: 96px;
    width: calc(100% - 40px);
  }

  .hero-content p {
    font-size: 16px;
  }

  .hero-controls {
    left: 20px;
    right: auto;
    bottom: 36px;
  }

  .section-heading,
  .category-preview-head,
  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .category-grid,
  .movie-grid,
  .small-grid,
  .home-ranking {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .movie-card.compact {
    grid-template-columns: 1fr;
  }

  .card-content {
    padding: 14px;
  }

  .card-content p {
    min-height: 0;
  }

  .detail-hero {
    padding: 18px;
  }

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

  .rank-item,
  .rank-card-link {
    grid-template-columns: 48px 64px 1fr;
  }

  .rank-type,
  .rank-card-body span {
    display: none;
  }

  .rank-card img {
    width: 64px;
    height: 86px;
  }
}

@media (max-width: 460px) {
  .category-grid,
  .movie-grid,
  .small-grid,
  .home-ranking {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

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

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