:root {
  --color-bg: #f8fafc;
  --color-panel: #ffffff;
  --color-text: #1f2937;
  --color-muted: #64748b;
  --color-line: #e2e8f0;
  --color-teal: #0f766e;
  --color-cyan: #0891b2;
  --color-yellow: #fde047;
  --color-red: #ef4444;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.10);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

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

.nav-shell {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 68px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 25px;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--color-teal), var(--color-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  font-size: 15px;
  background: linear-gradient(135deg, var(--color-teal), var(--color-cyan));
  box-shadow: 0 10px 25px rgba(8, 145, 178, 0.28);
}

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

.nav-link,
.nav-menu a,
.nav-toggle {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #334155;
  padding: 10px 15px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.nav-menu a:hover,
.nav-toggle:hover {
  color: var(--color-teal);
  background: #ecfeff;
}

.nav-toggle {
  display: none;
}

.nav-dropdown {
  position: relative;
}

.nav-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 180px;
  padding: 10px;
  display: grid;
  gap: 4px;
  background: #ffffff;
  border: 1px solid var(--color-line);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown:hover .nav-menu,
.nav-dropdown:focus-within .nav-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-menu a {
  display: block;
  border-radius: 12px;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 55% 30%, rgba(255, 255, 255, 0.22), transparent 34%),
    linear-gradient(135deg, #0f766e 0%, #0891b2 56%, #0e7490 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(253, 224, 71, 0.26), transparent 26%);
  opacity: 0.9;
}

.hero-shell {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  min-height: 610px;
  padding: 72px 20px 84px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(310px, 0.95fr);
  gap: 52px;
  align-items: center;
}

.hero-copy {
  display: grid;
  gap: 24px;
}

.eyebrow {
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  color: #ecfeff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 70px);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero h1 span {
  color: var(--color-yellow);
}

.hero-copy p {
  max-width: 680px;
  margin: 0;
  color: #e0f2fe;
  font-size: 20px;
}

.hero-actions,
.detail-actions,
.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

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

.btn-primary {
  color: var(--color-teal);
  background: #ffffff;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.20);
}

.btn-primary:hover {
  background: var(--color-yellow);
}

.btn-ghost {
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.84);
}

.btn-ghost:hover {
  color: var(--color-teal);
  background: #ffffff;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(18px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.34);
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -5px;
  z-index: -1;
  background: linear-gradient(135deg, #fde047, #ec4899, #22d3ee);
  filter: blur(18px);
  opacity: 0.72;
}

.hero-card img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  background: #0f172a;
}

.hero-card-info {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.12), transparent);
}

.hero-card-info h2 {
  margin: 0 0 8px;
  font-size: 29px;
  line-height: 1.2;
}

.hero-card-info p {
  margin: 0 0 14px;
  color: #e2e8f0;
}

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

.hero-tags span,
.tag-row span,
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #ccfbf1;
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 9px;
}

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

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

.hero-dot.is-active {
  width: 28px;
  background: #ffffff;
}

.main-shell,
.content-section,
.detail-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 20px;
}

.content-section + .content-section {
  padding-top: 18px;
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.section-heading p {
  max-width: 560px;
  margin: 8px 0 0;
  color: var(--color-muted);
}

.category-strip {
  margin-top: 12px;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  color: #0f766e;
  background: #ecfeff;
  border: 1px solid #bae6fd;
  font-weight: 900;
}

.category-pill:hover {
  background: #ccfbf1;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.72), transparent 58%);
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-link::after {
  opacity: 1;
}

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--color-red);
  font-size: 12px;
  font-weight: 900;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #0f766e;
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: translate(-50%, -45%) scale(0.9);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

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

.movie-card h3 {
  min-height: 52px;
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.38;
}

.movie-card h3 a:hover {
  color: var(--color-teal);
}

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

.catalog-tools {
  margin: 0 0 24px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 14px;
  border: 1px solid var(--color-line);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.catalog-tools label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-weight: 900;
}

.catalog-search,
.catalog-filter {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--color-line);
  border-radius: 14px;
  padding: 0 14px;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
}

