:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --soft: #e2e8f0;
  --primary: #2563eb;
  --cyan: #0891b2;
  --teal: #0d9488;
  --dark: #0f172a;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

img {
  display: block;
  width: 100%;
  height: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.nav-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  box-shadow: 0 16px 35px rgba(37, 99, 235, 0.25);
}

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

.nav-links a {
  position: relative;
  color: #334155;
  font-size: 15px;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 3px;
  border-radius: 999px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #eff6ff;
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: var(--dark);
  border-radius: 99px;
}

.mobile-panel {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 18px;
}

.mobile-panel a {
  display: block;
  padding: 13px 16px;
  margin-top: 8px;
  border-radius: 16px;
  color: #334155;
  font-weight: 700;
  background: rgba(248, 250, 252, 0.9);
}

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

.hero-section {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: linear-gradient(135deg, #2563eb, #06b6d4, #14b8a6);
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
  transform: scale(1.02);
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) saturate(1.15);
  transform: scale(1.08);
  opacity: 0.42;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 78% 28%, rgba(255, 255, 255, 0.24), transparent 28%), linear-gradient(90deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.45) 48%, rgba(14, 165, 233, 0.18));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  height: 100%;
  margin-left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
  padding-right: 32px;
}

.eyebrow {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #cffafe;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.eyebrow.dark {
  color: var(--primary);
  background: #dbeafe;
  border-color: #bfdbfe;
}

.hero-content h1 {
  margin: 22px 0 6px;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.08em;
}

.hero-content h2 {
  margin: 10px 0 0;
  font-size: clamp(26px, 3.8vw, 48px);
  line-height: 1.08;
}

.hero-content p {
  max-width: 620px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  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 {
  color: var(--primary);
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(255, 255, 255, 0.25);
}

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

.ghost-btn.light {
  color: var(--primary);
  background: #eff6ff;
  border-color: #bfdbfe;
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 55px rgba(15, 23, 42, 0.18);
}

.hero-poster {
  position: absolute;
  z-index: 2;
  right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  top: 50%;
  width: min(33vw, 380px);
  aspect-ratio: 2 / 3;
  transform: translateY(-50%) rotate(2deg);
  border-radius: 34px;
  overflow: hidden;
  box-shadow: 0 35px 100px rgba(15, 23, 42, 0.45);
  border: 10px solid rgba(255, 255, 255, 0.24);
}

.hero-poster img {
  height: 100%;
  object-fit: cover;
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
  width: 34px;
  background: #ffffff;
}

.search-band,
.section-block,
.category-strip,
.detail-content,
.breadcrumb {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.search-band {
  margin-top: -48px;
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: center;
  padding-top: 28px;
  padding-bottom: 28px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.search-band h2,
.section-head h2,
.inner-hero h1 {
  margin: 12px 0 0;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.05em;
}

.search-band p,
.inner-hero p,
.category-card p {
  color: var(--muted);
  line-height: 1.8;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 58px;
  padding: 0 18px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid #dbeafe;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.search-box span {
  color: var(--primary);
  font-weight: 900;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
}

.section-block,
.category-strip {
  padding-top: 72px;
  padding-bottom: 10px;
}

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

.section-head.compact {
  margin-bottom: 18px;
}

.section-head a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--primary);
  background: #dbeafe;
  font-weight: 900;
}

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

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

.movie-card {
  min-width: 0;
  border-radius: 26px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.09);
  border: 1px solid rgba(219, 234, 254, 0.78);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 28px 70px rgba(37, 99, 235, 0.16);
}

.movie-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

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

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

.poster-year {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.78);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

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

.movie-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
}

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.03em;
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

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

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

.tag-row.large span {
  font-size: 13px;
  padding: 7px 11px;
}

.pill-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  padding: 24px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff, #eff6ff);
  box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
}

.pill-row a {
  padding: 13px 18px;
  border-radius: 999px;
  color: var(--primary);
  background: #ffffff;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.08);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 64px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid #dbeafe;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.14);
}

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

