:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft-text: #cbd5e1;
  --accent: #3b82f6;
  --accent-2: #22d3ee;
  --accent-3: #a855f7;
  --danger: #f43f5e;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.26), transparent 32rem),
    radial-gradient(circle at 90% 10%, rgba(168, 85, 247, 0.18), transparent 34rem),
    linear-gradient(180deg, #0f172a 0%, #020617 34rem, #020617 100%);
}

body.no-scroll {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
}

.nav-wrap,
.footer-wrap,
.wrap,
.content-section,
.quick-search-section {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.38);
}

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

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

.nav-link,
.mobile-link,
.footer-links a {
  color: var(--soft-text);
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active,
.footer-links a:hover {
  color: white;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.85);
}

.icon-button:hover {
  border-color: rgba(59, 130, 246, 0.7);
  color: white;
}

.nav-toggle {
  display: none;
}

.header-search {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.header-search-form {
  display: flex;
  gap: 12px;
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
}

.header-search-form input,
.quick-search-form input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 14px;
  outline: none;
  color: white;
  background: rgba(2, 6, 23, 0.72);
  padding: 13px 16px;
}

.header-search-form input:focus,
.quick-search-form input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: rgba(59, 130, 246, 0.85);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

.header-search-form button,
.quick-search-form button,
.primary-button,
.ghost-button,
.section-link,
.category-panel-main span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 700;
}

.header-search-form button,
.quick-search-form button,
.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  padding: 13px 20px;
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.28);
}

.ghost-button,
.section-link {
  color: #bfdbfe;
  border: 1px solid rgba(96, 165, 250, 0.32);
  background: rgba(37, 99, 235, 0.12);
  padding: 12px 18px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 16px 18px;
}

.mobile-link {
  display: block;
  padding: 12px 2px;
}

.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 670px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.7), rgba(2, 6, 23, 1));
}

.hero-bg {
  position: absolute;
  inset: -20% -10%;
  background:
    radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.28), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(168, 85, 247, 0.18), transparent 30rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(2, 6, 23, 0.92));
}

.hero-inner {
  position: relative;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0 64px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: 48px;
  min-height: 480px;
}

.hero-slide.is-active {
  display: grid;
  animation: fadeUp 0.5s ease both;
}

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

.eyebrow {
  margin: 0 0 12px;
  color: #93c5fd;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-desc,
.page-hero p,
.detail-one-line {
  color: var(--soft-text);
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
}

.hero-meta span,
.detail-meta span,
.card-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  padding: 5px 10px;
}

.hero-tags,
.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(96, 165, 250, 0.2);
  padding: 4px 10px;
  font-size: 13px;
}

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

.hero-visual {
  position: relative;
  min-height: 440px;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
  transform: perspective(1200px) rotateY(-5deg);
}

.hero-visual img {
  width: 100%;
  height: 100%;
  min-height: 440px;
  object-fit: cover;
  transition: transform 0.55s ease;
}

.hero-visual:hover img,
.movie-card:hover img {
  transform: scale(1.06);
}

.hero-visual::after,
.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 25%, rgba(2, 6, 23, 0.65));
}

.hero-play,
.play-hover {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: rgba(59, 130, 246, 0.92);
  box-shadow: 0 18px 46px rgba(59, 130, 246, 0.42);
}

.hero-play {
  right: 24px;
  bottom: 24px;
  width: 70px;
  height: 70px;
  font-size: 28px;
}

.hero-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 24px;
}

.hero-controls button {
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.75);
}

.hero-controls > button {
  width: 44px;
  height: 44px;
  font-size: 28px;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--accent);
}

.quick-search-section,
.content-section {
  padding: 64px 0;
}

.quick-search-card {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  align-items: center;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.78));
  box-shadow: var(--shadow);
  padding: 26px;
}

.quick-search-card strong {
  font-size: 24px;
}

.quick-search-card p,
.section-heading p,
.category-tile small,
.card-body p,
.category-panel p,
.article-block p,
.footer-wrap p {
  color: var(--muted);
  line-height: 1.75;
}

.quick-search-form {
  display: flex;
  gap: 12px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: 30px;
}

.section-heading p {
  margin: 8px 0 0;
}

.soft-section {
  width: 100%;
  max-width: none;
  padding-left: max(16px, calc((100vw - 1200px) / 2));
  padding-right: max(16px, calc((100vw - 1200px) / 2));
  background: rgba(15, 23, 42, 0.36);
}

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

.category-tile,
.category-panel,
.movie-card,
.article-block,
.compact-card {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.28);
}

