:root {
  --blue: #2563eb;
  --blue-deep: #1d4ed8;
  --cyan: #0891b2;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --white: #ffffff;
  --gold: #facc15;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
}

* {
  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-800);
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 36%, #ffffff 100%);
  min-height: 100vh;
}

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

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

button,
input {
  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.78);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.brand-name {
  font-size: 21px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav,
.mobile-nav,
.footer-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.desktop-nav a,
.mobile-nav a {
  padding: 9px 13px;
  color: var(--slate-700);
  border-radius: 12px;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--blue);
  background: #dbeafe;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  border: 0;
  background: var(--slate-100);
  color: var(--slate-700);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
}

.mobile-nav {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 14px;
  flex-direction: column;
  align-items: stretch;
}

main {
  overflow: hidden;
}

.hero-carousel {
  position: relative;
  height: min(680px, calc(100vh - 74px));
  min-height: 520px;
  background: var(--slate-950);
  overflow: hidden;
}

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

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

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

.hero-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  filter: saturate(1.08) contrast(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.68) 42%, rgba(15, 23, 42, 0.18) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.88) 0%, rgba(2, 6, 23, 0.12) 42%, rgba(2, 6, 23, 0.28) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 64px 24px 84px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: white;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: 7px 12px;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.22);
  border: 1px solid rgba(147, 197, 253, 0.28);
  font-size: 13px;
  font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
  max-width: 840px;
  margin: 18px 0 12px;
  font-size: clamp(34px, 5.5vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero-movie-title {
  max-width: 820px;
  margin: -4px 0 16px;
  font-size: clamp(22px, 3vw, 38px);
  font-weight: 800;
  color: #dbeafe;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 18px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

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

.primary-btn,
.search-form button {
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 36px rgba(37, 99, 235, 0.28);
}

.ghost-btn {
  color: white;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(8px);
}

.primary-btn:hover,
.ghost-btn:hover,
.search-form button:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: white;
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
  backdrop-filter: blur(10px);
  font-size: 34px;
}

.hero-control.prev {
  left: 22px;
}

.hero-control.next {
  right: 22px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 34px;
  background: white;
}

.search-band,
.content-section,
.page-shell,
.detail-page {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.search-band {
  transform: translateY(-34px);
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 24px;
  align-items: center;
  padding-top: 24px;
  padding-bottom: 24px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-band h2,
.section-heading h2,
.rank-panel h2,
.detail-content h2 {
  margin: 0;
  color: var(--slate-800);
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.search-band p,
.section-heading p,
.rank-panel p,
.page-hero p,
.category-tile p,
.category-overview-card p,
.detail-content p {
  color: var(--slate-600);
  line-height: 1.75;
}

.search-form {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
}

.search-form input,
.inline-filter input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--slate-800);
  background: transparent;
  padding: 0 14px;
  min-height: 44px;
}

.content-section {
  padding-top: 34px;
  padding-bottom: 34px;
}

.white-panel,
.rank-panel {
  margin-top: 30px;
  margin-bottom: 30px;
  padding-top: 34px;
  padding-bottom: 34px;
  border-radius: var(--radius);
  background: white;
  box-shadow: 0 18px 60px rgba(15, 23, 42, 0.08);
}

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

.section-heading p {
  margin: 8px 0 0;
}

.section-more {
  color: var(--blue);
  font-weight: 800;
}

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

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

.popular-grid,
.dense-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.movie-card {
  min-width: 0;
}

.movie-card a {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 20px;
  background: white;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card a:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.14);
}

.movie-card figure {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--slate-900), var(--blue));
}

.movie-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.corner-badge,
.score-badge {
  position: absolute;
  top: 12px;
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
}

.corner-badge {
  left: 12px;
}

.score-badge {
  right: 12px;
  color: var(--slate-950);
  background: var(--gold);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.25;
  color: var(--slate-800);
}

.card-body p {
  margin: 0 0 12px;
  color: var(--slate-600);
  font-size: 14px;
  line-height: 1.65;
}

.card-body .card-meta span {
  color: var(--slate-600);
  background: var(--slate-100);
}

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

.tag-row span,
.tag-cloud a {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--blue-deep);
  background: #dbeafe;
  font-size: 12px;
  font-weight: 700;
}

.compact .card-body h3 {
  font-size: 16px;
}

.compact .card-body p {
  font-size: 13px;
}

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

.category-tile,
.category-overview-card a {
  display: block;
  min-height: 210px;
  padding: 20px;
  overflow: hidden;
  border-radius: 22px;
  color: white;
  background: linear-gradient(135deg, var(--slate-900), var(--blue));
  box-shadow: 0 18px 48px rgba(37, 99, 235, 0.18);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.category-tile:hover,
.category-overview-card a:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 60px rgba(37, 99, 235, 0.24);
}

.category-tile span,
.category-overview-card h2 {
  font-size: 22px;
  font-weight: 900;
}

