
:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #eff6ff;
  --green: #22c55e;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --paper: #ffffff;
  --bg: #f8fafc;
  --dark: #0f172a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.wrap {
  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);
  box-shadow: 0 1px 18px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(12px);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  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-size: 22px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #60a5fa);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.34);
  font-size: 15px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 650;
  color: #374151;
}

.nav-links a,
.mobile-panel a,
.footer-links a,
.inline-links a,
.quick-links a {
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.mobile-panel a:hover,
.footer-links a:hover,
.inline-links a:hover,
.quick-links a:hover {
  color: var(--blue);
}

.menu-toggle {
  width: 42px;
  height: 42px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  background: var(--blue-soft);
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--blue);
  border-radius: 99px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

.mobile-panel.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-panel a {
  padding: 10px 12px;
  border-radius: 12px;
  background: #f3f4f6;
  color: #374151;
  font-weight: 650;
}

.hero {
  position: relative;
  min-height: 560px;
  height: 70vh;
  overflow: hidden;
  background: var(--dark);
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.72) 48%, rgba(15, 23, 42, 0.2) 100%), var(--bg);
  background-size: cover;
  background-position: center;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(37, 99, 235, 0.28), transparent 34%), linear-gradient(0deg, rgba(15, 23, 42, 0.45), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #fff;
  padding-top: 60px;
}

.hero-kicker,
.section-kicker {
  margin: 0 0 12px;
  color: #60a5fa;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 13px;
}

.hero h1,
.hero-main-title {
  margin: 0 0 12px;
  max-width: 760px;
  font-size: clamp(34px, 6vw, 66px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero h2 {
  margin: 0 0 14px;
  font-size: clamp(26px, 4.4vw, 46px);
  line-height: 1.12;
  font-weight: 850;
}

.hero-summary {
  max-width: 700px;
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: clamp(16px, 2.2vw, 21px);
}

.hero-tags,
.detail-meta,
.tag-row,
.detail-tags,
.filter-row,
.page-actions,
.hero-actions,
.quick-links,
.inline-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.detail-meta span,
.tag-row span,
.detail-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.hero-actions {
  margin-top: 26px;
}

.primary-button,
.ghost-button,
.ghost-light-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 13px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

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

.ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.ghost-button:hover,
.ghost-light-button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.24);
}

.ghost-light-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.38);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.42);
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.section-block {
  padding: 58px 0;
}

.page-main,
.detail-main {
  min-height: 70vh;
}

.page-hero {
  margin-top: 34px;
  padding: 54px;
  border-radius: 28px;
  color: #fff;
  background: radial-gradient(circle at 20% 20%, rgba(96, 165, 250, 0.55), transparent 32%), linear-gradient(135deg, #0f172a, #1d4ed8);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.1;
  font-weight: 900;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #e5e7eb;
  font-size: 18px;
}

.category-page-hero,
.ranking-hero {
  background: radial-gradient(circle at 80% 20%, rgba(34, 197, 94, 0.42), transparent 28%), linear-gradient(135deg, #0f172a, #1e40af);
}

.search-panel {
  margin-top: 34px;
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 22px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.search-panel h2 {
  margin: 0 0 8px;
  font-size: 27px;
  line-height: 1.18;
}

.search-panel p {
  margin: 0;
  color: var(--muted);
}

.search-box {
  display: grid;
  gap: 8px;
  font-weight: 800;
  color: #374151;
}

.search-box input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  outline: none;
  color: var(--text);
  background: #f8fafc;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

.filter-row {
  grid-column: 1 / -1;
}

.filter-button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  font-weight: 750;
}

.filter-button.is-active,
.filter-button:hover {
  color: #fff;
  background: var(--blue);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3.3vw, 38px);
  line-height: 1.15;
  font-weight: 900;
}

.section-heading a {
  color: var(--blue);
  font-weight: 800;
}

.compact-heading {
  align-items: center;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 24px 52px rgba(15, 23, 42, 0.16);
}

.movie-card[hidden] {
  display: none;
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #c7d2fe 48%, #0f172a);
}

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

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  backdrop-filter: blur(8px);
}

.play-chip {
  right: 10px;
  bottom: 10px;
  background: rgba(37, 99, 235, 0.9);
}

.rank-badge {
  left: 10px;
  top: 10px;
  background: rgba(15, 23, 42, 0.78);
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.28;
  font-weight: 850;
}

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

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