.catalog-search:focus,
.catalog-filter:focus {
  border-color: #22d3ee;
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.16);
}

.catalog-empty {
  display: none;
  margin: 20px 0 0;
  padding: 18px;
  border-radius: 16px;
  color: var(--color-muted);
  background: #ffffff;
}

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

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

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 24px;
  border-radius: 26px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #0891b2);
  box-shadow: var(--shadow-card);
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #7c3aed, #0ea5e9);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 27px;
}

.category-card p {
  margin: 0;
  color: #e0f2fe;
}

.category-card strong {
  position: absolute;
  right: 22px;
  bottom: 18px;
  font-size: 38px;
  opacity: 0.22;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 70px 90px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #f59e0b);
  font-size: 18px;
  font-weight: 900;
}

.rank-row img {
  width: 90px;
  height: 120px;
  border-radius: 14px;
  object-fit: cover;
  background: #0f172a;
}

.rank-row h2,
.rank-row h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.rank-row p {
  margin: 0;
  color: var(--color-muted);
}

.rank-link {
  color: #0f766e;
  font-weight: 900;
}

.player-hero {
  color: #ffffff;
  background:
    radial-gradient(circle at 85% 15%, rgba(253, 224, 71, 0.2), transparent 24%),
    linear-gradient(135deg, #0f172a, #0f766e 58%, #0891b2);
}

.player-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 20px 58px;
}

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

.breadcrumb a:hover {
  color: var(--color-yellow);
}

.player-title h1 {
  max-width: 880px;
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.player-title p {
  max-width: 860px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: 18px;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 30px 70px rgba(2, 6, 23, 0.42);
}

.player-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.56), rgba(8, 145, 178, 0.28));
  cursor: pointer;
}

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

.player-button {
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 999px;
  color: #0f766e;
  background: rgba(255, 255, 255, 0.94);
  font-size: 36px;
  cursor: pointer;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.34);
  transition: transform 0.2s ease, background 0.2s ease;
}

.player-button:hover {
  transform: scale(1.06);
  background: var(--color-yellow);
}

.detail-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: #0f172a;
  box-shadow: var(--shadow-card);
}

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

.detail-panel {
  padding: 28px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

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

.detail-panel p {
  color: #475569;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 20px;
}

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

.mini-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.mini-card:hover strong {
  color: var(--color-teal);
}

.mini-card img {
  width: 74px;
  height: 98px;
  border-radius: 12px;
  object-fit: cover;
  background: #0f172a;
}

.mini-card strong,
.mini-card em {
  display: block;
}

.mini-card strong {
  color: #0f172a;
  line-height: 1.36;
}

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

.site-footer {
  margin-top: 36px;
  border-top: 1px solid var(--color-line);
  background: #ffffff;
}

.footer-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-shell p {
  margin: 0;
  color: var(--color-muted);
}

@media (max-width: 980px) {
  .hero-shell,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    min-height: 460px;
  }

  .hero-card img {
    height: 460px;
  }

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

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

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--color-line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-card);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-dropdown {
    display: none;
  }

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

  .hero-copy p {
    font-size: 17px;
  }

  .hero-stage {
    min-height: 390px;
  }

  .hero-card img {
    height: 390px;
  }

  .section-heading,
  .footer-shell {
    align-items: flex-start;
    flex-direction: column;
  }

  .catalog-tools {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .related-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .rank-row {
    grid-template-columns: 48px 70px minmax(0, 1fr);
  }

  .rank-row img {
    width: 70px;
    height: 94px;
  }

  .rank-link {
    grid-column: 2 / -1;
  }
}

@media (max-width: 520px) {
  .nav-shell {
    min-height: 64px;
  }

  .brand {
    font-size: 21px;
  }

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

  .hero-stage {
    min-height: 340px;
  }

  .hero-card img {
    height: 340px;
  }

  .hero-card-info {
    padding: 20px;
  }

  .hero-card-info h2 {
    font-size: 23px;
  }

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

  .movie-card p {
    min-height: auto;
  }

  .detail-panel {
    padding: 22px;
  }
}