.category-tile p,
.category-overview-card p {
  color: #dbeafe;
  font-size: 14px;
}

.tile-posters,
.poster-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 18px;
}

.poster-strip {
  grid-template-columns: repeat(6, 1fr);
  margin: 0 0 18px;
}

.tile-posters img,
.poster-strip img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.rank-panel {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 28px;
  align-items: start;
}

.rank-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.rank-list a {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: var(--slate-100);
}

.rank-list span,
.rank-num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-weight: 900;
}

.rank-list em,
.ranking-row em {
  color: var(--gold);
  font-style: normal;
  font-weight: 900;
}

.inline-filter {
  max-width: 520px;
  margin: 0 0 22px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  background: white;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.page-shell {
  padding-top: 40px;
  padding-bottom: 48px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: clamp(34px, 6vw, 72px);
  color: white;
  background: radial-gradient(circle at 85% 20%, rgba(8, 145, 178, 0.52), transparent 35%), linear-gradient(135deg, var(--slate-950), var(--slate-800) 55%, var(--blue));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 850px;
  margin: 18px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 740px;
  color: #e2e8f0;
  font-size: 17px;
}

.hero-search {
  max-width: 620px;
  margin-top: 24px;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
}

.hero-search input {
  color: white;
}

.hero-search input::placeholder {
  color: #dbeafe;
}

.ranking-board {
  display: grid;
  gap: 14px;
}

.ranking-row a {
  display: grid;
  grid-template-columns: 52px 120px 1fr 58px;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: white;
  box-shadow: 0 14px 42px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ranking-row a:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.13);
}

.ranking-row img {
  width: 120px;
  height: 78px;
  border-radius: 14px;
  object-fit: cover;
}

.ranking-row h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.ranking-row p {
  margin: 0 0 8px;
  color: var(--slate-600);
  line-height: 1.55;
}

.detail-page {
  padding-top: 28px;
  padding-bottom: 48px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--slate-600);
  font-size: 14px;
  margin: 0 0 18px;
}

.breadcrumb a {
  color: var(--blue);
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 26px;
  align-items: stretch;
}

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

.video-player {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: var(--slate-950);
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.12), rgba(2, 6, 23, 0.45));
}

.play-cover span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  font-size: 34px;
  box-shadow: 0 24px 60px rgba(37, 99, 235, 0.42);
  transform: translateX(3px);
}

.player-shell.is-playing .play-cover {
  display: none;
}

.detail-info {
  padding: 28px;
  border-radius: 28px;
  background: white;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.detail-info h1 {
  margin: 18px 0 12px;
  color: var(--slate-800);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.lead {
  color: var(--slate-600);
  line-height: 1.8;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 22px 0 0;
}

.info-list div {
  padding: 12px;
  border-radius: 16px;
  background: var(--slate-100);
}

.info-list dt {
  color: var(--slate-500);
  font-size: 12px;
}

.info-list dd {
  margin: 4px 0 0;
  color: var(--slate-800);
  font-weight: 800;
}

.detail-content {
  margin-top: 34px;
  border-radius: 28px;
  background: white;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.detail-content article {
  padding: clamp(24px, 5vw, 48px);
}

.detail-content h2 {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: clamp(24px, 3vw, 34px);
}

.detail-content p {
  font-size: 16px;
  margin-bottom: 26px;
}

.related-section {
  padding-left: 0;
  padding-right: 0;
}

.site-footer {
  margin-top: 52px;
  color: white;
  background: linear-gradient(135deg, var(--slate-900), var(--slate-950));
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 26px;
  align-items: start;
}

.site-footer p {
  max-width: 560px;
  color: var(--slate-300);
  line-height: 1.8;
}

.footer-nav {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-nav a {
  color: var(--slate-300);
  padding: 8px 10px;
}

.footer-nav a:hover {
  color: white;
}

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

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

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

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

  .search-band,
  .rank-panel,
  .detail-hero,
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .header-inner,
  .search-band,
  .content-section,
  .page-shell,
  .detail-page,
  .footer-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .hero-content {
    padding-left: 18px;
    padding-right: 18px;
    padding-bottom: 78px;
  }

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

  .hero-control {
    display: none;
  }

  .search-band {
    transform: none;
    margin-top: 18px;
    border-radius: 20px;
  }

  .search-form {
    border-radius: 18px;
    flex-direction: column;
  }

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

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

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

  .ranking-row a {
    grid-template-columns: 44px 88px 1fr;
  }

  .ranking-row em {
    grid-column: 3;
  }

  .ranking-row img {
    width: 88px;
    height: 64px;
  }

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

@media (max-width: 460px) {
  .movie-grid,
  .popular-grid,
  .dense-grid,
  .featured-grid {
    grid-template-columns: 1fr;
  }

  .brand-name {
    font-size: 18px;
  }
}
