* {
  box-sizing: border-box;
}

:root {
  --page-bg: #f8fafc;
  --page-soft: #eff6ff;
  --card-bg: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #2563eb;
  --blue-strong: #1d4ed8;
  --cyan: #0891b2;
  --slate: #1e293b;
  --dark: #0f172a;
  --radius-lg: 24px;
  --radius-md: 18px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.10);
  --shadow-card: 0 12px 26px rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 48%, #e2e8f0 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
}

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

.header-shell {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.brand-mark,
.footer-mark {
  position: relative;
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--blue);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(8, 145, 178, 0.12));
}

.brand-mark::after {
  position: absolute;
  inset: 4px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.16);
  filter: blur(14px);
  opacity: 0;
  content: "";
  transition: opacity 0.25s ease;
}

.brand:hover .brand-mark::after {
  opacity: 1;
}

.brand-mark svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.brand-copy strong {
  display: block;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
  color: transparent;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
}

.brand-copy small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link,
.mobile-link {
  color: #334155;
  border-radius: 12px;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 13px;
  font-size: 15px;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--blue);
  background: #eff6ff;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--slate);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 10px 16px 16px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.mobile-nav.is-open {
  display: grid;
  gap: 6px;
}

.mobile-link {
  padding: 12px 14px;
}

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

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

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88) 0%, rgba(15, 23, 42, 0.42) 48%, rgba(15, 23, 42, 0.12) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 74px;
  width: min(1200px, calc(100% - 32px));
  transform: translateX(-50%);
  color: #ffffff;
}

.hero-kicker,
.page-hero-copy span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 8px 14px;
  color: #dbeafe;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid rgba(219, 234, 254, 0.28);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(12px);
}

.hero-content h1,
.detail-hero-copy h1,
.page-hero-copy h1 {
  max-width: 780px;
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-shadow: 0 10px 34px rgba(0, 0, 0, 0.35);
}

.hero-content p,
.detail-hero-copy p,
.page-hero-copy p {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.75;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 22px 0;
}

.hero-meta span,
.detail-meta span {
  padding: 7px 12px;
  color: #e2e8f0;
  font-size: 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(10px);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 24px;
}

.tag-list span {
  padding: 6px 10px;
  color: #2563eb;
  font-size: 13px;
  font-weight: 700;
  border-radius: 999px;
  background: #dbeafe;
}

.hero .tag-list span,
.detail-hero .tag-list span {
  color: #e0f2fe;
  background: rgba(37, 99, 235, 0.42);
}

.hero-actions,
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-btn,
.ghost-btn,
.quick-actions a,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  font-weight: 800;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.primary-btn,
.quick-actions a:first-child {
  color: #ffffff;
  background: var(--blue);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
}

.primary-btn:hover,
.quick-actions a:first-child:hover {
  background: var(--blue-strong);
  transform: translateY(-1px) scale(1.02);
}

.ghost-btn,
.quick-actions a,
.section-more {
  color: var(--blue);
  background: #eff6ff;
}

.hero .ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  color: #ffffff;
  font-size: 34px;
  line-height: 1;
  border: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.52);
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

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

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

.page-shell {
  padding: 56px 0;
}

.home-shell,
.stacked {
  display: grid;
  gap: 64px;
}

.quick-panel,
.filter-panel,
.category-overview-card,
.detail-content,
.detail-side,
.ranking-section {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-soft);
}

.quick-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
}

.quick-panel h2,
.section-heading h2,
.category-overview-card h2,
.detail-content h2,
.detail-side h2,
.ranking-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.quick-panel p,
.section-heading p,
.category-overview-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.scroll-row {
  display: grid;
  grid-auto-columns: minmax(230px, 270px);
  grid-auto-flow: column;
  gap: 22px;
  padding: 0 0 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.movie-grid,
.category-grid,
.ranking-grid,
.mini-grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.85);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5.5;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #f8fafc);
}

.movie-card.compact .poster-link {
  aspect-ratio: 16 / 10;
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: rgba(15, 23, 42, 0.46);
  transition: opacity 0.25s ease;
}

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

.play-chip {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: #ffffff;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.88);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.region-chip {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 9px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(10px);
}

.card-copy {
  padding: 16px;
}

.card-copy h2 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.42;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-copy h2 a:hover {
  color: var(--blue);
}

.card-copy p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #475569;
  font-size: 13px;
}

.meta-row span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

