:root {
  color-scheme: dark;
  --bg: #0f172a;
  --panel: rgba(30, 41, 59, 0.82);
  --panel-strong: #1e293b;
  --muted: #94a3b8;
  --text: #ffffff;
  --line: rgba(148, 163, 184, 0.18);
  --amber: #f59e0b;
  --orange: #f97316;
  --red: #ef4444;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 32rem),
    radial-gradient(circle at top right, rgba(239, 68, 68, 0.12), transparent 28rem),
    linear-gradient(180deg, #0f172a 0%, #111827 48%, #0f172a 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

img {
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

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

.header-inner {
  width: min(1280px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.logo-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.38);
}

.logo-text {
  font-size: 1.35rem;
}

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

.nav-link {
  padding: 10px 13px;
  border-radius: 999px;
  color: #cbd5e1;
  font-weight: 650;
  transition: 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background: rgba(245, 158, 11, 0.14);
}

.header-search,
.mobile-search,
.big-search {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.62);
  border-radius: 999px;
  overflow: hidden;
}

.header-search input,
.mobile-search input,
.big-search input,
.filter-panel input,
.filter-panel select {
  color: white;
  background: transparent;
  border: 0;
  outline: 0;
}

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

.header-search button,
.mobile-search button,
.big-search button {
  border: 0;
  color: white;
  padding: 11px 18px;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  font-weight: 800;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: white;
  border-radius: 2px;
}

.mobile-panel {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.92);
  border-radius: 20px;
}

.mobile-panel.is-open {
  display: block;
}

.mobile-nav,
.mobile-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.mobile-cats a,
.quick-links a,
.footer-links a,
.text-link {
  color: #fbbf24;
}

.hero-carousel {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.8s ease;
  pointer-events: none;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(15, 23, 42, 0.82) 38%, rgba(15, 23, 42, 0.32) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 1), transparent 48%),
    var(--hero-image) center / cover no-repeat;
  filter: saturate(1.08);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  min-height: 680px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 56px;
  padding: 72px 0 92px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fbbf24;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 780px;
  margin: 18px 0;
  font-size: clamp(2.8rem, 8vw, 6.4rem);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 760px;
  color: #cbd5e1;
  font-size: clamp(1rem, 2.4vw, 1.28rem);
  line-height: 1.85;
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta {
  margin: 24px 0 14px;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  padding: 6px 10px;
}

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

.hero-tags span,
.tag-row span {
  color: #fed7aa;
  border: 1px solid rgba(251, 191, 36, 0.25);
  background: rgba(245, 158, 11, 0.12);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.86rem;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 850;
  transition: 0.25s ease;
}

.primary-btn {
  color: white;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 16px 34px rgba(249, 115, 22, 0.32);
}

.ghost-btn {
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
}

.primary-btn:hover,
.ghost-btn:hover,
.movie-card:hover,
.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-3px);
}

.hero-poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

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

.hero-poster span,
.card-play,
.big-play {
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72px;
  height: 72px;
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.38);
}

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

