:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #f97316;
  --accent-light: #fb923c;
  --amber: #f59e0b;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 8%, rgba(249, 115, 22, 0.22), transparent 32rem),
    radial-gradient(circle at 86% 0%, rgba(245, 158, 11, 0.14), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

img {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.site-nav {
  max-width: 1280px;
  min-height: 68px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--accent-light), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--amber));
  box-shadow: 0 10px 30px rgba(249, 115, 22, 0.28);
  font-size: 15px;
}

.nav-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--soft);
  font-size: 14px;
  font-weight: 650;
  transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(249, 115, 22, 0.88);
}

.header-search input,
.big-search input,
.inline-filter input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  color: #fff;
  background: rgba(15, 23, 42, 0.92);
  transition: 0.2s ease;
}

.header-search input {
  width: 260px;
  padding: 11px 14px;
}

.header-search input:focus,
.big-search input:focus,
.inline-filter input:focus {
  border-color: rgba(249, 115, 22, 0.7);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.14);
}

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

main,
.page-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px 68px;
}

.hero-carousel {
  position: relative;
  max-width: none;
  min-height: calc(100vh - 68px);
  margin: 0 calc(50% - 50vw) 32px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.05) contrast(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.82) 38%, rgba(2, 6, 23, 0.25) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.08) 48%, rgba(2, 6, 23, 0.44) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 44px));
  min-height: calc(100vh - 68px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 380px;
  align-items: center;
  gap: 54px;
  padding: 58px 0 88px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-light);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 82px);
  line-height: 0.96;
  letter-spacing: -0.055em;
  text-shadow: 0 16px 40px rgba(0, 0, 0, 0.38);
}

.hero-lead {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--soft);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 24px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(249, 115, 22, 0.24);
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.12);
  font-size: 12px;
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: 0.22s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--amber));
  box-shadow: 0 18px 44px rgba(249, 115, 22, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 54px rgba(249, 115, 22, 0.38);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.6);
}

.btn-ghost:hover {
  border-color: rgba(249, 115, 22, 0.55);
  background: rgba(249, 115, 22, 0.13);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: var(--shadow);
  transform: rotate(1.2deg);
}

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

.hero-poster span {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.78);
  font-size: 13px;
  font-weight: 800;
}

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

.hero-dot {
  width: 28px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.hero-dot.active {
  width: 46px;
  background: linear-gradient(90deg, var(--accent), var(--amber));
}

.search-band,
.page-hero,
.detail-hero,
.player-section,
.content-section,
.site-footer {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.62));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.search-band {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(300px, 0.76fr);
  align-items: center;
  gap: 28px;
  margin: 34px 0;
  padding: 28px;
  border-radius: var(--radius);
}

.search-band h2,
.section-head h2,
.player-section h2,
.detail-text h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
}

.search-band p,
.section-head p,
.page-hero p,
.category-tile p,
.site-footer p,
.detail-line,
.detail-text p,
.movie-desc {
  color: var(--muted);
  line-height: 1.78;
}

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

.big-search input,
.inline-filter input {
  min-height: 50px;
  padding: 0 16px;
}

.big-search button,
.inline-filter button {
  min-height: 50px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--amber));
  font-weight: 800;
}

.content-section {
  margin: 34px 0;
  padding: 28px;
  border-radius: var(--radius);
}

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

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

.section-more {
  color: #fed7aa;
  font-weight: 800;
  white-space: nowrap;
}

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

.category-tile {
  min-height: 190px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: radial-gradient(circle at top right, rgba(249, 115, 22, 0.18), transparent 56%), rgba(30, 41, 59, 0.6);
  transition: 0.22s ease;
}

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

.category-title {
  display: inline-flex;
  margin-bottom: 10px;
  color: #fff;
  font-size: 20px;
  font-weight: 850;
}

.category-samples {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.category-samples a {
  overflow: hidden;
  color: var(--soft);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-samples a:hover {
  color: var(--accent-light);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.78);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(249, 115, 22, 0.48);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.26);
}

.poster-link,
.wide-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.movie-card:hover .poster-link img,
.movie-card:hover .wide-cover img {
  transform: scale(1.06);
}

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

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(249, 115, 22, 0.86);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.84);
  transition: 0.22s ease;
}

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

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  border-radius: 9px;
  color: #fff;
  background: rgba(2, 6, 23, 0.72);
  font-size: 12px;
  font-weight: 850;
}

.rank-badge {
  left: 10px;
  right: auto;
  background: linear-gradient(135deg, var(--accent), var(--amber));
}

