:root {
  --blue: #2563eb;
  --cyan: #06b6d4;
  --teal: #14b8a6;
  --slate: #0f172a;
  --text: #111827;
  --muted: #64748b;
  --card: #ffffff;
  --soft: #eff6ff;
  --border: #e5e7eb;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

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

body.locked {
  overflow: hidden;
}

img {
  background: #e2e8f0;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid rgba(226, 232, 240, 0.78);
  backdrop-filter: blur(12px);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.site-nav {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.02em;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6, #22d3ee);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
}

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

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

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

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

.page-main {
  padding-top: 64px;
}

.hero-section {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 54%, #14b8a6 100%);
}

.hero-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.24), transparent 28%),
    radial-gradient(circle at 76% 18%, rgba(255, 255, 255, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.14), rgba(15, 23, 42, 0.35));
  pointer-events: none;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.18;
  transform: scale(1.04);
  filter: saturate(1.08);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  min-height: 640px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.72fr);
  align-items: center;
  gap: 52px;
}

.hero-copy {
  max-width: 700px;
  animation: fadeIn 0.5s ease both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  margin-bottom: 18px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  font-weight: 700;
}

.hero-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-copy h1 span {
  display: block;
  color: #cffafe;
}

.hero-copy p {
  max-width: 680px;
  color: #e0f2fe;
  font-size: clamp(17px, 2.1vw, 23px);
  line-height: 1.8;
}

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

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

.btn:hover {
  transform: translateY(-2px) scale(1.01);
}

.btn-primary {
  color: var(--blue);
  background: #fff;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.18);
}

.btn-outline {
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.86);
  background: rgba(59, 130, 246, 0.28);
  backdrop-filter: blur(7px);
}

.btn-blue {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 16px 35px rgba(37, 99, 235, 0.24);
}

.hero-search {
  width: min(620px, 100%);
  margin-top: 26px;
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(8px);
}

.hero-search input,
.filter-input,
.filter-select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  padding: 0 16px;
  outline: none;
}

.hero-search input {
  border: 0;
  border-radius: 999px;
}

.hero-search button {
  min-width: 112px;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.hero-visual {
  position: relative;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 32px 80px rgba(15, 23, 42, 0.32);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.hero-poster-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.9));
}

.hero-poster-info h2 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 900;
}

.hero-controls {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.2s ease, background 0.2s ease;
}

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

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

.section.flush {
  width: 100%;
  padding: 72px 0;
  background: linear-gradient(135deg, #f1f5f9, #dbeafe);
}

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

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

.section-kicker {
  color: var(--blue);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.section-heading h2,
.page-heading h1,
.detail-title h1 {
  margin: 0;
  color: #0f172a;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 40px);
}

.section-heading p,
.page-heading p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.8;
}

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

.feature-card,
.movie-card,
.category-card,
.rank-card,
.info-card,
.wide-item,
.search-panel,
.player-section,
.detail-card {
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: var(--shadow);
}

.feature-card {
  position: relative;
  min-height: 285px;
  overflow: hidden;
  border-radius: 24px;
  color: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover,
.movie-card:hover,
.category-card:hover,
.rank-card:hover,
.wide-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.feature-card img {
  width: 100%;
  height: 100%;
  min-height: 285px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.feature-card:hover img,
.poster-link:hover img,
.wide-item:hover img {
  transform: scale(1.08);
}

.feature-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.86));
}

.feature-label,
.card-badge,
.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
}

.feature-label {
  top: 16px;
  right: 16px;
  padding: 7px 12px;
  background: #f59e0b;
}

.feature-info {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px;
}

.feature-info h3 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
}

.feature-info p {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, 0.86);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #e2e8f0;
}

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

.card-badge {
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  background: rgba(37, 99, 235, 0.9);
  font-size: 12px;
}

.play-chip {
  right: 10px;
  bottom: 10px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.76);
  backdrop-filter: blur(6px);
}

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

.meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.meta-line.light {
  color: rgba(255, 255, 255, 0.82);
}

