:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-deep: #020617;
  --panel: rgba(30, 41, 59, 0.68);
  --panel-solid: #1e293b;
  --panel-soft: rgba(15, 23, 42, 0.72);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #fbbf24;
  --accent-dark: #d97706;
  --cyan: #22d3ee;
  --green: #34d399;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 18px;
  --radius-small: 12px;
  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;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(251, 191, 36, 0.16), transparent 30%),
    radial-gradient(circle at 85% 12%, rgba(34, 211, 238, 0.12), transparent 28%),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #111827 100%);
  color: var(--text);
}

body,
button,
input,
select,
textarea {
  font: inherit;
}

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

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

button,
select,
input {
  border: 0;
}

button {
  cursor: pointer;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(2, 6, 23, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-icon,
.footer-logo span {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #f59e0b);
  color: #0f172a;
  font-size: 13px;
  box-shadow: 0 12px 26px rgba(251, 191, 36, 0.28);
}

.brand-text {
  color: var(--accent);
  font-size: 20px;
}

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

.nav-link,
.mobile-link {
  color: var(--muted-strong);
  font-weight: 600;
  transition: color 0.2s ease, transform 0.2s ease;
}

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

.nav-link:hover {
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.72);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

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

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

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

.mobile-link {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.hero-section {
  position: relative;
  overflow: hidden;
  padding: 54px 0 70px;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.35), rgba(15, 23, 42, 0.2));
}

.hero-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  filter: blur(68px);
  opacity: 0.46;
  pointer-events: none;
}

.hero-glow-one {
  left: -120px;
  top: 40px;
  background: rgba(251, 191, 36, 0.18);
}

.hero-glow-two {
  right: -130px;
  bottom: -120px;
  background: rgba(34, 211, 238, 0.18);
}

.hero-shell {
  position: relative;
  z-index: 2;
}

.hero-slider {
  position: relative;
  min-height: 520px;
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.82));
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  align-items: center;
  gap: 40px;
  padding: clamp(28px, 5vw, 64px);
  opacity: 0;
  visibility: hidden;
  transform: translateX(40px);
  transition: opacity 0.55s ease, transform 0.55s ease, visibility 0.55s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.hero-copy {
  position: relative;
  z-index: 3;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 13px;
  margin-bottom: 16px;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
}

.hero-copy h1,
.page-hero h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-summary,
.page-hero p {
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.8;
  max-width: 760px;
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.hero-tags span,
.tag-list span,
.genre-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.16);
  color: var(--muted-strong);
  font-size: 13px;
  padding: 7px 12px;
}

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

.button,
.search-form button,
.quick-filters button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  padding: 0 18px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button:hover,
.search-form button:hover,
.quick-filters button:hover {
  transform: translateY(-2px);
}

.button.primary,
.search-form button {
  background: var(--accent);
  color: #111827;
  box-shadow: 0 18px 38px rgba(251, 191, 36, 0.22);
}

.button.secondary {
  background: rgba(30, 41, 59, 0.88);
  color: var(--text);
  border: 1px solid var(--line);
}

.button.ghost,
.quick-filters button {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(251, 191, 36, 0.36);
}

.hero-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  border-radius: 24px;
  overflow: hidden;
  transform: rotate(2deg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-poster img,
.card-cover img,
.poster-card img,
.category-covers img,
.rank-lead img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

.poster-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.62));
}

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

.hero-dot {
  width: 36px;
  height: 5px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.45);
  transition: width 0.2s ease, background 0.2s ease;
}

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

.search-panel {
  margin-top: -34px;
  position: relative;
  z-index: 4;
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-panel h2,
.section-head h2,
.text-page h2,
.side-card h2,
.info-block h2 {
  margin: 0;
  color: var(--text);
}

.search-panel p,
.section-head p,
.text-page p,
.info-block p,
.card-body p,
.category-card p,
.side-card p {
  color: var(--muted);
  line-height: 1.75;
}

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

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

.search-form input:focus,
.search-form select:focus,
.page-filter:focus {
  border-color: rgba(251, 191, 36, 0.58);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.08);
}

.quick-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.search-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
}

.search-results:empty {
  display: none;
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 44px auto;
}

.category-strip a,
.category-card,
.side-card,
.detail-panel,
.text-page article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.category-strip a {
  padding: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.category-strip a:hover,
.category-card:hover,
.movie-card:hover,
.rank-lead:hover {
  transform: translateY(-5px);
  border-color: rgba(251, 191, 36, 0.46);
}

.category-strip span {
  display: block;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}

.category-strip small {
  color: var(--muted);
  line-height: 1.55;
}

.section-block {
  margin: 52px 0;
}

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

.section-head h2 {
  font-size: 28px;
}

.section-more {
  color: var(--accent);
  font-weight: 800;
}

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

.large-grid {
  margin-bottom: 58px;
}

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  background: var(--panel);
  border: 1px solid rgba(148, 163, 184, 0.14);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.34);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(2, 6, 23, 0.82));
  opacity: 0.75;
}

