:root {
  --sky: #0284c7;
  --sky-dark: #0369a1;
  --blue: #1d4ed8;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --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;
  color: var(--slate-900);
  background: linear-gradient(180deg, var(--slate-50), #ffffff);
  line-height: 1.65;
}

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: 60;
  color: var(--white);
  background: linear-gradient(90deg, var(--sky), var(--blue));
  box-shadow: 0 18px 32px rgba(2, 132, 199, 0.22);
}

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

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

.brand-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  color: var(--sky);
  background: var(--white);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.18);
}

.brand-copy {
  display: grid;
  line-height: 1.15;
}

.brand-copy strong {
  font-size: 20px;
  letter-spacing: 0.03em;
}

.brand-copy small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

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

.nav-link {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--white);
  transform: translateY(-1px);
}

.header-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.header-search input,
.mobile-panel input,
.search-panel input,
.inline-filter input {
  min-width: 0;
  border: 0;
  color: inherit;
  outline: 0;
  background: transparent;
}

.header-search input {
  width: 210px;
  padding: 10px 14px;
  color: var(--white);
}

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

.header-search button,
.mobile-panel button,
.search-panel button {
  border: 0;
  padding: 10px 17px;
  color: var(--sky-dark);
  background: var(--white);
  cursor: pointer;
  font-weight: 800;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 14px 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.mobile-panel.open {
  display: block;
}

.mobile-panel form {
  display: flex;
  margin-bottom: 14px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.mobile-panel input {
  flex: 1;
  padding: 12px 14px;
  color: var(--white);
}

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

.mobile-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.hero,
.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(120deg, var(--sky), #2563eb 52%, #1e40af);
}

.hero {
  min-height: 650px;
  display: flex;
  align-items: center;
}

.hero-glow {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.17);
  filter: blur(28px);
}

.hero-glow-one {
  top: 30px;
  left: 3%;
}

.hero-glow-two {
  right: -70px;
  bottom: -80px;
}

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

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.08fr) minmax(310px, 0.72fr);
  align-items: center;
  gap: 48px;
}

.hero-slide.active {
  display: grid;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 12px 0 10px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.hero-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(26px, 3vw, 42px);
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 19px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--sky-dark);
}

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

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

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

.button.primary {
  color: var(--sky-dark);
  background: var(--white);
  box-shadow: 0 16px 26px rgba(15, 23, 42, 0.16);
}

.button.ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 32px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.35);
  background: rgba(255, 255, 255, 0.08);
}

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

.hero-poster:hover img {
  transform: scale(1.04);
}

.hero-poster span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  max-width: calc(100% - 36px);
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(2, 132, 199, 0.82);
  backdrop-filter: blur(8px);
  font-weight: 750;
}

.hero-dots {
  display: flex;
  gap: 10px;
  margin-top: 34px;
}

.hero-dot {
  width: 36px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dot.active {
  background: var(--white);
}

.section {
  padding: 70px 0;
}

.soft-section {
  background: linear-gradient(90deg, #f8fafc, #eff6ff);
}

.sky-section {
  color: var(--white);
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

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

.section-heading h2 {
  margin: 4px 0 0;
  color: var(--slate-900);
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

.section-heading.light h2 {
  color: var(--white);
}

.section-link {
  color: var(--sky-dark);
  font-weight: 850;
}

.section-link.light {
  color: var(--white);
}

.featured-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.92fr) minmax(0, 1.08fr);
  gap: 24px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--soft-shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.card-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
}

.movie-card-large .card-poster {
  aspect-ratio: 16 / 11;
}

.card-poster img,
.compact-cover img,
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-poster img {
  transition: transform 0.36s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(2, 6, 23, 0.68));
}

.play-chip {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: rgba(14, 165, 233, 0.92);
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.32);
}

.year-chip,
.rank-badge {
  position: absolute;
  top: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(6px);
  font-size: 12px;
  font-weight: 800;
}

.year-chip {
  right: 12px;
}

.rank-badge {
  left: 12px;
  background: rgba(2, 132, 199, 0.92);
}

.card-body {
  padding: 17px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--slate-500);
  font-size: 13px;
  font-weight: 750;
}

.card-meta a {
  color: var(--sky-dark);
}

.card-body h3 {
  display: -webkit-box;
  min-height: 54px;
  margin: 8px 0 8px;
  overflow: hidden;
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-body p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--slate-600);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row span {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--sky-dark);
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 750;
}

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

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

