:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --card: rgba(15, 23, 42, 0.72);
  --card-strong: rgba(30, 41, 59, 0.86);
  --line: rgba(51, 65, 85, 0.72);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-strong: #0284c7;
  --gold: #facc15;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(14, 165, 233, 0.22), transparent 28rem),
    radial-gradient(circle at 80% 10%, rgba(37, 99, 235, 0.18), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  min-height: 100vh;
}

body.menu-open {
  overflow: hidden;
}

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

img,
video {
  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, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.site-nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 12px;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.28);
}

.brand strong {
  display: block;
  font-size: 25px;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #bae6fd, #93c5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link {
  color: #cbd5e1;
  font-weight: 600;
  padding: 26px 0 22px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--accent);
  border-color: var(--accent);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.65);
  color: #fff;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #000;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.92)),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.46), rgba(2, 6, 23, 0.22));
}

.hero-content {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  padding: 86px 0 82px;
}

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

.hero-label,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  background: rgba(2, 132, 199, 0.88);
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 18px 0 18px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 0 22px;
  max-width: 680px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.75;
}

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

.hero-tags span,
.detail-tags span,
.movie-tags span {
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.14);
  border: 1px solid rgba(125, 211, 252, 0.2);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
}

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

.primary-btn,
.ghost-btn,
.search-form button,
.section-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid transparent;
  min-height: 46px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.search-form button {
  color: #fff;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  box-shadow: 0 16px 30px rgba(14, 165, 233, 0.28);
}

.ghost-btn,
.section-action {
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.58);
  border-color: rgba(125, 211, 252, 0.28);
}

.primary-btn:hover,
.ghost-btn:hover,
.search-form button:hover,
.section-action:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 6;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  font-size: 42px;
  line-height: 1;
  background: rgba(0, 0, 0, 0.48);
  transform: translateY(-50%);
}

.hero-arrow:hover {
  background: rgba(2, 132, 199, 0.78);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-50%);
}

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

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

.search-panel,
.page-section,
.inner-page {
  padding-top: 56px;
  padding-bottom: 56px;
}

.search-panel {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  align-items: center;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.78), rgba(30, 41, 59, 0.66));
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.24);
}

.search-panel h2,
.section-head h2,
.page-hero h1,
.detail-intro h1 {
  margin: 12px 0 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.search-panel p,
.section-head p,
.page-hero p,
.detail-one-line {
  color: var(--muted);
  line-height: 1.75;
}

.search-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.search-form input,
.filter-search {
  width: 100%;
  min-height: 48px;
  color: #e2e8f0;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  padding: 0 16px;
}

.search-form input:focus,
.filter-search:focus {
  border-color: rgba(56, 189, 248, 0.75);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.search-results {
  grid-column: 1 / -1;
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.search-results.is-visible {
  display: grid;
}

.search-result-card {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  min-height: 112px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
}

.search-result-card img {
  width: 78px;
  height: 92px;
  object-fit: cover;
  border-radius: 12px;
}

.search-result-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.search-result-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

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

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

.movie-card {
  background: var(--card);
  border: 1px solid rgba(51, 65, 85, 0.64);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px) scale(1.015);
  border-color: rgba(125, 211, 252, 0.48);
  box-shadow: 0 26px 68px rgba(2, 132, 199, 0.18);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #020617;
}

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

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

.movie-duration,
.rank-num {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #fff;
  background: rgba(0, 0, 0, 0.68);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(2, 132, 199, 0.9);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 10px 0 8px;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
}

.movie-info h3 a:hover,
.compact-card h3 a:hover,
.text-link:hover {
  color: var(--accent);
}

.movie-info p {
  min-height: 44px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.movie-meta,
.compact-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  color: #64748b;
  font-size: 13px;
}

.movie-meta span:first-child,
.compact-meta span:last-child {
  color: var(--gold);
}

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

.category-tile {
  min-height: 148px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
  padding: 22px;
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 22px;
  background:
    radial-gradient(circle at 80% 10%, rgba(14, 165, 233, 0.24), transparent 10rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(30, 41, 59, 0.66));
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(125, 211, 252, 0.48);
}

.category-tile span {
  color: #fff;
  font-size: 22px;
  font-weight: 900;
}

.category-tile strong {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.split-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 30px;
  align-items: start;
}

.ranking-list,
.ranking-page-grid {
  display: grid;
  gap: 14px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 126px 1fr;
  gap: 14px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.compact-card:hover {
  transform: translateY(-4px);
  border-color: rgba(125, 211, 252, 0.46);
}

.compact-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: #020617;
}

.compact-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-num {
  left: 8px;
  right: auto;
  top: 8px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.compact-card h3 {
  margin: 2px 0 8px;
  color: #fff;
  font-size: 16px;
  line-height: 1.35;
}

.compact-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.site-footer {
  margin-top: 40px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), #020617);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.2fr;
  gap: 28px;
  padding: 46px 0;
}

.site-footer h3,
.site-footer strong {
  color: #fff;
}

.site-footer p,
.site-footer li {
  color: var(--muted);
  line-height: 1.8;
  font-size: 14px;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a:hover {
  color: var(--accent);
}

.inner-page {
  min-height: 70vh;
}

.page-hero,
.detail-hero,
.detail-content,
.player-section,
.filter-panel,
.category-overview-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(30, 41, 59, 0.58));
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.22);
}

