:root {
  color-scheme: light;
  --page-bg: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --soft: #e2e8f0;
  --panel: #ffffff;
  --blue: #2563eb;
  --blue-dark: #1e3a8a;
  --cyan: #06b6d4;
  --shadow: 0 22px 70px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page-bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  white-space: nowrap;
}

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

.brand-name {
  font-size: 1.25rem;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

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

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

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #1e293b;
  background: #eff6ff;
}

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

.mobile-nav-link {
  display: block;
  padding: 12px 14px;
  margin: 4px 0;
}

.hero-slider {
  position: relative;
  height: clamp(520px, 72vh, 680px);
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 72% 38%, rgba(37, 99, 235, 0.16), transparent 32%), linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.7) 42%, rgba(15, 23, 42, 0.22));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-text {
  width: min(720px, 100%);
  padding-top: 34px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  margin-bottom: 20px;
  color: #dbeafe;
  font-size: 0.9rem;
  font-weight: 700;
  border: 1px solid rgba(219, 234, 254, 0.34);
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.28);
  backdrop-filter: blur(14px);
}

.hero-text h1 {
  margin: 0;
  font-size: clamp(2.7rem, 8vw, 5.7rem);
  line-height: 0.96;
  letter-spacing: -0.065em;
  text-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

.hero-text p {
  max-width: 680px;
  margin: 24px 0 0;
  color: #e2e8f0;
  font-size: clamp(1.04rem, 2.4vw, 1.35rem);
  line-height: 1.75;
}

.hero-tags,
.card-tags,
.detail-tags,
.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.quick-tags a,
.detail-tags span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 700;
}

.hero-tags span {
  padding: 7px 11px;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.primary-button,
.secondary-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  padding: 13px 24px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.32);
}

.secondary-button {
  padding: 12px 22px;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.primary-button:hover,
.secondary-button:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #ffffff;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(12px);
}

.hero-dot {
  width: 34px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
}

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

.home-search {
  position: relative;
  z-index: 6;
  margin-top: -44px;
}

.home-search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 18px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.home-search-panel input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: #ffffff;
  color: #0f172a;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.home-search-panel input {
  padding: 16px 18px;
}

.home-search-panel input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.18);
}

.home-search-panel button {
  border: 0;
  padding: 0 24px;
  color: #ffffff;
  border-radius: 16px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.main-content {
  padding: 54px 0 70px;
}

.section-block {
  margin-top: 54px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.04em;
}

.section-kicker {
  margin: 0 0 8px;
  color: var(--blue);
  font-weight: 800;
}

.section-desc {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 24px 46px rgba(15, 23, 42, 0.14);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

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

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

.poster-year,
.rank-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.poster-year {
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  font-size: 0.78rem;
  background: rgba(15, 23, 42, 0.76);
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.28);
}

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

.movie-card-body h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.movie-card-body h3 a:hover,
.rank-info h3 a:hover,
.breadcrumb a:hover {
  color: var(--blue);
}

.movie-card-body p,
.rank-info p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
  color: #475569;
  font-size: 0.86rem;
}

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

.card-tags {
  margin-top: 12px;
}

.card-tags span {
  padding: 5px 8px;
  color: #1d4ed8;
  font-size: 0.76rem;
  background: #eff6ff;
}

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

.category-card {
  display: flex;
  min-height: 168px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  color: #ffffff;
  border-radius: 24px;
  background: linear-gradient(135deg, #2563eb, #0f172a);
  box-shadow: 0 22px 52px rgba(37, 99, 235, 0.18);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #0ea5e9, #1e293b);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #7c3aed, #0f172a);
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 28px 62px rgba(37, 99, 235, 0.24);
}

.category-card h3 {
  margin: 0;
  font-size: 1.25rem;
}

.category-card p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.65;
}

.page-hero {
  padding: 62px 0 44px;
  color: #ffffff;
  background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.36), transparent 34%), linear-gradient(135deg, #0f172a, #1e3a8a);
}

.page-hero h1 {
  margin: 14px 0 12px;
  font-size: clamp(2.2rem, 7vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.055em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #dbeafe;
  line-height: 1.8;
  font-size: 1.08rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #bfdbfe;
  font-weight: 700;
}

.filter-wrap {
  padding: 26px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.filter-bar {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 14px;
}

.filter-bar label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-size: 0.88rem;
  font-weight: 800;
}

.filter-bar input,
.filter-bar select {
  min-height: 48px;
  padding: 11px 13px;
}

.empty-state {
  margin-top: 24px;
  padding: 22px;
  color: #475569;
  text-align: center;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  background: #f8fafc;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 150px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.82);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.rank-index {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #ffffff;
  border-radius: 16px;
  font-weight: 900;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.rank-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px;
  background: #0f172a;
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-info h3 {
  margin: 0;
  font-size: 1.1rem;
}

.text-link {
  padding: 10px 15px;
  color: #ffffff;
  background: var(--blue);
}

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

.detail-card,
.side-card {
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

.detail-card {
  overflow: hidden;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.video-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
  z-index: 2;
}

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

.play-cta {
  display: grid;
  place-items: center;
  gap: 12px;
  font-size: 1.05rem;
  font-weight: 900;
}

.play-icon {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.42);
}

.detail-body {
  padding: 28px;
}

.detail-body h1 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  letter-spacing: -0.045em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
}

.detail-meta span,
.detail-tags span {
  padding: 8px 11px;
  color: #1d4ed8;
  border-radius: 999px;
  background: #eff6ff;
  font-weight: 800;
}

.detail-section {
  margin-top: 28px;
}

.detail-section h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
}

.detail-section p {
  margin: 0;
  color: #475569;
  line-height: 1.9;
  font-size: 1.02rem;
}

.side-card {
  padding: 20px;
}

.side-card h2 {
  margin: 0 0 16px;
  font-size: 1.25rem;
}

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

.side-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
}

.side-item img {
  width: 92px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  background: #0f172a;
}

.side-item h3 {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.36;
}

.side-item p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.quick-tags {
  margin-top: 18px;
}

.quick-tags a {
  padding: 9px 13px;
  color: #1d4ed8;
  background: #eff6ff;
}

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 32px;
  padding: 54px 0 42px;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer p,
.site-footer li {
  color: #cbd5e1;
  line-height: 1.75;
}

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

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

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

[hidden] {
  display: none !important;
}

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

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

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

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

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

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

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

  .hero-slider {
    height: 620px;
  }

  .hero-overlay {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.54), rgba(2, 6, 23, 0.9));
  }

  .hero-content {
    align-items: end;
    padding-bottom: 108px;
  }

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

  .home-search-panel button {
    min-height: 50px;
  }

  .section-head {
    display: block;
  }

  .movie-grid,
  .category-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

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

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

  .rank-row {
    grid-template-columns: 48px 98px 1fr;
    gap: 12px;
  }

  .rank-row .text-link {
    grid-column: 2 / -1;
  }

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

@media (max-width: 520px) {
  .site-container {
    width: min(100% - 22px, 1180px);
  }

  .brand-name {
    font-size: 1.05rem;
  }

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

  .side-item {
    grid-template-columns: 86px 1fr;
  }
}