.category-tile {
  min-height: 190px;
  padding: 22px;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: #7dd3fc;
}

.category-title {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--sky-dark);
  font-size: 22px;
  font-weight: 900;
}

.category-tile p {
  margin: 0 0 16px;
  color: var(--slate-600);
}

.category-sample {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.category-sample a {
  color: var(--slate-700);
}

.category-sample a:hover {
  color: var(--sky-dark);
}

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

.large-list {
  grid-template-columns: 1fr;
}

.compact-item {
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.compact-cover {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px;
  background: #e0f2fe;
}

.compact-rank {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--sky), var(--blue));
  font-weight: 900;
}

.compact-item h3 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.35;
}

.compact-item p {
  margin: 0 0 6px;
  color: var(--slate-600);
}

.compact-item span:not(.compact-rank) {
  color: var(--slate-500);
  font-size: 13px;
}

.page-hero {
  padding: 74px 0 66px;
}

.page-hero h1,
.detail-main h1 {
  max-width: 880px;
  margin: 10px 0 14px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.12;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.inline-filter,
.search-panel {
  display: flex;
  width: min(650px, 100%);
  margin-top: 26px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.inline-filter input,
.search-panel input {
  flex: 1;
  padding: 16px 20px;
  color: var(--slate-900);
}

.search-panel button {
  padding: 0 26px;
  color: var(--white);
  background: var(--sky-dark);
}

.empty-state {
  padding: 24px;
  border-radius: 18px;
  color: var(--slate-600);
  background: var(--slate-100);
}

.detail-hero {
  padding: 44px 0 62px;
  background: var(--slate-950);
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-size: cover;
  background-position: center;
  filter: blur(12px) saturate(1.2);
  transform: scale(1.06);
}

.detail-shell {
  position: relative;
  z-index: 1;
}

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

.detail-cover {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.34);
}

.detail-line {
  max-width: 780px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 20px;
}

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

.player-section {
  padding-bottom: 30px;
}

.player-panel {
  overflow: hidden;
  border-radius: 30px;
  background: var(--slate-950);
  box-shadow: var(--shadow);
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.video-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 24px;
  color: var(--white);
  text-align: center;
  background: radial-gradient(circle at center, rgba(14, 165, 233, 0.18), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

.player-overlay.is-hidden {
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.24s ease;
}

.play-button {
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--sky), var(--blue));
  box-shadow: 0 18px 36px rgba(14, 165, 233, 0.34);
  cursor: pointer;
  font-size: 34px;
}

.player-overlay strong {
  max-width: 760px;
  font-size: clamp(22px, 3vw, 34px);
}

.player-state {
  position: absolute;
  left: 50%;
  top: 50%;
  margin: 0;
  transform: translate(-50%, -50%);
  color: var(--white);
  font-weight: 800;
}

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

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: start;
}

.content-card {
  padding: 28px;
  border-radius: 26px;
  background: var(--white);
  box-shadow: var(--soft-shadow);
}

.content-card h2 {
  margin: 0 0 16px;
  color: var(--slate-900);
  font-size: 28px;
}

.content-card p {
  margin: 0 0 14px;
  color: var(--slate-700);
  font-size: 17px;
}

.review-card {
  margin-top: 24px;
}

.meta-table {
  display: grid;
  gap: 12px;
  margin: 0;
}

.meta-table div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--slate-200);
}

.meta-table dt {
  color: var(--slate-500);
  font-weight: 800;
}

.meta-table dd {
  margin: 0;
  color: var(--slate-900);
}

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

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

  .featured-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }
}

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

  .mobile-toggle {
    display: inline-flex;
  }

  .brand-copy small {
    display: none;
  }

  .hero {
    min-height: auto;
  }

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

  .hero-poster {
    min-height: 300px;
  }

  .hero-poster img {
    min-height: 300px;
  }

  .movie-grid,
  .compact-grid,
  .category-movie-grid,
  .ranking-list,
  .category-grid,
  .category-grid.wide {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .hero-shell,
  .section,
  .page-hero,
  .detail-hero {
    padding-top: 44px;
    padding-bottom: 44px;
  }

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

  .button {
    width: 100%;
  }

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

  .card-body h3 {
    min-height: auto;
  }

  .play-button {
    width: 68px;
    height: 68px;
  }

  .content-card {
    padding: 22px;
  }
}