.movie-card h3 {
  min-height: 48px;
  margin: 8px 0;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.movie-card p {
  min-height: 42px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span {
  padding: 4px 8px;
  border-radius: 8px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 12px;
  font-weight: 750;
}

.wide-list {
  display: grid;
  gap: 16px;
}

.wide-item {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  overflow: hidden;
  border-radius: 20px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wide-cover {
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

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

.wide-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.wide-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  color: #0f172a;
  font-size: 18px;
}

.rank-number {
  color: #cbd5e1;
  font-size: 26px;
  font-weight: 900;
}

.wide-body p {
  color: var(--muted);
  line-height: 1.7;
}

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

.category-card {
  min-height: 210px;
  padding: 24px;
  border-radius: 22px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-icon {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #22d3ee);
  font-size: 26px;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.22);
}

.category-card h3 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 20px;
  font-weight: 900;
}

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

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 82px 0;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #06b6d4 58%, #14b8a6);
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 78% 16%, rgba(255, 255, 255, 0.22), transparent 24%);
}

.page-heading {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.page-heading h1 {
  color: #fff;
  font-size: clamp(36px, 5vw, 58px);
}

.page-heading p {
  max-width: 760px;
  color: #e0f2fe;
  font-size: 18px;
}

.filters {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.7fr;
  gap: 14px;
  margin-bottom: 26px;
}

.search-panel {
  padding: 20px;
  border-radius: 22px;
}

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

.rank-card {
  overflow: hidden;
  border-radius: 22px;
}

.rank-card h2 {
  margin: 0;
  padding: 18px 20px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.rank-list {
  display: grid;
}

.rank-row {
  display: grid;
  grid-template-columns: 44px 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
}

.rank-row:first-child {
  border-top: 0;
}

.rank-row img {
  width: 64px;
  height: 82px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-row strong {
  display: block;
  color: #0f172a;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-row span {
  color: var(--muted);
  font-size: 13px;
}

.rank-index {
  color: #94a3b8;
  font-size: 24px;
  font-weight: 900;
}

.detail-hero {
  padding: 42px 0 30px;
}

.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 360px;
  gap: 28px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--blue);
  font-weight: 750;
}

.player-section {
  overflow: hidden;
  border-radius: 28px;
}

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

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 3;
}

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

.big-play {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--blue);
  background: #fff;
  font-size: 34px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.25);
}

.play-title {
  max-width: 80%;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.38);
}

.detail-title {
  padding: 24px;
}

.detail-title h1 {
  font-size: clamp(28px, 4vw, 44px);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.detail-meta span {
  padding: 7px 10px;
  border-radius: 10px;
  color: #1d4ed8;
  background: #dbeafe;
  font-weight: 800;
}

.detail-card {
  margin-top: 22px;
  padding: 26px;
  border-radius: 24px;
}

.detail-card h2 {
  margin: 0 0 14px;
  color: #0f172a;
  font-size: 24px;
  font-weight: 900;
}

.detail-card p {
  color: #334155;
  line-height: 1.95;
  margin: 0 0 14px;
}

.side-poster {
  position: sticky;
  top: 88px;
  overflow: hidden;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.side-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.side-poster-body {
  padding: 22px;
}

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

.empty-state {
  display: none;
  padding: 46px 20px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.empty-state.visible {
  display: block;
}

[data-card][hidden] {
  display: none !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

  .hero-visual {
    display: none;
  }

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

@media (max-width: 760px) {
  .site-nav {
    width: min(100% - 20px, 1180px);
  }

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: fixed;
    top: 64px;
    left: 12px;
    right: 12px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .hero-section,
  .hero-inner {
    min-height: 600px;
  }

  .hero-search {
    flex-direction: column;
    border-radius: 22px;
  }

  .hero-search input,
  .hero-search button {
    border-radius: 16px;
  }

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

  .feature-grid,
  .card-grid,
  .card-grid.large,
  .related-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wide-item {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .wide-body {
    padding: 14px;
  }

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

  .detail-layout {
    width: min(100% - 20px, 1180px);
  }

  .side-poster {
    position: static;
  }

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

@media (max-width: 520px) {
  .feature-grid,
  .card-grid,
  .card-grid.large,
  .related-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    font-size: 40px;
  }

  .page-hero {
    padding: 64px 0;
  }

  .rank-row {
    grid-template-columns: 36px 56px minmax(0, 1fr);
  }

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

.site-footer {
  margin-top: 72px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: start;
}

.footer-brand {
  color: #fff;
  font-size: 20px;
}

.footer-inner p {
  max-width: 620px;
  margin-top: 14px;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 10px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
}

.footer-links a:hover {
  color: #fff;
  background: rgba(59, 130, 246, 0.36);
}

.footer-copy {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  color: #94a3b8;
  text-align: center;
}
