:root {
  --cyan: #0891b2;
  --blue: #2563eb;
  --teal: #0f766e;
  --dark: #0f172a;
  --text: #111827;
  --muted: #64748b;
  --soft: #f8fafc;
  --line: #e2e8f0;
  --card: #ffffff;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.14);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body.menu-open {
  overflow: hidden;
}

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

img,
video {
  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;
  color: #fff;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--teal));
  box-shadow: 0 14px 40px rgba(8, 145, 178, 0.28);
}

.header-inner {
  display: flex;
  align-items: center;
  min-height: 78px;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

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

.brand strong {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.brand em {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  font-style: normal;
  color: rgba(255, 255, 255, 0.78);
}

.header-search {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  max-width: 430px;
  margin-left: auto;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.header-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #0f172a;
  background: #fff;
  padding: 11px 16px;
}

.header-search button {
  border: 0;
  color: #fff;
  padding: 0 18px;
  background: rgba(15, 23, 42, 0.34);
  cursor: pointer;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.86);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  border: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #0e7490, #1d4ed8 50%, #0f766e);
}

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

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: saturate(1.08) contrast(1.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 30%, rgba(34, 211, 238, 0.32), transparent 34%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.55), rgba(15, 118, 110, 0.42));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 118px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #cffafe;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.hero-content h1 {
  max-width: 900px;
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-content h2 {
  margin: 0 0 16px;
  color: #a5f3fc;
  font-size: clamp(24px, 4vw, 40px);
}

.hero-content p {
  max-width: 760px;
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
}

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

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

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: #075985;
  background: #fff;
  box-shadow: 0 16px 34px rgba(255, 255, 255, 0.24);
}

.btn.secondary {
  color: #fff;
  background: rgba(34, 211, 238, 0.28);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.44);
}

.btn.ghost {
  color: #cffafe;
  background: rgba(255, 255, 255, 0.12);
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 38px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

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

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

.quick-panel {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: -42px;
  padding: 20px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.wide-search {
  display: flex;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2ff;
  box-shadow: inset 0 0 0 1px #dbeafe;
}

.wide-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 15px 20px;
}

.wide-search button {
  border: 0;
  color: #fff;
  padding: 0 24px;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.quick-links {
  display: flex;
  gap: 10px;
}

.quick-links a {
  padding: 12px 15px;
  border-radius: 999px;
  font-weight: 700;
  color: #075985;
  background: #ecfeff;
}

.section-block {
  padding: 62px 0;
}

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

.section-title span {
  display: block;
  margin-bottom: 3px;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-title a {
  color: var(--cyan);
  font-weight: 800;
}

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

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

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

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #0891b2, #2563eb, #0f766e);
}

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

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

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

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

.movie-card h3 {
  margin: 0 0 9px;
  font-size: 20px;
  line-height: 1.28;
}

.small-card h3 {
  font-size: 17px;
}

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

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

.tag-row span,
.detail-tags span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #075985;
  background: #ecfeff;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: var(--radius);
  color: #fff;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.16);
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.35s ease;
}

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

.category-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.15), rgba(15, 23, 42, 0.86));
}

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

.category-card strong {
  bottom: 62px;
  font-size: 24px;
}

.category-card em {
  bottom: 18px;
  color: rgba(255, 255, 255, 0.84);
  font-style: normal;
  font-size: 13px;
}

.ranking-band {
  padding: 58px 0;
  color: #fff;
  background:
    radial-gradient(circle at 15% 20%, rgba(34, 211, 238, 0.32), transparent 30%),
    linear-gradient(135deg, #0f172a, #075985 48%, #0f766e);
}

.light-title span,
.light-title a {
  color: #a5f3fc;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 64px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.11);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.rank-item b {
  color: #a5f3fc;
  font-size: 22px;
}

.rank-item img {
  width: 64px;
  height: 82px;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(135deg, #0891b2, #2563eb);
}

.rank-item strong,
.rank-item em {
  display: block;
}

.rank-item em {
  color: rgba(255, 255, 255, 0.68);
  font-style: normal;
  font-size: 13px;
}

.page-hero {
  color: #fff;
  padding: 96px 0 84px;
  background:
    radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.28), transparent 30%),
    linear-gradient(135deg, var(--cyan), var(--blue), var(--teal));
}

