:root {
  --cyan: #06b6d4;
  --blue: #2563eb;
  --teal: #14b8a6;
  --purple: #7c3aed;
  --dark: #0f172a;
  --muted: #64748b;
  --light: #f8fafc;
  --card: #ffffff;
  --line: rgba(15, 23, 42, 0.08);
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.96), rgba(37, 99, 235, 0.96), rgba(20, 184, 166, 0.96));
  color: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(16px);
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.28);
}

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

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

.brand-text small {
  margin-top: 4px;
  font-size: 12px;
  opacity: 0.88;
}

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

.nav-link {
  padding: 10px 13px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

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

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.25);
  overflow: hidden;
}

.header-search input,
.mobile-search input {
  width: 210px;
  padding: 10px 12px 10px 16px;
  color: #ffffff;
  background: transparent;
  border: 0;
  outline: 0;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.76);
}

.header-search button,
.mobile-search button {
  align-self: stretch;
  padding: 0 16px;
  color: #0f5fba;
  background: #ffffff;
  border: 0;
  font-weight: 800;
  cursor: pointer;
}

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

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
}

.mobile-panel.open {
  display: grid;
  gap: 10px;
}

.mobile-panel a {
  display: block;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 590px;
  overflow: hidden;
  background: var(--dark);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  filter: saturate(1.05);
}

.hero-overlay,
.detail-mask {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 26%, rgba(14, 165, 233, 0.5), transparent 26%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.66), rgba(15, 23, 42, 0.32)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.98), transparent 60%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: center;
  gap: 56px;
  color: #ffffff;
}

.hero-copy {
  max-width: 720px;
  padding-top: 40px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  color: #cffafe;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 18px 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p,
.lead-text {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
}

.hero-actions,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.primary-btn,
.ghost-btn,
.panel-more,
.big-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.big-search button,
.panel-more {
  color: #ffffff;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.32);
}

.primary-btn:hover,
.big-search button:hover,
.panel-more:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 40px 100px rgba(2, 6, 23, 0.55);
  transform: rotate(2deg);
}

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

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

.hero-controls > button,
.hero-dots button {
  border: 0;
  cursor: pointer;
}

.hero-controls > button {
  width: 46px;
  height: 46px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  font-size: 30px;
}

.hero-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.36);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  background: rgba(255, 255, 255, 0.42);
  border-radius: 50%;
}

.hero-dots button.active {
  width: 28px;
  background: #ffffff;
  border-radius: 999px;
}

.search-band {
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.search-band-inner {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 520px);
  align-items: center;
  gap: 28px;
  padding: 32px 0;
}

.search-band h2,
.panel-title h2,
.info-panel h2,
.content-panel h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 900;
}

.search-band p {
  margin: 4px 0 0;
  color: var(--muted);
}

.big-search,
.local-filter {
  display: flex;
  align-items: center;
  padding: 6px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

.big-search input,
.local-filter input {
  flex: 1;
  min-width: 0;
  padding: 12px 18px;
  border: 0;
  outline: 0;
  background: transparent;
}

.section {
  padding: 72px 0;
}

.bright-section {
  background: linear-gradient(180deg, #f8fafc, #ffffff);
}

.category-section,
.recommend-section {
  color: #ffffff;
  background:
    radial-gradient(circle at 18% 18%, rgba(20, 184, 166, 0.4), transparent 26%),
    linear-gradient(135deg, #0f172a, #0e7490 58%, #155e75);
}

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

.section-title span,
.panel-title span {
  color: var(--cyan);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-title h2 {
  margin: 4px 0 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.15;
}

.section-title a {
  color: var(--blue);
  font-weight: 900;
}

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

.light-title h2 {
  color: #ffffff;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #155e75);
}

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

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

.play-dot,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
}

.play-dot {
  right: 16px;
  bottom: 16px;
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border-radius: 50%;
}

.rank-badge {
  top: 14px;
  left: 14px;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border-radius: 14px;
  font-weight: 900;
}

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

.movie-title {
  display: block;
  color: #0f172a;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 900;
}

.movie-title:hover {
  color: var(--blue);
}

.movie-meta {
  margin: 8px 0;
  color: var(--muted);
  font-size: 14px;
}

.movie-desc {
  min-height: 48px;
  margin: 0;
  color: #334155;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-row span {
  padding: 5px 9px;
  color: #0e7490;
  background: #ecfeff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.large-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

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

.category-card {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  color: #ffffff;
  background: #0f172a;
  border-radius: var(--radius);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.2);
  isolation: isolate;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.32);
}

.category-card img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.92));
}