.card-body {
  padding: 14px;
}

.movie-title {
  display: block;
  overflow: hidden;
  color: #fff;
  font-weight: 850;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-title:hover {
  color: var(--accent-light);
}

.movie-meta {
  margin: 7px 0;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.movie-desc {
  min-height: 48px;
  margin: 0 0 12px;
  display: -webkit-box;
  overflow: hidden;
  font-size: 13px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.split-section > div,
.rank-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.62));
}

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

.movie-card-wide {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr);
  min-height: 116px;
}

.movie-card-wide .wide-cover img {
  width: 100%;
  height: 100%;
  min-height: 116px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.wide-body {
  padding: 14px 14px 12px;
}

.movie-card-wide .movie-desc {
  min-height: 0;
}

.page-main {
  padding-top: 34px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 44px;
  border-radius: var(--radius);
}

.page-hero::after,
.detail-hero::after {
  content: "";
  position: absolute;
  inset: auto -12% -48% auto;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: rgba(249, 115, 22, 0.16);
  filter: blur(18px);
}

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

.page-hero p {
  max-width: 820px;
  margin: 16px 0 0;
  font-size: 17px;
}

.slim-hero {
  min-height: 230px;
}

.inline-filter {
  display: flex;
  max-width: 760px;
  gap: 12px;
  margin-top: 26px;
}

.empty-state {
  padding: 34px;
  text-align: center;
  color: var(--muted);
}

.category-block {
  margin-top: 24px;
}

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

.detail-main {
  max-width: 1180px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  padding: 34px;
  border-radius: var(--radius);
}

.detail-cover {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

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

.detail-info {
  position: relative;
  z-index: 2;
  align-self: center;
}

.detail-info h1 {
  font-size: clamp(36px, 5vw, 72px);
}

.detail-line {
  max-width: 760px;
  margin: 22px 0 0;
  font-size: 19px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 12px;
  color: var(--soft);
  background: rgba(30, 41, 59, 0.7);
}

.detail-tags {
  margin-bottom: 26px;
}

.player-section {
  margin: 34px 0;
  padding: 28px;
  border-radius: var(--radius);
}

.player-section h2 {
  margin-bottom: 18px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at center, rgba(249, 115, 22, 0.2), rgba(2, 6, 23, 0.72));
  font-size: 16px;
  font-weight: 850;
  transition: opacity 0.22s ease;
}

.player-icon {
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--amber));
  box-shadow: 0 20px 54px rgba(249, 115, 22, 0.34);
  font-size: 30px;
}

.player-shell.is-playing .player-overlay {
  opacity: 0;
  pointer-events: none;
}

.detail-text {
  display: grid;
  gap: 14px;
}

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

.site-footer {
  max-width: 1280px;
  margin: 18px auto 0;
  padding: 30px 22px;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 28px 28px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 34px;
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.site-footer p {
  max-width: 440px;
  margin: 12px 0 0;
}

.footer-links {
  display: grid;
  gap: 8px;
}

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

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

.footer-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: #64748b;
  font-size: 13px;
  text-align: center;
}

[hidden] {
  display: none !important;
}

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

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

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

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

@media (max-width: 860px) {
  .site-nav {
    flex-wrap: wrap;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-panel {
    display: none;
    width: 100%;
    flex: 0 0 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .nav-panel.open {
    display: flex;
  }

  .nav-links {
    align-items: stretch;
    flex-direction: column;
  }

  .header-search input {
    width: 100%;
  }

  .hero-content,
  .detail-hero,
  .footer-grid,
  .search-band {
    grid-template-columns: 1fr;
  }

  .hero-content {
    min-height: 720px;
    padding-top: 42px;
  }

  .hero-poster {
    max-width: 260px;
    margin: 0 auto;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: clamp(34px, 12vw, 54px);
  }

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

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

  .detail-cover {
    max-width: 300px;
  }
}

@media (max-width: 560px) {
  main,
  .page-main {
    padding-right: 14px;
    padding-left: 14px;
  }

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

  .hero-content {
    width: calc(100% - 28px);
  }

  .content-section,
  .page-hero,
  .detail-hero,
  .player-section,
  .split-section > div,
  .rank-panel,
  .search-band {
    padding: 20px;
    border-radius: 18px;
  }

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

  .movie-card-wide {
    grid-template-columns: 116px minmax(0, 1fr);
  }

  .movie-card-wide .wide-cover img {
    min-height: 112px;
  }

  .big-search,
  .inline-filter {
    flex-direction: column;
  }
}