.page-hero span {
  color: #cffafe;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.page-hero h1 {
  margin: 8px 0 14px;
  font-size: clamp(38px, 7vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.filter-panel {
  padding-top: 36px;
}

.inline-filter {
  margin-bottom: 24px;
  padding: 18px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
}

.sticky-filter {
  position: sticky;
  top: 92px;
  z-index: 5;
}

.inline-filter input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: 0;
  padding: 14px 16px;
  background: #f8fafc;
}

.filter-chips {
  margin-top: 14px;
}

.filter-chips button {
  border: 0;
  border-radius: 999px;
  color: #075985;
  padding: 9px 13px;
  background: #ecfeff;
  cursor: pointer;
}

.filter-chips button.is-active {
  color: #fff;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

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

.rank-row {
  display: grid;
  grid-template-columns: 74px 96px 1fr;
  gap: 20px;
  align-items: center;
  padding: 16px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.rank-cover img {
  width: 96px;
  height: 124px;
  border-radius: 16px;
  object-fit: cover;
  background: linear-gradient(135deg, #0891b2, #2563eb);
}

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
}

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

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.32;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(14px) saturate(1.1);
  transform: scale(1.08);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 20%, rgba(34, 211, 238, 0.22), transparent 28%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.72));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 38px 0 64px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.76);
}

.breadcrumb a:hover {
  color: #a5f3fc;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  align-items: end;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, #0891b2, #2563eb);
}

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.lead {
  max-width: 850px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.detail-tags {
  margin-bottom: 24px;
}

.watch-section {
  padding: 42px 0 0;
}

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

.player-shell video {
  width: 100%;
  height: 100%;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.68));
  cursor: pointer;
}

.play-overlay span {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: 50%;
  color: #075985;
  font-size: 34px;
  background: #fff;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.28);
}

.player-shell.is-playing .play-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 26px;
  padding: 42px 0 12px;
}

.detail-content article,
.side-card {
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.detail-content article {
  padding: 30px;
}

.detail-content h2 {
  margin: 0 0 14px;
  font-size: 27px;
}

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

.side-card {
  align-self: start;
  padding: 24px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px 14px;
  margin: 0;
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  margin: 0;
  font-weight: 800;
}

.site-footer {
  color: rgba(255, 255, 255, 0.82);
  background: #0f172a;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px 0;
}

[data-card].is-hidden {
  display: none;
}

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

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

@media (max-width: 860px) {
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

  .main-nav {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 86px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 22px;
    background: linear-gradient(135deg, var(--cyan), var(--blue), var(--teal));
    box-shadow: var(--shadow);
  }

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

  .nav-link {
    padding: 14px 16px;
  }

  .hero-carousel {
    min-height: 680px;
  }

  .hero-content {
    padding-top: 92px;
  }

  .quick-panel {
    grid-template-columns: 1fr;
  }

  .quick-links {
    flex-wrap: wrap;
  }

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

  .rank-row,
  .detail-layout,
  .detail-content {
    grid-template-columns: 1fr;
  }

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

  .sticky-filter {
    top: 90px;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

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

  .brand em {
    display: none;
  }

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

  .hero-actions,
  .quick-links {
    flex-direction: column;
  }

  .btn,
  .quick-links a {
    width: 100%;
  }

  .movie-grid,
  .featured-grid,
  .category-grid,
  .ranking-strip {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 56px 80px 1fr;
    gap: 12px;
  }

  .rank-cover img {
    width: 80px;
    height: 104px;
  }

  .rank-info h2 {
    font-size: 18px;
  }

  .rank-info p {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
  }
}