.card-cover img {
  transition: transform 0.5s ease;
}

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

.card-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.78);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.rank-badge {
  left: 10px;
  right: auto;
  color: #0f172a;
  background: var(--accent);
}

.play-circle {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #0f172a;
  background: rgba(251, 191, 36, 0.92);
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
  min-height: 43px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.movie-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

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

.genre-pill {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.page-hero {
  padding: 58px 0 42px;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.72), rgba(15, 23, 42, 0.1));
}

.page-hero.compact h1 {
  font-size: clamp(34px, 4vw, 56px);
}

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  margin-bottom: 16px;
  font-size: 14px;
}

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

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 36px auto 60px;
}

.category-card {
  overflow: hidden;
  padding-bottom: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  aspect-ratio: 4 / 1.35;
  overflow: hidden;
  margin-bottom: 20px;
  background: #0f172a;
}

.category-card h2,
.category-card p {
  margin-left: 24px;
  margin-right: 24px;
}

.category-card h2 {
  margin-top: 0;
  margin-bottom: 8px;
}

.page-filter-wrap {
  margin: 30px auto 20px;
}

.is-hidden {
  display: none !important;
}

.rank-leads {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 34px auto 34px;
}

.rank-lead {
  position: relative;
  min-height: 280px;
  display: flex;
  justify-content: flex-end;
  flex-direction: column;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111827;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-lead img {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.62;
}

.rank-lead::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.88));
}

.rank-lead strong,
.rank-lead small,
.rank-number {
  position: relative;
  z-index: 2;
}

.rank-number {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  color: #0f172a;
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 12px;
}

.rank-lead strong {
  font-size: 24px;
}

.rank-lead small {
  color: var(--muted-strong);
  margin-top: 8px;
}

.detail-top {
  padding: 34px 0 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 26px;
  align-items: start;
}

.player-shell {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: #020617;
  box-shadow: var(--shadow);
}

.video-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.72));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 74px;
  height: 74px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent);
  color: #0f172a;
  font-size: 30px;
  box-shadow: 0 18px 45px rgba(251, 191, 36, 0.28);
}

.play-text {
  font-weight: 800;
  letter-spacing: 0.06em;
}

.player-status {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 4;
  color: var(--muted-strong);
  font-size: 14px;
  pointer-events: none;
}

.detail-panel {
  margin-top: 22px;
  padding: 28px;
}

.detail-panel h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.14;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.meta-row span {
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--muted-strong);
  font-size: 14px;
}

.info-block {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 22px;
}

.info-block p {
  font-size: 16px;
  margin-bottom: 0;
}

.review-box p {
  padding: 18px;
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.4);
}

.detail-side {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 18px;
}

.side-card {
  padding: 20px;
}

.poster-card {
  overflow: hidden;
  padding: 0;
}

.poster-card img {
  aspect-ratio: 2 / 3;
}

.side-button {
  width: 100%;
  background: rgba(251, 191, 36, 0.12);
  color: var(--accent);
  border: 1px solid rgba(251, 191, 36, 0.28);
}

.related-block {
  padding-bottom: 56px;
}

.text-page {
  display: grid;
  gap: 20px;
  margin: 34px auto 64px;
}

.text-page article {
  padding: 28px;
}

.site-footer {
  margin-top: 44px;
  background: rgba(2, 6, 23, 0.92);
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 34px;
  padding: 42px 0;
}

.footer-logo {
  color: var(--text);
  font-size: 18px;
  margin-bottom: 14px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 16px;
}

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

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

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

.footer-bottom {
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 18px 16px 22px;
}

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

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

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

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

  .hero-slider {
    min-height: 760px;
  }

  .hero-slide {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 26px;
  }

  .hero-poster {
    width: min(320px, 75vw);
    margin: 0 auto;
    transform: none;
  }

  .search-form {
    grid-template-columns: 1fr;
  }

  .category-grid,
  .rank-leads,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }
}

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

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

  .hero-section {
    padding-top: 24px;
  }

  .hero-slider {
    min-height: 700px;
    border-radius: 18px;
  }

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

  .hero-summary,
  .page-hero p {
    font-size: 16px;
  }

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

  .button {
    width: 100%;
  }

  .search-panel {
    padding: 20px;
  }

  .category-strip,
  .movie-grid,
  .search-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .card-body {
    padding: 12px;
  }

  .card-body h3 {
    font-size: 14px;
    min-height: 38px;
  }

  .card-body p {
    display: none;
  }

  .detail-panel,
  .text-page article {
    padding: 20px;
  }
}