.rank-item img {
  width: 64px;
  height: 86px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-main strong,
.rank-main em {
  display: block;
}

.rank-main strong {
  font-size: 16px;
  line-height: 1.35;
}

.rank-main em {
  margin-top: 6px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.inner-hero {
  max-width: 1280px;
  margin: 28px auto 0;
  padding: 68px 24px;
  border-radius: 34px;
  color: #ffffff;
  background: linear-gradient(135deg, #1d4ed8, #0891b2, #0d9488);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.inner-hero p {
  max-width: 800px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.inner-search {
  max-width: 560px;
  margin-top: 26px;
  background: rgba(255, 255, 255, 0.96);
}

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

.category-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid #dbeafe;
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.09);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 65px rgba(37, 99, 235, 0.16);
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 148px;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.category-covers img {
  height: 148px;
  object-fit: cover;
}

.category-info {
  padding: 22px;
}

.category-info span {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 900;
}

.category-info h2 {
  margin: 8px 0 8px;
  font-size: 24px;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding-top: 28px;
  color: var(--muted);
  font-weight: 700;
}

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

.detail-hero {
  max-width: 1280px;
  margin: 28px auto 0;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: 28px;
  align-items: stretch;
}

.player-shell {
  position: relative;
  min-height: 520px;
  border-radius: 34px;
  overflow: hidden;
  background: #020617;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25);
}

.player-shell video {
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
  display: block;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.7));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  color: var(--primary);
  background: #ffffff;
  font-size: 40px;
  box-shadow: 0 24px 60px rgba(255, 255, 255, 0.2);
}

.play-overlay strong {
  font-size: 22px;
}

.detail-info {
  border-radius: 34px;
  padding: 38px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #dbeafe;
  box-shadow: var(--shadow);
}

.detail-info h1 {
  margin: 18px 0 12px;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.07em;
}

.detail-meta {
  color: var(--cyan);
  font-weight: 900;
}

.detail-one {
  color: #334155;
  line-height: 1.9;
  font-size: 18px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding-top: 42px;
}

.detail-content article,
.detail-content aside {
  border-radius: 28px;
  padding: 30px;
  background: #ffffff;
  border: 1px solid #dbeafe;
  box-shadow: 0 15px 40px rgba(15, 23, 42, 0.08);
}

.detail-content h2 {
  margin: 0 0 14px;
  font-size: 25px;
  letter-spacing: -0.04em;
}

.detail-content p {
  margin: 0 0 26px;
  color: #334155;
  line-height: 2;
  font-size: 17px;
}

.detail-content dl {
  margin: 0;
}

.detail-content dt {
  margin-top: 14px;
  color: var(--muted);
  font-weight: 900;
}

.detail-content dd {
  margin: 5px 0 0;
  color: var(--text);
  line-height: 1.6;
}

.related-block {
  padding-bottom: 70px;
}

.empty-result {
  display: none;
  margin-top: 24px;
  padding: 26px;
  border-radius: 22px;
  color: var(--muted);
  background: #ffffff;
  text-align: center;
  border: 1px solid #dbeafe;
}

.empty-result.show {
  display: block;
}

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

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 24px;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
}

.footer-brand {
  font-size: 24px;
  font-weight: 900;
}

.site-footer p,
.site-footer a {
  color: #cbd5e1;
  line-height: 1.8;
}

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

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin: 9px 0;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 28px;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

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

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

  .hero-poster {
    opacity: 0.72;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero-section {
    height: 660px;
  }

  .hero-content {
    margin-left: 24px;
    padding-right: 24px;
  }

  .hero-poster {
    right: 24px;
    bottom: 76px;
    top: auto;
    width: 150px;
    transform: none;
    border-width: 6px;
    border-radius: 22px;
  }

  .search-band {
    grid-template-columns: 1fr;
    margin-left: 18px;
    margin-right: 18px;
  }

  .movie-grid,
  .featured-grid,
  .category-grid,
  .rank-grid,
  .ranking-list,
  .footer-grid,
  .detail-hero,
  .detail-content {
    grid-template-columns: 1fr 1fr;
  }

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

  .player-shell,
  .player-shell video {
    min-height: 360px;
  }
}

@media (max-width: 620px) {
  .nav-shell {
    padding: 0 16px;
  }

  .brand {
    font-size: 19px;
  }

  .hero-section {
    height: 720px;
  }

  .hero-content h1 {
    font-size: 42px;
  }

  .hero-content h2 {
    font-size: 30px;
  }

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

  .primary-btn,
  .ghost-btn {
    width: 100%;
  }

  .search-band,
  .section-block,
  .category-strip,
  .detail-content,
  .breadcrumb {
    padding-left: 16px;
    padding-right: 16px;
  }

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

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

  .inner-hero {
    margin: 18px 14px 0;
    padding: 46px 20px;
    border-radius: 26px;
  }

  .detail-hero {
    padding: 0 16px;
  }

  .detail-info,
  .detail-content article,
  .detail-content aside {
    padding: 24px;
    border-radius: 24px;
  }

  .player-shell,
  .player-shell video {
    min-height: 280px;
    border-radius: 24px;
  }

  .play-icon {
    width: 72px;
    height: 72px;
    font-size: 32px;
  }
}
