
:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --cyan: #0891b2;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 20px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 20px 45px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--slate-800);
  background: linear-gradient(135deg, var(--slate-50), #eff6ff 48%, var(--slate-100));
  line-height: 1.6;
}

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

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.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--slate-200);
  box-shadow: var(--shadow-sm);
}

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

.navbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.28);
  font-weight: 800;
}

.logo-text strong {
  display: block;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-text span {
  display: block;
  margin-top: 3px;
  color: var(--slate-500);
  font-size: 12px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 3px;
}

.nav-links a {
  padding: 9px 14px;
  border-radius: 10px;
  color: var(--slate-700);
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--blue);
  background: #eff6ff;
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  background: var(--slate-100);
  color: var(--slate-700);
  padding: 9px 12px;
}

.mobile-nav {
  display: none;
  padding: 0 0 14px;
}

.mobile-nav a {
  display: block;
  padding: 11px 14px;
  border-radius: 10px;
  color: var(--slate-700);
}

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

.hero-carousel {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: var(--slate-900);
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.08));
  z-index: 2;
}

.hero-content {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
}

.hero-copy {
  width: min(680px, 100%);
  padding: 0 0 72px;
  color: var(--white);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.82);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 14px;
  font-size: clamp(32px, 6vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  text-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
}

.hero-copy p {
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: 18px;
  max-width: 660px;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-bottom: 22px;
  color: #d1d5db;
  font-size: 14px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.32);
}

.btn-primary:hover {
  background: var(--blue-dark);
  transform: translateY(-2px) scale(1.02);
}

.btn-light {
  background: rgba(255, 255, 255, 0.92);
  color: var(--slate-800);
}

.btn-light:hover {
  background: var(--white);
  transform: translateY(-2px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.48);
  color: var(--white);
  cursor: pointer;
  transition: background 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: var(--white);
}

.page-main {
  padding: 44px 0 76px;
}

.section-stack {
  display: grid;
  gap: 56px;
}

.section-card,
.panel {
  background: var(--white);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
}

.section-card {
  padding: 28px;
}

.section-gradient {
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

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

.section-head h2,
.section-head h1,
.page-title h1 {
  margin: 0;
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.section-head p,
.page-title p {
  margin: 8px 0 0;
  color: var(--slate-600);
}

.movie-scroller {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 2px 2px 18px;
  scroll-snap-type: x proximity;
}

.movie-scroller .movie-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
}

.grid {
  display: grid;
  gap: 24px;
}

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

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

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

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

.poster {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: var(--slate-200);
  box-shadow: var(--shadow-sm);
  aspect-ratio: 16 / 10;
}

.poster.tall {
  aspect-ratio: 3 / 4;
}

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

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

.card-shade {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
  background: rgba(0, 0, 0, 0.42);
  opacity: 0;
  transition: opacity 0.25s ease;
  font-size: 34px;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.75);
  color: var(--white);
  backdrop-filter: blur(6px);
}

.poster .badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}

.poster .duration {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: var(--blue);
}

.movie-info {
  padding-top: 12px;
}

.movie-info h3,
.movie-info h4 {
  margin: 0;
  color: var(--slate-800);
  line-height: 1.35;
  font-size: 16px;
  transition: color 0.2s ease;
}

.movie-card:hover h3,
.movie-card:hover h4 {
  color: var(--blue);
}

