:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: rgba(15, 23, 42, 0.1);
  --teal: #0d9488;
  --cyan: #06b6d4;
  --blue: #2563eb;
  --indigo: #4f46e5;
  --rose: #f43f5e;
  --amber: #f59e0b;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(20, 184, 166, 0.12), transparent 32rem),
    radial-gradient(circle at 80% 8%, rgba(37, 99, 235, 0.12), transparent 30rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.header-inner {
  width: min(1240px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.site-logo-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  box-shadow: 0 12px 28px rgba(13, 148, 136, 0.24);
}

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

.desktop-nav a,
.mobile-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: #334155;
  font-weight: 700;
  transition: 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a.is-active {
  color: var(--teal);
  background: rgba(13, 148, 136, 0.1);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  color: var(--text);
  background: var(--surface-soft);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.mobile-nav.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.container {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.main-shell {
  padding: 36px 0 64px;
}

.hero-section {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

.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-backdrop {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.68), rgba(15, 23, 42, 0.28)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.05) 42%, rgba(2, 6, 23, 0.84)),
    var(--hero-image);
  background-position: center;
  background-size: cover;
  transform: scale(1.05);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image:
    radial-gradient(circle at 18px 18px, rgba(255, 255, 255, 0.32) 2px, transparent 0),
    radial-gradient(circle at 78px 54px, rgba(255, 255, 255, 0.14) 2px, transparent 0);
  background-size: 110px 90px;
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 420px);
  align-items: center;
  gap: 60px;
  padding: 100px 0 72px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #ccfbf1;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 800;
}

.hero-title {
  max-width: 820px;
  margin: 22px 0 16px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.08em;
  font-weight: 950;
}

.hero-desc {
  max-width: 760px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 21px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 30px;
}

.meta-pill,
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 14px;
  font-weight: 800;
}

.hero-actions,
.section-actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  color: #0f172a;
  background: #ffffff;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(2, 6, 23, 0.12);
  cursor: pointer;
  transition: 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.2);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), #ec4899);
}

.btn-accent {
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
}

.btn-soft {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
}

.hero-poster-card {
  position: relative;
  isolation: isolate;
  max-width: 420px;
  margin-left: auto;
}

.hero-poster-card::before {
  content: "";
  position: absolute;
  inset: 12% -10% -10% 10%;
  z-index: -1;
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.55), rgba(37, 99, 235, 0.42));
  filter: blur(12px);
}

.hero-poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 30px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.44);
}

.hero-search {
  width: min(720px, 100%);
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(14px);
}

.hero-search input,
.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 46px;
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 0 18px;
  color: var(--text);
  background: #ffffff;
}

.hero-search button,
.search-panel button {
  min-height: 46px;
  border-radius: 999px;
  padding: 0 20px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  font-weight: 900;
  cursor: pointer;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
}

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

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

.section {
  padding: 56px 0 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-lead {
  max-width: 760px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 16px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(240, 253, 250, 0.86)),
    var(--surface);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  transition: 0.2s ease;
}

.category-card::after {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -34px;
  top: -34px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.18), rgba(37, 99, 235, 0.16));
}

.category-card:hover,
.movie-card:hover,
.rank-item:hover,
.related-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-card h2,
.category-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 950;
}

.category-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--muted);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: 0.2s ease;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #e0f2fe, #ccfbf1);
}

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

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

.card-badge,
.card-rating,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.card-badge {
  left: 12px;
  background: rgba(13, 148, 136, 0.9);
}

.card-rating {
  right: 12px;
  background: rgba(244, 63, 94, 0.92);
}

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

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 950;
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.card-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: 0.2s ease;
}

.rank-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
}

.rank-thumb img {
  width: 96px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.rank-number {
  position: absolute;
  left: 8px;
  top: 8px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), var(--amber));
  font-weight: 950;
}

.rank-item h3 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 950;
}

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

.page-hero {
  padding: 64px 0 32px;
}

.page-panel {
  overflow: hidden;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 32px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 118, 110, 0.78)),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.44), transparent 28rem);
  box-shadow: var(--shadow);
}

.page-panel h1 {
  margin: 12px 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.06em;
  font-weight: 950;
}

.page-panel p {
  max-width: 850px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 180px 180px auto;
  gap: 12px;
  margin: 28px 0 0;
  padding: 12px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.14);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.filter-chip {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  color: #0f172a;
  background: #ffffff;
  font-weight: 900;
  cursor: pointer;
}

.filter-chip.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--blue));
}

.hidden-by-filter {
  display: none !important;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 800;
}

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

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.28);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #ffffff;
  background: #020617;
  cursor: pointer;
}

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

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  filter: saturate(1.12) contrast(1.08);
}

.play-button {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 0 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--rose), #ec4899);
  color: #ffffff;
  font-size: 18px;
  font-weight: 950;
  box-shadow: 0 18px 42px rgba(244, 63, 94, 0.34);
}

.play-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--rose);
  background: #ffffff;
}

.detail-card,
.content-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.05em;
  font-weight: 950;
}

.detail-intro {
  margin: 0 0 20px;
  color: #334155;
  font-size: 18px;
  font-weight: 700;
}

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

.stat-box {
  padding: 14px;
  border-radius: 18px;
  background: var(--surface-soft);
}

.stat-box strong {
  display: block;
  font-size: 20px;
  font-weight: 950;
}

.stat-box span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.detail-tag {
  padding: 6px 11px;
  border-radius: 999px;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 13px;
  font-weight: 900;
}

.content-stack {
  display: grid;
  gap: 24px;
  margin-top: 28px;
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
  font-weight: 950;
}

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

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

.related-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #ffffff;
  transition: 0.2s ease;
}

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

.related-card div {
  padding: 12px;
}

.related-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 950;
}

.related-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 28px;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 12px;
  color: #ffffff;
  font-weight: 950;
}

.site-footer p {
  margin: 0;
  color: #cbd5e1;
}

.footer-links {
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 14px;
}

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

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

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

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

  .nav-toggle {
    display: block;
  }

  .hero-section,
  .hero-inner {
    min-height: auto;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 76px 0 86px;
  }

  .hero-poster-card {
    width: min(280px, 78vw);
    margin: 0;
  }

  .hero-search,
  .search-panel {
    grid-template-columns: 1fr;
    border-radius: 24px;
  }

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

@media (max-width: 640px) {
  .header-inner,
  .container,
  .hero-inner,
  .mobile-nav {
    width: min(100% - 24px, 1240px);
  }

  .site-logo {
    font-size: 18px;
  }

  .site-logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 13px;
  }

  .mobile-nav.is-open {
    grid-template-columns: 1fr;
  }

  .section-header {
    display: block;
  }

  .section-actions {
    margin-top: 16px;
  }

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

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

  .page-panel,
  .detail-card,
  .content-card {
    padding: 22px;
    border-radius: 24px;
  }

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

  .rank-item {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .rank-thumb img {
    width: 82px;
  }
}
