:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #e2e8f0;
  --dark: #020617;
  --dark-2: #0f172a;
  --accent: #f97316;
  --accent-2: #ea580c;
  --warm: #fff7ed;
  --radius: 22px;
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.96);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 38px rgba(2, 6, 23, 0.24);
}

.header-inner {
  max-width: 1280px;
  min-height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), #f59e0b);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.35);
  font-size: 14px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

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

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

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 270px;
}

.top-search input,
.catalog-search input,
.inline-search input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  border-radius: 14px;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.catalog-search input:focus,
.inline-search input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.16);
}

.top-search button,
.catalog-search button {
  border: 0;
  color: #ffffff;
  background: var(--accent);
  border-radius: 14px;
  padding: 11px 18px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.top-search button:hover,
.catalog-search button:hover,
.primary-button:hover {
  background: var(--accent-2);
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  margin-left: auto;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
}

.hero {
  background: var(--dark);
}

.hero-shell {
  position: relative;
  min-height: 640px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.55s ease, transform 0.75s ease;
  background: radial-gradient(circle at 72% 30%, rgba(249, 115, 22, 0.44), transparent 35%), linear-gradient(135deg, #020617, #1e293b 55%, #431407);
}

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

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img,
.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.hero-media:after,
.detail-backdrop:after,
.poster:before,
.rank-cover:before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(249, 115, 22, 0.58));
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.65), rgba(15, 23, 42, 0.2));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 640px;
  margin: 0 auto;
  padding: 115px 24px 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
}

.hero-kicker,
.eyebrow {
  color: #fed7aa;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content h1,
.catalog-hero h1,
.detail-info h1 {
  max-width: 820px;
  margin: 14px 0 18px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 26px;
  color: #e2e8f0;
  font-size: clamp(18px, 2vw, 23px);
}

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

.hero-tags span,
.tag-row span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.13);
  color: #c2410c;
  padding: 5px 11px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.primary-button,
.ghost-button,
.section-link,
.rank-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  font-weight: 850;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: var(--accent);
  padding: 14px 24px;
  box-shadow: 0 16px 32px rgba(249, 115, 22, 0.32);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 13px 22px;
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.55);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.content-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 74px 24px;
}

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

.section-title h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.section-title p {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
}

.section-link {
  color: var(--accent-2);
  white-space: nowrap;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.movie-card-large {
  grid-column: span 2;
}

.poster,
.rank-cover,
.detail-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, rgba(251, 146, 60, 0.96), transparent 35%), linear-gradient(135deg, #0f172a, #431407);
}

.poster {
  aspect-ratio: 16 / 10;
}

.movie-card-large .poster {
  aspect-ratio: 16 / 9;
}

.poster img,
.rank-cover img,
.detail-poster img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.poster-shade {
  position: absolute;
  z-index: 2;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.62), transparent 55%);
}

.card-badge {
  position: absolute;
  z-index: 3;
  top: 14px;
  left: 14px;
  color: #ffffff;
  background: var(--accent);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 850;
}

.play-dot {
  position: absolute;
  z-index: 3;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.card-body {
  padding: 20px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.card-body h2,
.card-body h3,
.rank-info h2 {
  margin: 9px 0 8px;
  font-size: 21px;
  line-height: 1.25;
}

.card-body h2 a:hover,
.card-body h3 a:hover,
.rank-info h2 a:hover {
  color: var(--accent-2);
}

.card-body p,
.rank-info p {
  margin: 0 0 16px;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wide-band {
  margin: 34px 0;
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
  border-top: 1px solid #fed7aa;
  border-bottom: 1px solid #fed7aa;
}

.band-inner {
  padding-top: 70px;
  padding-bottom: 70px;
}

.catalog-hero {
  color: #ffffff;
  background: radial-gradient(circle at 75% 15%, rgba(249, 115, 22, 0.45), transparent 30%), linear-gradient(135deg, #020617, #111827 55%, #431407);
}

.catalog-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 86px 24px;
}

.slim-hero .catalog-hero-inner {
  padding-top: 62px;
  padding-bottom: 62px;
}

.catalog-hero p {
  max-width: 760px;
  color: #e2e8f0;
  font-size: 18px;
}

.catalog-search {
  display: flex;
  max-width: 700px;
  gap: 12px;
  margin-top: 26px;
}

.inline-search {
  max-width: 520px;
  margin: 0 0 24px;
}

.inline-search input {
  color: var(--ink);
  background: #ffffff;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.filter-bar button {
  border: 1px solid var(--soft);
  color: var(--ink);
  background: #ffffff;
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 850;
  cursor: pointer;
}

.filter-bar button.is-active,
.filter-bar button:hover {
  color: #ffffff;
  background: var(--accent);
  border-color: var(--accent);
}

.empty-state {
  padding: 30px;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--soft);
  border-radius: var(--radius);
}

.rank-list {
  display: grid;
  gap: 16px;
}

.rank-card {
  display: grid;
  grid-template-columns: 78px 150px 1fr auto;
  gap: 22px;
  align-items: center;
  padding: 18px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
}

.rank-number {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), #f59e0b);
  border-radius: 18px;
  font-size: 24px;
  font-weight: 900;
}

.rank-cover {
  aspect-ratio: 16 / 10;
  border-radius: 18px;
}

.rank-action {
  color: #ffffff;
  background: var(--dark-2);
  padding: 10px 18px;
}

.rank-action:hover {
  background: var(--accent);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #020617;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  filter: blur(1px);
}

.detail-hero:after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.25));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 560px;
  margin: 0 auto;
  padding: 72px 24px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 42px;
  align-items: center;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.detail-info .lead-text {
  max-width: 760px;
  color: #e2e8f0;
  font-size: 21px;
}

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

