:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.82);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #f97316;
  --accent-strong: #ea580c;
  --cyan: #22d3ee;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, 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(249, 115, 22, 0.17), transparent 28rem),
    radial-gradient(circle at 90% 10%, rgba(34, 211, 238, 0.12), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(18px);
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #facc15);
  color: #111827;
  font-size: 14px;
  box-shadow: 0 14px 28px rgba(249, 115, 22, 0.32);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  padding: 10px 14px;
  color: #cbd5e1;
  border-radius: 999px;
  transition: 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: #ffffff;
  background: rgba(249, 115, 22, 0.16);
}

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

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: currentColor;
  border-radius: 99px;
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  background-position: center;
  background-size: cover;
  transition: opacity 0.75s ease, transform 1.2s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 680px;
  display: flex;
  align-items: flex-end;
  padding: 96px 0 82px;
}

.hero-copy {
  width: min(720px, 100%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  margin-bottom: 18px;
  border-radius: 999px;
  color: #fff7ed;
  background: rgba(249, 115, 22, 0.92);
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 16px 30px rgba(249, 115, 22, 0.28);
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 20px 0 0;
  max-width: 680px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta {
  margin-top: 22px;
}

.hero-meta span,
.detail-meta span,
.tag-row span,
.category-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 10px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.14);
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
}

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

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

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(249, 115, 22, 0.3);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--accent-strong);
}

.btn-ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.64);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.48);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
  transform: translateY(-2px);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.hero-dots button.is-active {
  width: 28px;
  background: var(--accent);
}

.section {
  padding: 64px 0;
}

.section-tight {
  padding: 40px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
}

.section-desc {
  margin: 10px 0 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.8;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 16px;
  margin: 28px 0;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
}

.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  color: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 15px;
  outline: none;
  background: rgba(2, 6, 23, 0.76);
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: rgba(249, 115, 22, 0.7);
}

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

.category-card {
  min-height: 150px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(249, 115, 22, 0.14), transparent 46%),
    rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.category-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(249, 115, 22, 0.48);
}

.category-card h2,
.category-card h3 {
  margin: 0;
  font-size: 22px;
}

.category-card p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--bg-card);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(249, 115, 22, 0.5);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.34);
}

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 35% 20%, rgba(249, 115, 22, 0.36), transparent 38%),
    linear-gradient(135deg, #111827, #020617);
}

.poster-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.72));
}

.poster-badge,
.poster-type {
  position: absolute;
  top: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.poster-badge {
  left: 12px;
  background: rgba(249, 115, 22, 0.9);
}

.poster-type {
  right: 12px;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

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

.movie-card h3 {
  margin: 0;
  min-height: 50px;
  font-size: 17px;
  line-height: 1.45;
}

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

.movie-card p {
  margin: 10px 0 13px;
  min-height: 64px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.tag-row span {
  min-height: 26px;
  padding: 4px 8px;
  font-size: 12px;
}

.rank-shell {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 24px;
}

.rank-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rank-item {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(249, 115, 22, 0.48);
}

.rank-link {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  color: #ffffff;
  background: rgba(249, 115, 22, 0.88);
  font-weight: 900;
}

.rank-title {
  display: block;
  font-weight: 800;
}

.rank-meta {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.aside-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.aside-card h2,
.aside-card h3 {
  margin: 0 0 14px;
  font-size: 22px;
}

.aside-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

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

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

.detail-hero {
  padding: 38px 0 64px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 32px 88px rgba(0, 0, 0, 0.5);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(249, 115, 22, 0.22), rgba(0, 0, 0, 0.76));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button-core {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.94);
  box-shadow: 0 22px 48px rgba(249, 115, 22, 0.34);
  font-size: 34px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  margin-top: 34px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 30% 10%, rgba(249, 115, 22, 0.28), transparent 40%),
    #111827;
  box-shadow: var(--shadow);
}

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

.detail-content h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.1;
}

.detail-meta {
  margin: 18px 0 22px;
}

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

.content-block {
  margin-top: 26px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.62);
}

.content-block h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.category-page-head {
  padding: 52px 0 20px;
}

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

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

.footer-logo {
  margin-bottom: 12px;
}

.site-footer p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.footer-links a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbd5e1;
}

.hidden-by-search {
  display: none !important;
}

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

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

@media (max-width: 860px) {
  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

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

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

  .hero-control {
    display: none;
  }

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

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

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

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

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

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

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

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

  .btn {
    width: 100%;
  }

  .section {
    padding: 46px 0;
  }

  .section-head {
    display: block;
  }

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

  .movie-card-body {
    padding: 13px;
  }

  .movie-card h3 {
    min-height: 46px;
    font-size: 15px;
  }

  .movie-card p {
    display: none;
  }

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

  .rank-link {
    grid-template-columns: 44px 1fr;
  }

  .footer-grid {
    display: block;
  }

  .footer-links {
    margin-top: 22px;
  }
}