.category-tile {
  display: flex;
  flex-direction: column;
  min-height: 150px;
  border-radius: 20px;
  padding: 20px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-tile:hover,
.category-panel:hover,
.compact-card:hover,
.movie-card:hover {
  border-color: rgba(96, 165, 250, 0.55);
  transform: translateY(-3px);
}

.category-tile span {
  margin-bottom: 10px;
  font-size: 20px;
  font-weight: 800;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.featured-card {
  grid-column: span 2;
}

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

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

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 3;
  top: 10px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 8px;
}

.year-badge {
  right: 10px;
  background: rgba(2, 6, 23, 0.74);
}

.rank-badge {
  left: 10px;
  background: linear-gradient(135deg, var(--danger), #f59e0b);
}

.play-hover {
  top: 50%;
  left: 50%;
  width: 52px;
  height: 52px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-body {
  padding: 14px;
}

.card-meta {
  gap: 6px;
  font-size: 12px;
}

.card-meta span {
  padding: 3px 7px;
}

.card-body h3 {
  margin: 12px 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: #93c5fd;
}

.card-body p {
  display: -webkit-box;
  min-height: 50px;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
}

.card-tags {
  margin-top: 12px;
}

.card-tags .tag {
  min-height: 24px;
  font-size: 12px;
  padding: 3px 8px;
}

.compact-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.compact-card {
  display: grid;
  grid-template-columns: auto 58px 1fr;
  align-items: center;
  gap: 12px;
  border-radius: 16px;
  padding: 10px;
}

.compact-card img {
  width: 58px;
  height: 78px;
  border-radius: 10px;
  object-fit: cover;
  background: #0f172a;
}

.compact-card strong {
  display: block;
  margin-bottom: 6px;
}

.compact-card small {
  color: var(--muted);
}

.compact-rank {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: white;
  background: rgba(59, 130, 246, 0.28);
  font-weight: 800;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 48px;
  background:
    radial-gradient(circle at 16% 0%, rgba(59, 130, 246, 0.22), transparent 28rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.72), rgba(2, 6, 23, 0.94));
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--muted);
}

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

.category-panels {
  display: grid;
  gap: 20px;
}

.category-panel {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 18px;
  border-radius: 24px;
  padding: 20px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-panel-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 180px;
  border-radius: 18px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(168, 85, 247, 0.12));
}

.category-panel-main h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.category-panel-main span {
  width: fit-content;
  margin-top: 14px;
  color: #dbeafe;
  background: rgba(59, 130, 246, 0.2);
  padding: 10px 14px;
}

.category-preview-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.filter-bar {
  position: sticky;
  top: 82px;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr 190px 160px;
  gap: 12px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
  padding: 14px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(320px, 0.62fr);
  gap: 26px;
  align-items: stretch;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #000;
  min-height: 420px;
  box-shadow: var(--shadow);
}

.movie-video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 420px;
  background: #000;
  object-fit: contain;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  cursor: pointer;
  color: white;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.74));
}

.play-overlay[hidden] {
  display: none;
}

.big-play {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 20px 60px rgba(59, 130, 246, 0.45);
  font-size: 34px;
}

.detail-info {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  padding: 18px;
}

.detail-poster {
  width: 150px;
  height: 225px;
  border-radius: 16px;
  object-fit: cover;
  background: #0f172a;
}

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

.detail-meta {
  margin: 14px 0;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.article-block {
  border-radius: 22px;
  padding: 26px;
}

.article-block h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.article-block p {
  margin: 0;
  color: var(--soft-text);
  font-size: 17px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.9);
  padding: 34px 0;
}

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

.footer-wrap p {
  margin: 8px 0 0;
}

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

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

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .nav-toggle {
    display: grid;
  }

  .mobile-nav {
    display: block;
  }

  .hero-slide,
  .detail-layout,
  .quick-search-card,
  .category-panel {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .rank-grid,
  .compact-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (max-width: 760px) {
  .nav-wrap,
  .footer-wrap,
  .wrap,
  .content-section,
  .quick-search-section {
    width: min(100% - 24px, 1200px);
  }

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

  .header-search-form,
  .quick-search-form,
  .section-heading,
  .footer-wrap {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-section {
    min-height: auto;
  }

  .hero-inner {
    padding: 42px 0 36px;
  }

  .hero-slide {
    gap: 28px;
    min-height: auto;
  }

  .hero-visual,
  .hero-visual img {
    min-height: 360px;
    transform: none;
  }

  .quick-search-section,
  .content-section {
    padding: 42px 0;
  }

  .movie-grid,
  .rank-grid,
  .compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .featured-card {
    grid-column: span 1;
  }

  .category-grid,
  .compact-list,
  .category-preview-list,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    position: static;
    grid-template-columns: 1fr;
  }

  .detail-info {
    grid-template-columns: 110px 1fr;
  }

  .detail-poster {
    width: 110px;
    height: 165px;
  }

  .player-shell,
  .movie-video {
    min-height: 260px;
  }

  .card-body h3 {
    font-size: 15px;
  }
}