.hero-dots button {
  width: 38px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.hero-dots button.active {
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.quick-search-section,
.content-section,
.page-hero,
.movie-detail-hero,
.player-section {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.quick-search-section {
  transform: translateY(-36px);
  position: relative;
  z-index: 5;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 22px;
  background: rgba(30, 41, 59, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.big-search {
  max-width: 780px;
  margin: 0 auto 16px;
}

.big-search input {
  flex: 1;
  min-width: 0;
  padding: 17px 20px;
  font-size: 1rem;
}

.big-search button {
  padding: 17px 28px;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.quick-links a {
  padding: 9px 13px;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.1);
}

.content-section {
  padding: 34px 0;
}

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

.section-head h2 {
  margin: 8px 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
  font-weight: 900;
}

.section-head p {
  color: var(--muted);
  max-width: 720px;
}

.section-head > a {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.07);
  white-space: nowrap;
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  background: var(--panel-strong);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
  transition: 0.25s ease;
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.46;
  transition: transform 0.4s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile div {
  position: absolute;
  inset: auto 0 0 0;
  padding: 48px 20px 20px;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent);
}

.category-tile span {
  font-size: 1.32rem;
  font-weight: 900;
}

.category-tile p {
  color: #cbd5e1;
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-grid,
.rank-list,
.category-overview-grid {
  display: grid;
  gap: 18px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.72);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  transition: 0.25s ease;
}

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

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

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

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

.card-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.36);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: white;
  border-radius: 999px;
  background: linear-gradient(135deg, #ef4444, #f59e0b);
  font-weight: 900;
}

.card-body {
  padding: 15px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 850;
}

.card-body h3 a:hover {
  color: #fbbf24;
}

.card-line {
  min-height: 42px;
  color: #94a3b8;
  line-height: 1.55;
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  margin: 12px 0 10px;
  gap: 6px;
}

.card-meta span {
  padding: 4px 7px;
  font-size: 0.78rem;
}

.tag-row span {
  padding: 4px 8px;
  font-size: 0.76rem;
}

.page-hero,
.movie-detail-hero {
  margin-top: 32px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 34px;
  background:
    radial-gradient(circle at 15% 10%, rgba(245, 158, 11, 0.28), transparent 26rem),
    linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  box-shadow: var(--shadow);
}

.page-hero > div {
  padding: clamp(38px, 8vw, 82px);
}

.page-hero h1 {
  max-width: 880px;
  margin: 14px 0;
  font-size: clamp(2.3rem, 6vw, 5.2rem);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.page-hero p {
  color: #cbd5e1;
  max-width: 820px;
  font-size: 1.13rem;
  line-height: 1.8;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 26px;
  background: rgba(30, 41, 59, 0.72);
  transition: 0.25s ease;
}

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

.category-cover-stack img {
  aspect-ratio: 2 / 3;
  width: 100%;
  object-fit: cover;
  border-radius: 12px;
}

.category-overview-card h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 900;
}

.category-overview-card p {
  color: #94a3b8;
  line-height: 1.7;
}

.filter-panel {
  display: flex;
  gap: 12px;
  margin-bottom: 22px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.72);
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  padding: 0 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-panel input {
  flex: 1;
}

.filter-panel select {
  min-width: 170px;
}

.movie-detail-hero {
  position: relative;
  width: 100%;
  margin-top: 0;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  background: #020617;
}

.detail-bg-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.4)),
    linear-gradient(0deg, #0f172a 0%, transparent 50%),
    var(--detail-bg) center / cover no-repeat;
  filter: saturate(1.08);
}

.detail-layout {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 570px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  padding: 64px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #cbd5e1;
  margin-bottom: 18px;
}

.breadcrumb a {
  color: #fbbf24;
}

.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.045em;
}

.detail-one-line {
  max-width: 840px;
  color: #cbd5e1;
  font-size: 1.16rem;
  line-height: 1.8;
}

.detail-meta,
.large-tags {
  margin-top: 18px;
}

.player-section {
  padding: 36px 0 20px;
}

.player-shell {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: black;
}

.video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: black;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: white;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.24));
  cursor: pointer;
}

.player-overlay.is-hidden {
  display: none;
}

.big-play {
  width: 82px;
  height: 82px;
  font-size: 1.9rem;
  box-shadow: 0 20px 44px rgba(249, 115, 22, 0.36);
}

.player-overlay strong {
  max-width: min(680px, calc(100% - 40px));
  text-align: center;
  font-size: clamp(1.2rem, 3vw, 2.1rem);
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.story-card {
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  background: rgba(30, 41, 59, 0.72);
}

.story-card h2 {
  margin: 0 0 14px;
  font-size: 1.65rem;
  font-weight: 900;
}

.story-card p {
  color: #cbd5e1;
  line-height: 1.9;
  font-size: 1rem;
}

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

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 2fr;
  gap: 40px;
  padding: 38px 0;
}

.footer-inner p {
  color: var(--muted);
  margin-top: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
}

.footer-copy {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  color: #64748b;
  font-size: 0.92rem;
}

.empty-results {
  grid-column: 1 / -1;
  padding: 48px;
  text-align: center;
  color: #cbd5e1;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.72);
}

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

  .hero-content {
    grid-template-columns: 1fr 280px;
  }

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

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

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

  .menu-toggle {
    display: flex;
    margin-left: auto;
  }

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

  .hero-content {
    grid-template-columns: 1fr;
    align-items: end;
    gap: 24px;
    padding-top: 46px;
  }

  .hero-poster {
    width: 210px;
    margin-top: -16px;
  }

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

  .category-grid,
  .category-overview-grid,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .detail-poster {
    width: min(260px, 72vw);
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .header-inner {
    width: min(100% - 20px, 1280px);
  }

  .logo-text {
    font-size: 1.08rem;
  }

  .page-hero,
  .quick-search-section,
  .content-section,
  .player-section {
    width: min(100% - 20px, 1280px);
  }

  .hero-content {
    width: min(100% - 20px, 1280px);
  }

  .hero-copy h1 {
    font-size: clamp(2.35rem, 15vw, 4rem);
  }

  .hero-actions,
  .filter-panel {
    flex-direction: column;
  }

  .primary-btn,
  .ghost-btn,
  .filter-panel select {
    width: 100%;
  }

  .movie-grid,
  .compact-grid,
  .rank-list {
    gap: 12px;
  }

  .card-body {
    padding: 12px;
  }

  .card-line {
    min-height: 0;
  }

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