:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --sky: #0284c7;
  --sky-dark: #0369a1;
  --orange: #f97316;
  --rose: #f43f5e;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.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.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-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-weight: 900;
  letter-spacing: -0.04em;
  color: #0f172a;
}

.brand {
  font-size: 22px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky), var(--orange));
  box-shadow: 0 12px 30px rgba(2, 132, 199, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-weight: 700;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  padding: 10px 12px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover {
  color: var(--sky-dark);
  background: #e0f2fe;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: #f1f5f9;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #0f172a;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.mobile-nav.is-open {
  display: grid;
  gap: 4px;
}

.hero {
  position: relative;
  min-height: 700px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 38%, rgba(14, 165, 233, 0.55), transparent 36%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.58) 48%, rgba(2, 6, 23, 0.24)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 55%, rgba(2, 6, 23, 0.1) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 700px;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 760px;
  padding: 92px 0 96px;
  color: #ffffff;
}

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

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  letter-spacing: -0.055em;
  line-height: 1.08;
}

.hero h1 {
  max-width: 720px;
  font-size: clamp(42px, 7vw, 76px);
}

.hero h2 {
  margin: 18px 0 12px;
  font-size: clamp(28px, 4vw, 54px);
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.hero p {
  max-width: 660px;
  margin: 0 0 22px;
  color: #e2e8f0;
  font-size: clamp(16px, 2vw, 20px);
}

.hero-meta,
.detail-meta,
.card-meta {
  color: #64748b;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
  color: #e2e8f0;
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: var(--sky);
  box-shadow: 0 16px 30px rgba(2, 132, 199, 0.34);
}

.btn-primary:hover {
  background: var(--sky-dark);
}

.btn-light {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(14px);
}

.btn-outline {
  color: var(--sky-dark);
  background: #ffffff;
  border-color: #bae6fd;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  cursor: pointer;
  font-size: 30px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.34);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

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

.content-section {
  margin: 42px auto;
}

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

.section-heading h2,
.article-block h2,
.player-section h2,
.related-section h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.045em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  flex: none;
  color: var(--sky-dark);
  font-weight: 900;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 18px 45px rgba(15, 23, 42, 0.08);
  transition: transform 0.26s ease, box-shadow 0.26s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.15;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.75), transparent 54%);
  opacity: 0.86;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.poster-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 900;
}

.poster-year {
  right: 12px;
  bottom: 12px;
  padding: 5px 10px;
  background: rgba(2, 6, 23, 0.72);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 38px;
  padding: 6px 10px;
  text-align: center;
  background: linear-gradient(135deg, var(--rose), var(--orange));
  box-shadow: 0 12px 24px rgba(244, 63, 94, 0.3);
}

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

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.card-body h3 a:hover {
  color: var(--sky-dark);
}

.card-meta {
  min-height: 22px;
  margin: 0 0 8px;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-desc {
  min-height: 46px;
  margin: 0 0 12px;
  color: #334155;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span,
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  min-height: 184px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border-radius: 26px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--sky), var(--orange));
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.category-card:after {
  content: "";
  position: absolute;
  right: -48px;
  bottom: -48px;
  width: 160px;
  height: 160px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.category-card h3 {
  position: relative;
  z-index: 2;
  margin: 0 0 10px;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.category-card p,
.category-card span {
  position: relative;
  z-index: 2;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

.category-card span {
  margin-top: 22px;
  font-weight: 900;
}

.page-hero {
  color: #ffffff;
  background:
    radial-gradient(circle at 12% 20%, rgba(14, 165, 233, 0.55), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(249, 115, 22, 0.4), transparent 28%),
    linear-gradient(135deg, #075985, #0f172a 55%, #431407);
  padding: 70px 0;
}

.page-hero h1 {
  font-size: clamp(36px, 6vw, 62px);
}

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

.filter-panel {
  display: grid;
  grid-template-columns: 1.8fr repeat(3, minmax(120px, 0.5fr));
  gap: 12px;
  padding: 18px;
  margin-bottom: 28px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.filter-panel input,
.filter-panel select {
  min-height: 48px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 14px;
  color: #0f172a;
  background: #ffffff;
  outline: 0;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15);
}

.no-results {
  display: none;
  padding: 28px;
  border-radius: 22px;
  text-align: center;
  color: var(--muted);
  background: #ffffff;
}

.no-results.is-visible {
  display: block;
}

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

.detail-hero {
  padding: 42px 0;
  background:
    radial-gradient(circle at 18% 10%, rgba(14, 165, 233, 0.2), transparent 30%),
    linear-gradient(180deg, #ffffff, #f8fafc);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--sky-dark);
  font-weight: 800;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

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

.detail-title h1 {
  max-width: 780px;
  font-size: clamp(34px, 5vw, 60px);
}

.detail-title .lead {
  max-width: 780px;
  margin: 18px 0;
  color: #334155;
  font-size: 18px;
}

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

.detail-main {
  padding: 34px 0 70px;
}

.player-section,
.article-block,
.related-section {
  margin-bottom: 34px;
  padding: 26px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.player-shell {
  position: relative;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.45);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-icon {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.94);
  font-size: 34px;
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.3);
}

.article-block p {
  color: #334155;
  font-size: 17px;
}

.article-block p:last-child {
  margin-bottom: 0;
}

.site-footer {
  padding: 42px 0;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-grid p {
  margin: 8px 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #334155;
  font-weight: 800;
}

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

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

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

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

  .hero,
  .hero-content {
    min-height: 620px;
  }

  .hero-control {
    display: none;
  }

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

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

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

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

  .detail-poster {
    max-width: 340px;
  }
}

@media (max-width: 540px) {
  .container,
  .header-inner,
  .mobile-nav {
    width: min(100% - 24px, 1180px);
  }

  .hero,
  .hero-content {
    min-height: 590px;
  }

  .hero-copy {
    padding: 76px 0 92px;
  }

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

  .player-section,
  .article-block,
  .related-section {
    padding: 18px;
    border-radius: 22px;
  }
}