.tag-row span {
  min-height: 24px;
  padding: 3px 9px;
  color: #1d4ed8;
  background: var(--blue-soft);
  font-size: 12px;
}

.movie-card-compact {
  display: grid;
  grid-template-columns: 96px 1fr;
  align-items: stretch;
}

.movie-card-compact .poster {
  height: 100%;
  min-height: 142px;
}

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

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

.category-tile {
  position: relative;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  overflow: hidden;
  padding: 22px;
  border-radius: 22px;
  color: #fff;
  background-image: linear-gradient(180deg, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.88)), var(--bg);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  transition: transform 0.24s ease;
}

.category-tile:hover {
  transform: translateY(-6px);
}

.category-tile span {
  font-size: 23px;
  font-weight: 900;
}

.category-tile p {
  margin: 8px 0 0;
  color: #e5e7eb;
  font-size: 14px;
}

.split-section {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 28px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.rank-row:hover {
  color: var(--blue);
}

.rank-row span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
}

.rank-row strong,
.rank-row em {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row em {
  grid-column: 2;
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.category-large-grid {
  display: grid;
  gap: 22px;
  padding: 42px 0 70px;
}

.category-card-large {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 24px;
  align-items: center;
  padding: 22px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.category-card-cover {
  min-height: 170px;
  border-radius: 18px;
  background-image: linear-gradient(180deg, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.74)), var(--bg);
  background-size: cover;
  background-position: center;
}

.category-card-large h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.category-card-large p {
  margin: 0 0 14px;
  color: var(--muted);
}

.inline-links a,
.quick-links a {
  padding: 7px 11px;
  border-radius: 999px;
  color: #1d4ed8;
  background: var(--blue-soft);
  font-size: 13px;
  font-weight: 750;
}

.detail-top {
  position: relative;
  overflow: hidden;
  color: #fff;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.62)), var(--bg);
  background-size: cover;
  background-position: center;
}

.detail-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 18% 20%, rgba(37, 99, 235, 0.35), transparent 28%);
}

.detail-top-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 34px;
  align-items: center;
  min-height: 520px;
  padding: 52px 0;
}

.detail-poster {
  border-radius: 22px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.42);
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fff;
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
  font-weight: 920;
}

.detail-desc {
  max-width: 820px;
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: 19px;
}

.detail-meta {
  margin-bottom: 16px;
}

.detail-tags a {
  color: #dbeafe;
}

.watch-section {
  margin-top: -70px;
  position: relative;
  z-index: 4;
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.32);
  aspect-ratio: 16 / 9;
}

.watch-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.28), rgba(15, 23, 42, 0.82));
  text-align: center;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-circle {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.42);
  font-size: 34px;
  text-indent: 4px;
}

.player-cover strong {
  max-width: min(80%, 760px);
  font-size: clamp(22px, 4vw, 38px);
  line-height: 1.2;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 24px;
  padding: 42px 0 0;
}

.story-card {
  padding: 28px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.story-card h2 {
  margin: 0 0 16px;
  font-size: 26px;
  line-height: 1.2;
}

.story-card p {
  margin: 0 0 14px;
  color: #374151;
  font-size: 16px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr 0.8fr;
  gap: 34px;
  padding: 46px 0;
}

.footer-brand {
  color: #fff;
}

.site-footer p {
  max-width: 560px;
  margin: 12px 0 0;
  color: #94a3b8;
}

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

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

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

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

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

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

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

  .hero {
    min-height: 620px;
  }

  .hero-arrow {
    display: none;
  }

  .search-panel,
  .split-section,
  .detail-content-grid,
  .footer-grid,
  .detail-top-grid,
  .category-card-large {
    grid-template-columns: 1fr;
  }

  .detail-top-grid {
    min-height: auto;
  }

  .detail-poster {
    width: min(260px, 70vw);
  }

  .watch-section {
    margin-top: 24px;
  }

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

  .page-hero {
    padding: 34px 24px;
  }

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

@media (max-width: 560px) {
  .wrap,
  .nav-wrap,
  .mobile-panel {
    width: min(100% - 22px, 1180px);
  }

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

  .hero-content {
    padding-top: 40px;
  }

  .hero-actions,
  .page-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

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

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

  .movie-card-compact {
    grid-template-columns: 92px 1fr;
  }

  .mobile-panel.is-open {
    grid-template-columns: 1fr;
  }

  .play-circle {
    width: 64px;
    height: 64px;
    font-size: 28px;
  }
}