.movie-info p {
  margin: 7px 0 0;
  color: var(--slate-600);
  font-size: 14px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px 14px;
  margin-top: 9px;
  color: var(--slate-500);
  font-size: 13px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.tab-button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: var(--slate-700);
  background: var(--white);
  cursor: pointer;
  font-weight: 800;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.tab-button.is-active {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.list-links {
  display: grid;
  gap: 14px;
}

.list-link {
  display: grid;
  grid-template-columns: 138px 1fr;
  gap: 16px;
  padding: 12px;
  border-radius: 16px;
  transition: background 0.2s ease;
}

.list-link:hover {
  background: var(--slate-50);
}

.list-link img {
  width: 138px;
  height: 86px;
  object-fit: cover;
  border-radius: 12px;
}

.list-link h3,
.list-link h4 {
  margin: 0;
  font-size: 17px;
}

.list-link p {
  margin: 6px 0 0;
  color: var(--slate-600);
  font-size: 14px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.page-title {
  margin-bottom: 28px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--slate-500);
  font-size: 14px;
}

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

.filterbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 26px;
}

.filterbar input,
.filterbar select,
.hero-search input {
  width: 100%;
  border: 1px solid var(--slate-200);
  border-radius: 14px;
  background: var(--white);
  padding: 12px 14px;
  color: var(--slate-800);
  outline: 0;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.filterbar input:focus,
.filterbar select:focus,
.hero-search input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.hero-search {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  max-width: 520px;
}

.category-card {
  display: block;
  padding: 24px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

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

.category-previews {
  display: flex;
  margin-top: 16px;
}

.category-previews img {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 16px;
  border: 3px solid var(--white);
  box-shadow: var(--shadow-sm);
  margin-right: -12px;
}

.rank-row {
  display: grid;
  grid-template-columns: 44px 128px 1fr;
  gap: 16px;
  align-items: center;
  padding: 13px;
  border-radius: 18px;
  transition: background 0.2s ease;
}

.rank-row:hover {
  background: var(--slate-50);
}

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

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

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

.player-panel {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--white);
  background: #000;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.player-cover-content {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(to top, rgba(0,0,0,0.72), rgba(0,0,0,0.16));
  text-align: center;
  padding: 22px;
}

.play-circle {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-size: 34px;
  box-shadow: 0 16px 38px rgba(37, 99, 235, 0.38);
}

.player-cover-content strong {
  display: block;
  font-size: clamp(22px, 4vw, 36px);
  line-height: 1.2;
}

.player-cover-content span {
  display: block;
  margin-top: 8px;
  color: #e5e7eb;
}

.detail-card {
  padding: 26px;
}

.detail-card h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.14;
  letter-spacing: -0.04em;
}

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

.detail-card p {
  margin: 0 0 16px;
  color: var(--slate-700);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 22px;
}

.tag {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  background: #eff6ff;
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 800;
}

.detail-side {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.side-link {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  padding: 10px;
  border-radius: 15px;
  transition: background 0.2s ease;
}

.side-link:hover {
  background: var(--slate-50);
}

.side-link img {
  width: 112px;
  height: 70px;
  object-fit: cover;
  border-radius: 12px;
}

.side-link h3,
.side-link h4 {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
}

.side-link p {
  margin: 6px 0 0;
  color: var(--slate-500);
  font-size: 12px;
}

.site-footer {
  color: var(--slate-300);
  background: linear-gradient(135deg, var(--slate-800), var(--slate-900));
  padding: 42px 0;
}

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

.site-footer h2,
.site-footer h3 {
  color: var(--white);
  margin: 0 0 12px;
}

.site-footer p,
.site-footer a {
  color: var(--slate-300);
}

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

.copyline {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid rgba(203, 213, 225, 0.18);
  color: #94a3b8;
  font-size: 14px;
  text-align: center;
}

.hidden-card {
  display: none !important;
}

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

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

  .mobile-nav.is-open {
    display: block;
  }

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

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

  .detail-side {
    position: static;
  }

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

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

  .navbar {
    min-height: 64px;
  }

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

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

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

  .hero-copy {
    padding-bottom: 60px;
  }

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

  .hero-control {
    display: none;
  }

  .section-card {
    padding: 20px;
  }

  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .filterbar,
  .hero-search {
    grid-template-columns: 1fr;
    display: grid;
  }

  .list-link,
  .rank-row,
  .side-link {
    grid-template-columns: 96px 1fr;
  }

  .list-link img,
  .rank-row img,
  .side-link img {
    width: 96px;
    height: 66px;
  }

  .rank-row {
    grid-template-columns: 38px 96px 1fr;
    gap: 10px;
  }
}
