:root {
  --cyan: #06b6d4;
  --blue: #2563eb;
  --teal: #14b8a6;
  --purple: #7c3aed;
  --yellow: #facc15;
  --red: #ef4444;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --card: #ffffff;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --shadow-hover: 0 26px 70px rgba(15, 23, 42, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--soft);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--teal));
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.22);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-size: 18px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 22px;
  line-height: 1.05;
}

.brand-subtitle {
  font-size: 12px;
  line-height: 1.1;
  opacity: 0.9;
  margin-top: 4px;
}

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

.nav-link {
  color: #ffffff;
  font-weight: 700;
  opacity: 0.92;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--yellow);
  transform: translateY(-1px);
}

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-box input,
.search-panel input {
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  min-width: 210px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.header-search input::placeholder,
.mobile-search input::placeholder {
  color: rgba(255, 255, 255, 0.78);
}

.header-search button,
.mobile-search button,
.search-panel button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: #ffffff;
  color: var(--blue);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.search-panel button:hover {
  background: var(--yellow);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #ffffff;
  margin: 5px auto;
}

.mobile-menu {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  padding: 16px;
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.98), rgba(6, 182, 212, 0.98));
}

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

.mobile-menu nav {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.mobile-menu a {
  color: #ffffff;
  font-weight: 700;
  padding: 9px 2px;
}

.hero-slider {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  background: linear-gradient(135deg, #22d3ee, #2563eb 48%, #7c3aed);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: saturate(1.15) contrast(1.08);
}

.hero-layer {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 20%, rgba(250, 204, 21, 0.2), transparent 28%), linear-gradient(90deg, rgba(15, 23, 42, 0.75), rgba(37, 99, 235, 0.34), rgba(15, 23, 42, 0.5));
}

.hero-inner {
  position: relative;
  min-height: 610px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 420px;
  align-items: center;
  gap: 56px;
  color: #ffffff;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 13px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

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

.hero-copy p {
  margin: 0 0 24px;
  font-size: clamp(17px, 2vw, 22px);
  color: rgba(255, 255, 255, 0.88);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 900;
  background: #ffffff;
  color: var(--blue);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
  background: var(--yellow);
  color: #1d4ed8;
}

.btn.outline {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

.btn.dark {
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  color: #ffffff;
}

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

.hero-tags {
  margin-bottom: 26px;
}

.hero-tags span,
.tag-row span,
.detail-tags span {
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(6, 182, 212, 0.12);
  color: #0369a1;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.hero-poster {
  display: block;
  border-radius: 30px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow-hover);
  transform: rotate(2deg);
  transition: transform 0.3s ease;
}

.hero-poster:hover {
  transform: rotate(0) translateY(-4px);
}

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

.slider-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 30px;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.slider-control.prev {
  left: 22px;
}

.slider-control.next {
  right: 22px;
}

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

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

.slider-dots button.is-active {
  width: 32px;
  background: #ffffff;
}

.section {
  padding: 72px 0;
}

.section.soft {
  background: linear-gradient(180deg, #ffffff, #f3f7fb);
}

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

.section-title h2,
.page-hero h1,
.detail-copy h1,
.content-block h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.section-title p,
.page-hero p,
.content-block p,
.detail-copy p {
  color: var(--muted);
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(17, 24, 39, 0.68);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.movie-info {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 17px;
}

.movie-info strong {
  font-size: 18px;
  line-height: 1.32;
}

.movie-info em,
.rank-item em,
.category-copy em {
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
}

.movie-meta {
  color: #0284c7;
  font-size: 13px;
  font-weight: 800;
}

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

.category-tile {
  position: relative;
  min-height: 240px;
  overflow: hidden;
  border-radius: 26px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
  transition: transform 0.45s ease, opacity 0.45s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
  opacity: 0.72;
}

.category-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.1), rgba(15, 23, 42, 0.88));
}

.category-copy {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 2;
  color: #ffffff;
}

.category-copy strong {
  display: block;
  font-size: 21px;
  margin-bottom: 8px;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 46px 70px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-num {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--yellow), #fb923c);
  color: #7c2d12;
  font-size: 20px;
  font-weight: 900;
}

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

.rank-item strong {
  display: block;
  margin-bottom: 6px;
}

.page-hero {
  padding: 72px 0 48px;
  background: radial-gradient(circle at 78% 10%, rgba(250, 204, 21, 0.22), transparent 26%), linear-gradient(135deg, #ecfeff, #eff6ff 48%, #f5f3ff);
}

.page-hero .crumbs,
.detail-hero .crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}

.page-hero .crumbs a,
.detail-hero .crumbs a {
  color: var(--blue);
  font-weight: 800;
}

.filter-box,
.search-panel {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

.filter-box input,
.search-panel input {
  flex: 1;
  min-width: 0;
  background: #f1f5f9;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px #e2e8f0;
}

.detail-hero {
  padding: 48px 0 40px;
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

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

.detail-poster {
  border-radius: 30px;
  padding: 10px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 22px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.detail-meta span {
  border-radius: 18px;
  padding: 12px 14px;
  background: #ffffff;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px #e5e7eb;
}

.detail-meta strong {
  display: block;
  color: var(--ink);
  margin-bottom: 3px;
}

.player-section {
  padding: 52px 0;
  background: #0f172a;
}

.player-card {
  border-radius: 30px;
  overflow: hidden;
  background: #020617;
  box-shadow: 0 30px 90px rgba(2, 6, 23, 0.42);
}

.video-frame {
  position: relative;
  background: #020617;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.24), rgba(2, 6, 23, 0.58));
  cursor: pointer;
}

.play-overlay span {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 7px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--blue);
  font-size: 42px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.32);
}

.play-overlay.hidden,
.video-frame.is-playing .play-overlay {
  display: none;
}

.player-title {
  padding: 20px 24px 24px;
  color: #ffffff;
}

.player-title h2 {
  margin: 0 0 8px;
}

.player-title p {
  margin: 0;
  color: #cbd5e1;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
}

.content-block {
  border-radius: 28px;
  padding: 28px;
  background: #ffffff;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.side-card {
  position: sticky;
  top: 98px;
  border-radius: 28px;
  padding: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.side-card h2 {
  margin-top: 0;
}

.movie-card.compact {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  padding: 10px;
  margin-bottom: 12px;
}

.movie-card.compact .poster-wrap img {
  height: 112px;
  aspect-ratio: auto;
  border-radius: 16px;
}

.movie-card.compact .movie-info {
  padding: 0;
}

.movie-card.compact .tag-row,
.movie-card.compact .poster-badge {
  display: none;
}

.empty-state {
  padding: 36px;
  border-radius: 24px;
  background: #ffffff;
  color: var(--muted);
  text-align: center;
  box-shadow: var(--shadow);
}

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

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

.footer-grid p {
  max-width: 560px;
  color: #94a3b8;
}

.footer-grid h3 {
  margin-top: 0;
  color: #67e8f9;
}

.footer-grid a:not(.footer-brand) {
  display: block;
  color: #cbd5e1;
  margin: 8px 0;
}

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

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

.hidden {
  display: none !important;
}

@media (max-width: 1024px) {
  .main-nav,
  .header-search {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 70px 0 84px;
  }

  .hero-poster {
    max-width: 360px;
  }

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

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

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

  .side-card {
    position: static;
  }
}

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

  .header-inner {
    height: 66px;
  }

  .brand-title {
    font-size: 18px;
  }

  .brand-subtitle {
    font-size: 11px;
  }

  .hero-slider,
  .hero-inner {
    min-height: 680px;
  }

  .slider-control {
    display: none;
  }

  .movie-grid,
  .movie-grid.three,
  .category-grid,
  .rank-layout,
  .footer-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 40px 62px 1fr;
  }

  .rank-item img {
    width: 62px;
    height: 86px;
  }

  .section {
    padding: 48px 0;
  }

  .filter-box,
  .search-panel {
    flex-direction: column;
    align-items: stretch;
  }

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

  .content-block {
    padding: 22px;
  }
}
