:root {
  --primary: #1e3a8a;
  --primary-strong: #172554;
  --primary-soft: #dbeafe;
  --accent: #0ea5e9;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --line: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --shadow: 0 16px 45px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  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(--text);
  background: var(--surface-muted);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container-custom {
  width: min(100% - 32px, 1280px);
  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.86);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 28px rgba(30, 58, 138, 0.28);
}

.brand-name {
  font-size: 21px;
  font-weight: 800;
  color: var(--primary-strong);
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link {
  color: #334155;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  width: min(360px, 34vw);
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.header-search input,
.mobile-search input {
  width: 100%;
  border: 0;
  outline: none;
  padding: 10px 12px;
  color: var(--text);
}

.header-search button,
.mobile-search button {
  border: 0;
  padding: 10px 16px;
  color: #fff;
  background: var(--primary);
}

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

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--primary);
}

.mobile-panel {
  border-top: 1px solid var(--line);
  background: #fff;
}

.mobile-nav,
.mobile-search {
  width: min(100% - 32px, 1280px);
  margin: 0 auto;
}

.mobile-nav {
  display: grid;
  gap: 8px;
  padding: 14px 0;
}

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 10px;
  color: #334155;
}

.mobile-nav a:hover {
  background: #f1f5f9;
}

.mobile-search {
  display: flex;
  padding-bottom: 16px;
}

.mobile-search input {
  border: 1px solid #cbd5e1;
  border-right: 0;
  border-radius: 12px 0 0 12px;
}

.mobile-search button {
  border-radius: 0 12px 12px 0;
}

.hero-carousel {
  position: relative;
  min-height: 620px;
  color: #fff;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(30, 58, 138, 0.72), rgba(2, 6, 23, 0.45)), var(--hero-image);
  background-position: center;
  background-size: cover;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 25%, rgba(14, 165, 233, 0.24), transparent 34%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
}

.hero-content {
  position: relative;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 420px;
  align-items: center;
  gap: 56px;
  padding: 72px 0 92px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 16px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #075985;
  background: #e0f2fe;
  font-size: 14px;
  font-weight: 750;
}

.hero-copy .eyebrow {
  color: #bfdbfe;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-copy h1 {
  margin: 0 0 20px;
  font-size: clamp(42px, 5.6vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 740px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

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

.hero-tags span,
.card-tags span,
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  color: #334155;
  background: #f1f5f9;
  font-size: 13px;
  font-weight: 650;
}

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

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

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 750;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 12px 26px rgba(30, 58, 138, 0.28);
}

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

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotate(1.5deg);
}

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

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

.hero-prev,
.hero-next,
.hero-dots button {
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
}

.hero-dots button.active {
  width: 28px;
  background: #fff;
}

.quick-entry {
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.quick-entry-inner {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
  align-items: center;
  padding: 28px 0;
}

.quick-entry h2 {
  margin: 0 0 4px;
  color: var(--primary-strong);
}

.quick-entry p {
  margin: 0;
  color: var(--text-muted);
}

.quick-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--primary);
  background: #eff6ff;
  font-weight: 700;
}

.page-stack {
  display: grid;
  gap: 44px;
  padding: 48px 0 70px;
}

.content-section {
  display: grid;
  gap: 22px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.section-heading h2,
.article-section h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.025em;
}

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

.section-more {
  flex-shrink: 0;
  color: var(--primary);
  font-weight: 750;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-media {
  position: relative;
  overflow: hidden;
  background: #cbd5e1;
}

.card-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .card-media img {
  transform: scale(1.05);
}

.media-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 46%, rgba(2, 6, 23, 0.58));
}

.score-badge,
.rank-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 850;
}

.score-badge {
  right: 10px;
  top: 10px;
  min-width: 42px;
  padding: 4px 9px;
  color: #92400e;
  background: #fef3c7;
}

.rank-badge {
  left: 10px;
  top: 10px;
  padding: 4px 10px;
  color: #fff;
  background: rgba(30, 58, 138, 0.92);
}

.card-body {
  display: grid;
  gap: 11px;
  padding: 16px;
}

.card-body h3 {
  margin: 0;
  overflow: hidden;
  min-height: 52px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-line {
  margin: 0;
  min-height: 48px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

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

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #334155;
  font-size: 14px;
  font-weight: 700;
}

.input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 11px;
  outline: none;
  padding: 9px 12px;
  color: var(--text);
  background: #fff;
}

.input:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.28);
}

.page-hero {
  color: #fff;
  background:
    radial-gradient(circle at 16% 22%, rgba(14, 165, 233, 0.26), transparent 32%),
    linear-gradient(135deg, #020617, #1e3a8a 58%, #0f172a);
}

.page-hero.compact .container-custom {
  padding: 74px 0 68px;
}

.page-hero h1 {
  max-width: 900px;
  margin: 0 0 16px;
  font-size: clamp(38px, 4.6vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
}

.page-hero .eyebrow {
  color: #bfdbfe;
  background: rgba(255, 255, 255, 0.12);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fff;
  text-decoration: underline;
}

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

.category-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 120px;
  background: #e2e8f0;
}

.category-thumbs img {
  width: 100%;
  height: 132px;
  object-fit: cover;
}

.category-info {
  padding: 20px;
}

.category-info h2 {
  margin: 0 0 10px;
  color: var(--primary-strong);
}

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

.category-info span {
  color: var(--primary);
  font-weight: 750;
}

.detail-hero {
  color: #fff;
  background:
    radial-gradient(circle at 80% 0%, rgba(14, 165, 233, 0.26), transparent 34%),
    linear-gradient(135deg, #020617, #1e3a8a 54%, #0f172a);
}

.detail-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 46px;
  align-items: center;
  padding: 58px 0 62px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shadow);
}

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

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-lead {
  max-width: 850px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.detail-meta,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(255, 255, 255, 0.12);
}

.player-section {
  display: grid;
  gap: 18px;
}

.movie-player {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: var(--shadow);
}

.movie-player video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.7));
  font-size: 18px;
  font-weight: 800;
}

.movie-player.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}

.article-section {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.article-section p {
  margin: 10px 0 24px;
  color: #334155;
  font-size: 17px;
}

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

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.1fr;
  gap: 36px;
  padding: 46px 0;
}

.footer-grid h2,
.footer-grid h3 {
  margin: 0 0 12px;
  color: #fff;
}

.footer-grid p {
  margin: 0;
  color: #94a3b8;
}

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

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

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

.footer-bottom p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

.movie-card.is-hidden {
  display: none;
}

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

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

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

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

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .hero-carousel,
  .hero-content {
    min-height: auto;
  }

  .hero-slide {
    position: relative;
    display: none;
  }

  .hero-slide.active {
    display: block;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 52px 0 86px;
  }

  .hero-poster {
    max-width: 310px;
    justify-self: center;
  }

  .quick-entry-inner,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 680px) {
  .brand-name {
    font-size: 18px;
  }

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

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

  .page-hero.compact .container-custom,
  .detail-layout {
    padding-top: 46px;
    padding-bottom: 48px;
  }

  .hero-copy h1,
  .detail-copy h1,
  .page-hero h1 {
    font-size: 36px;
  }

  .hero-copy p,
  .detail-lead,
  .page-hero p {
    font-size: 16px;
  }
}