.main-column,
.side-column {
  display: grid;
  gap: 26px;
}

.player-section,
.text-panel,
.side-panel {
  padding: 26px;
  background: #ffffff;
  border-radius: var(--radius);
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.08);
}

.player-section h2,
.text-panel h2,
.side-panel h2 {
  margin: 0 0 18px;
  font-size: 26px;
}

.player-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: 20px;
}

.video-player {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(249, 115, 22, 0.3), rgba(2, 6, 23, 0.78));
  cursor: pointer;
}

.player-cover[hidden] {
  display: none;
}

.player-cover span {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 4px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 18px 34px rgba(249, 115, 22, 0.42);
  font-size: 28px;
}

.player-cover strong {
  font-size: 24px;
}

.text-panel p {
  margin: 0;
  color: #334155;
  font-size: 17px;
}

.movie-facts {
  margin: 0;
}

.movie-facts div {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--soft);
}

.movie-facts div:last-child {
  border-bottom: 0;
}

.movie-facts dt {
  color: var(--muted);
  font-weight: 800;
}

.movie-facts dd {
  margin: 0;
}

.site-footer {
  color: #cbd5e1;
  background: #020617;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 24px;
  display: grid;
  grid-template-columns: 1.3fr repeat(3, 1fr);
  gap: 32px;
}

.footer-logo {
  color: #ffffff;
}

.footer-brand p {
  max-width: 340px;
  color: #94a3b8;
}

.footer-links {
  display: grid;
  gap: 9px;
  align-content: start;
}

.footer-links h2 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 17px;
}

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

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 22px 24px 34px;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

@media (max-width: 1100px) {
  .top-search {
    display: none;
  }

  .movie-grid,
  .compact-grid,
  .catalog-grid,
  .split-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 820px) {
  .header-inner {
    min-height: 64px;
  }

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

  .main-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 24px 20px;
    background: rgba(15, 23, 42, 0.98);
    border-top: 1px solid rgba(148, 163, 184, 0.18);
  }

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

  .nav-link {
    padding: 12px 0;
  }

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

  .hero-content {
    padding-top: 88px;
    padding-bottom: 88px;
  }

  .hero-arrow {
    display: none;
  }

  .detail-hero-inner {
    grid-template-columns: 1fr;
  }

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

  .rank-card {
    grid-template-columns: 58px 1fr;
  }

  .rank-cover,
  .rank-action {
    display: none;
  }
}

@media (max-width: 620px) {
  .header-inner,
  .content-section,
  .catalog-hero-inner,
  .detail-hero-inner,
  .footer-inner,
  .footer-bottom {
    padding-left: 16px;
    padding-right: 16px;
  }

  .logo {
    font-size: 18px;
  }

  .movie-grid,
  .compact-grid,
  .catalog-grid,
  .split-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-large {
    grid-column: auto;
  }

  .section-title,
  .catalog-search,
  .hero-actions,
  .detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-search {
    display: grid;
  }

  .hero-content h1,
  .catalog-hero h1,
  .detail-info h1 {
    font-size: 38px;
  }

  .player-section,
  .text-panel,
  .side-panel {
    padding: 20px;
  }
}