.page-hero {
  padding: 42px;
  margin-bottom: 30px;
}

.small-hero {
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
  color: #94a3b8;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--accent);
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  padding: 18px;
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.category-thumbs img {
  width: 100%;
  aspect-ratio: 1 / 0.76;
  object-fit: cover;
  border-radius: 10px;
  background: #020617;
}

.category-overview-card h2 {
  margin: 4px 0 10px;
  color: #fff;
}

.category-overview-card p {
  color: var(--muted);
  line-height: 1.7;
}

.text-link {
  color: var(--accent);
  font-weight: 800;
}

.filter-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  margin-bottom: 24px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  color: #cbd5e1;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.54);
  padding: 8px 13px;
}

.filter-chip:hover,
.filter-chip.is-active {
  color: #fff;
  border-color: rgba(125, 211, 252, 0.54);
  background: rgba(2, 132, 199, 0.38);
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 34px;
  padding: 28px;
  margin-bottom: 26px;
}

.detail-poster {
  border-radius: 22px;
  overflow: hidden;
  background: #020617;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.32);
}

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

.detail-intro {
  align-self: center;
}

.detail-meta {
  margin: 18px 0;
  color: #cbd5e1;
}

.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.55);
  border: 1px solid rgba(51, 65, 85, 0.64);
}

.player-section {
  padding: 20px;
  margin-bottom: 28px;
}

.video-player {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
  box-shadow: 0 26px 68px rgba(0, 0, 0, 0.32);
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #fff;
  border: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.62));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-start span {
  width: 86px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  box-shadow: 0 18px 38px rgba(14, 165, 233, 0.32);
  font-size: 36px;
}

.player-start strong {
  font-size: 20px;
}

.video-player.is-playing .player-start {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-content {
  display: grid;
  gap: 18px;
  padding: 30px;
}

.detail-content h2 {
  margin: 0 0 10px;
  color: #fff;
}

.detail-content p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
}

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

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

  .split-section,
  .detail-hero {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 820px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 84px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.44);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-link {
    padding: 13px 14px;
    border-bottom: 0;
    border-radius: 12px;
  }

  .nav-link:hover,
  .nav-link.is-active {
    background: rgba(2, 132, 199, 0.18);
  }

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

  .hero-content {
    padding-bottom: 92px;
  }

  .hero-arrow {
    display: none;
  }

  .search-panel,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .side-grid,
  .category-grid,
  .category-overview-grid,
  .ranking-page-grid,
  .search-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

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

  .brand small {
    display: none;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero p {
    font-size: 15px;
  }

  .hero-actions,
  .search-form,
  .section-head {
    flex-direction: column;
    display: flex;
    align-items: stretch;
  }

  .movie-grid,
  .side-grid,
  .category-grid,
  .category-overview-grid,
  .ranking-page-grid,
  .search-results {
    grid-template-columns: 1fr;
  }

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

  .page-hero,
  .detail-hero,
  .detail-content {
    padding: 22px;
  }

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