.category-glow {
  position: absolute;
  inset: auto 20px 20px auto;
  width: 92px;
  height: 92px;
  background: rgba(34, 211, 238, 0.4);
  border-radius: 50%;
  filter: blur(24px);
}

.category-card strong {
  font-size: 24px;
  font-weight: 900;
}

.category-card small {
  margin: 8px 0 12px;
  color: rgba(255, 255, 255, 0.82);
}

.category-card em {
  font-style: normal;
  color: #a5f3fc;
  font-weight: 900;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
  align-items: start;
}

.ranking-panel,
.info-panel,
.content-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 20px 54px rgba(15, 23, 42, 0.1);
}

.ranking-panel {
  position: sticky;
  top: 100px;
  padding: 24px;
}

.panel-title {
  margin-bottom: 14px;
}

.rank-line {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.rank-line b {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  border-radius: 12px;
}

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

.rank-line small {
  color: var(--muted);
}

.panel-more {
  width: 100%;
  margin-top: 18px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 75% 18%, rgba(20, 184, 166, 0.5), transparent 28%),
    linear-gradient(135deg, #0f172a, #155e75 58%, #2563eb);
}

.page-hero .container {
  padding: 82px 0;
}

.small-hero .container {
  padding: 74px 0;
}

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

.local-filter {
  max-width: 660px;
  margin-top: 26px;
  background: rgba(255, 255, 255, 0.96);
}

.local-filter input {
  color: #0f172a;
}

.detail-hero {
  min-height: 560px;
}

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(2px) saturate(1.1);
  transform: scale(1.04);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 42px;
  color: rgba(255, 255, 255, 0.78);
}

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

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

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 34px 100px rgba(2, 6, 23, 0.54);
}

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

.detail-copy h1 {
  max-width: 820px;
}

.detail-section {
  padding-top: 54px;
}

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

.content-panel {
  padding: 24px;
}

.content-panel h2 {
  margin: 28px 0 10px;
}

.content-panel p {
  color: #334155;
  font-size: 17px;
}

.movie-player {
  position: relative;
  overflow: hidden;
  background: #020617;
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.25);
}

.video-element {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  object-fit: cover;
}

.player-shield {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.68));
  border: 0;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.big-play {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  font-size: 34px;
  box-shadow: 0 22px 54px rgba(2, 6, 23, 0.34);
}

.player-shield strong {
  max-width: 86%;
  text-align: center;
  font-size: 24px;
}

.info-panel {
  position: sticky;
  top: 100px;
  padding: 24px;
}

.info-panel ul {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.info-panel li {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.info-panel span {
  color: var(--muted);
}

.info-panel strong {
  text-align: right;
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 42px;
  padding: 52px 0;
}

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

.site-footer p {
  max-width: 520px;
  color: #94a3b8;
}

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

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

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

.footer-bottom {
  padding: 18px 0;
  text-align: center;
  color: #94a3b8;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

[data-filter-grid] .movie-card.hidden-card {
  display: none;
}

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

  .header-search {
    margin-left: auto;
  }

  .menu-toggle {
    display: block;
  }

  .hero-content,
  .detail-layout,
  .detail-main-grid,
  .split-layout,
  .search-band-inner {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

  .ranking-panel,
  .info-panel {
    position: static;
  }

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

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

  .header-inner {
    min-height: 68px;
    gap: 12px;
  }

  .brand-text small,
  .header-search {
    display: none;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

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

  .hero {
    min-height: 520px;
  }

  .hero-content {
    gap: 0;
  }

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 38px;
  }

  .hero p,
  .page-hero p,
  .lead-text {
    font-size: 16px;
  }

  .hero-controls {
    bottom: 18px;
  }

  .section {
    padding: 46px 0;
  }

  .section-title {
    display: block;
  }

  .three-col,
  .two-col,
  .category-grid,
  .wide-category-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .content-panel,
  .info-panel,
  .ranking-panel {
    padding: 18px;
  }

  .footer-grid {
    gap: 24px;
  }
}