.category-card {
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-thumbs {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 8px;
  height: 120px;
  margin-bottom: 16px;
}

.category-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.category-thumbs img:first-child {
  grid-row: span 2;
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.rank-block {
  padding: 28px;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

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

.rank-row,
.ranking-card {
  display: grid;
  grid-template-columns: auto 64px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.rank-row:hover,
.ranking-card:hover {
  background: #eff6ff;
  transform: translateX(3px);
}

.rank-no,
.ranking-no {
  width: 34px;
  color: var(--blue);
  font-size: 18px;
  font-weight: 900;
  text-align: center;
}

.rank-row img,
.ranking-card img {
  width: 64px;
  height: 80px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-copy strong,
.ranking-card strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
}

.rank-copy em,
.ranking-card em {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.page-hero,
.detail-hero {
  position: relative;
  min-height: 330px;
  overflow: hidden;
  color: #ffffff;
  background: radial-gradient(circle at 24% 20%, rgba(37, 99, 235, 0.55), transparent 34%), linear-gradient(135deg, #0f172a, #1e3a8a 54%, #0e7490);
}

.page-hero-copy {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 80px 0 78px;
}

.page-hero-copy h1 {
  margin-bottom: 16px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 160px;
  gap: 14px;
  margin-bottom: 34px;
  padding: 18px;
}

.filter-search {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.filter-search span {
  color: var(--blue);
  font-size: 22px;
}

.filter-search input,
.filter-panel select {
  width: 100%;
  height: 48px;
  color: var(--ink);
  border: 0;
  outline: none;
  background: transparent;
}

.filter-panel select {
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.filter-card.is-hidden {
  display: none;
}

.category-overview-card,
.ranking-section {
  padding: 28px;
}

.category-overview-head {
  margin-bottom: 24px;
}

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

.detail-hero {
  min-height: 520px;
  background: var(--dark);
}

.detail-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.48));
}

.detail-hero-copy {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 96px 0 76px;
}

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

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

.detail-shell {
  display: grid;
  gap: 44px;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  border: 0;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.25), rgba(2, 6, 23, 0.68));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay span {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  padding-left: 5px;
  font-size: 38px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.42);
}

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

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

.detail-content,
.detail-side {
  padding: 28px;
}

.detail-content h2,
.detail-side h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.detail-content p {
  color: #334155;
  font-size: 16px;
  line-height: 1.9;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px 14px;
  margin: 0 0 22px;
}

.detail-side dt {
  color: var(--muted);
}

.detail-side dd {
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.primary-btn.full {
  width: 100%;
}

.site-footer {
  margin-top: 60px;
  color: #ffffff;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.footer-shell {
  padding: 46px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 22px;
}

.footer-main p {
  max-width: 560px;
  color: #cbd5e1;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #bfdbfe;
  font-size: 16px;
}

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

.site-footer a {
  color: #cbd5e1;
}

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

.footer-bottom {
  margin-top: 34px;
  padding-top: 24px;
  color: #94a3b8;
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
}

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

  .nav-link {
    padding: 9px 10px;
    font-size: 14px;
  }

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

@media (max-width: 820px) {
  .header-shell {
    height: 68px;
  }

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

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

  .hero {
    height: 560px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-panel,
  .section-heading,
  .detail-layout {
    display: grid;
    grid-template-columns: 1fr;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .category-grid,
  .rank-list,
  .ranking-grid,
  .mini-grid,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .detail-side {
    order: -1;
  }
}

@media (max-width: 560px) {
  .header-shell,
  .page-shell,
  .footer-shell,
  .hero-content,
  .detail-hero-copy,
  .page-hero-copy {
    width: min(100% - 24px, 1200px);
  }

  .brand {
    min-width: auto;
  }

  .brand-copy small {
    display: none;
  }

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

  .hero {
    height: 540px;
  }

  .hero-content {
    bottom: 58px;
  }

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

  .hero-content p,
  .detail-hero-copy p,
  .page-hero-copy p {
    font-size: 16px;
  }

  .page-shell {
    padding: 38px 0;
  }

  .home-shell,
  .stacked {
    gap: 42px;
  }

  .quick-panel,
  .category-overview-card,
  .rank-block,
  .ranking-section,
  .detail-content,
  .detail-side {
    padding: 20px;
  }

  .movie-grid,
  .category-grid,
  .rank-list,
  .ranking-grid,
  .mini-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .scroll-row {
    grid-auto-columns: minmax(220px, 78vw);
  }

  .rank-row,
  .ranking-card {
    grid-template-columns: auto 56px 1fr;
  }

  .rank-row img,
  .ranking-card img {
    width: 56px;
    height: 72px;
  }

  .player-frame {
    border-radius: 18px;
  }

  .player-overlay span {
    width: 70px;
    height: 70px;
    font-size: 30px;
  }
}
