:root {
  color-scheme: dark;
  --page-bg: #050505;
  --panel-bg: rgba(17, 24, 39, 0.82);
  --panel-border: rgba(255, 255, 255, 0.09);
  --text-main: #ffffff;
  --text-soft: #d1d5db;
  --text-muted: #9ca3af;
  --amber: #f59e0b;
  --orange: #ea580c;
  --red: #ef4444;
  --blue: #3b82f6;
  --purple: #a855f7;
  --radius-lg: 18px;
  --radius-md: 14px;
  --shadow: 0 25px 70px rgba(0, 0, 0, 0.46);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.12), transparent 34%),
    radial-gradient(circle at top right, rgba(168, 85, 247, 0.11), transparent 30%),
    linear-gradient(180deg, #000000 0%, #111827 44%, #000000 100%);
  color: var(--text-main);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(0, 0, 0, 0.96), rgba(17, 24, 39, 0.94));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

.site-header-inner {
  width: min(1240px, calc(100% - 32px));
  height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  color: #fff;
  font-weight: 900;
  box-shadow: 0 14px 28px rgba(234, 88, 12, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text strong,
.footer-brand span:last-child {
  font-size: 21px;
  font-weight: 900;
  background: linear-gradient(90deg, #fbbf24, #f97316);
  -webkit-background-clip: text;
  color: transparent;
}

.brand-text small {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 4px;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 12px;
  color: var(--text-soft);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.nav-link.active {
  color: #fff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 10px 24px rgba(234, 88, 12, 0.28);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: #fff;
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 12px;
  padding: 12px;
  background: rgba(17, 24, 39, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
}

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

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #000;
}

.hero-slider {
  position: relative;
  min-height: 70vh;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0.74) 45%, rgba(0, 0, 0, 0.28) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.58) 48%, rgba(0, 0, 0, 0.12) 100%);
}

.hero-content {
  position: relative;
  width: min(1240px, calc(100% - 32px));
  min-height: 70vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 72px 0 96px;
  max-width: 1240px;
}

.hero-content > * {
  max-width: 760px;
}

.hero-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.hero-kicker span,
.hero-kicker a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.hero-kicker span {
  background: linear-gradient(90deg, var(--amber), var(--orange));
  color: #fff;
  box-shadow: 0 10px 24px rgba(234, 88, 12, 0.28);
}

.hero-kicker a {
  color: #fbbf24;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(42px, 8vw, 82px);
  line-height: 1.04;
  letter-spacing: -0.05em;
  font-weight: 950;
}

.hero p {
  margin: 0 0 26px;
  color: var(--text-soft);
  font-size: clamp(17px, 2vw, 21px);
  max-width: 720px;
}

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

.primary-button,
.secondary-button,
.text-button,
.card-link,
.search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 20px;
  border-radius: 13px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.search-button,
.card-link {
  color: #fff;
  background: linear-gradient(90deg, var(--amber), var(--orange));
  box-shadow: 0 14px 30px rgba(234, 88, 12, 0.28);
}

.primary-button:hover,
.search-button:hover,
.card-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(234, 88, 12, 0.36);
}

.secondary-button {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.secondary-button:hover,
.text-button:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-2px);
}

.text-button {
  color: #fbbf24;
  background: transparent;
  border: 1px solid rgba(251, 191, 36, 0.26);
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  width: min(1240px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dot {
  width: 42px;
  height: 4px;
  border-radius: 99px;
  border: 0;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--amber), var(--orange));
}

.main-section {
  padding: 72px 0;
}

.section-dark {
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.65), rgba(0, 0, 0, 0.94));
}

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

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

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 14px 28px rgba(239, 68, 68, 0.24);
  font-size: 21px;
}

.section-heading h1,
.section-heading h2,
.page-hero h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.16;
  font-weight: 950;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p,
.category-intro p {
  margin: 10px 0 0;
  color: var(--text-muted);
  max-width: 780px;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(31, 41, 55, 0.84), rgba(17, 24, 39, 0.88));
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.36);
  box-shadow: var(--shadow);
}

.poster-frame,
.rank-poster,
.detail-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(168, 85, 247, 0.22), rgba(17, 24, 39, 0.94));
}

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

.poster-frame::after,
.rank-poster::after,
.detail-poster::after {
  content: attr(data-title);
  position: absolute;
  inset: 18px;
  display: flex;
  align-items: flex-end;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 900;
  font-size: 22px;
  line-height: 1.16;
  z-index: 0;
}

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

.movie-card:hover .poster-frame img,
.rank-item:hover .rank-poster img {
  transform: scale(1.06);
}

.poster-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

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

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #fbbf24;
  font-size: 13px;
  font-weight: 700;
}

.movie-meta-line span,
.movie-meta-line a {
  display: inline-flex;
  align-items: center;
}

.movie-meta-line span::before,
.movie-meta-line a + span::before {
  content: "";
  width: 4px;
  height: 4px;
  margin-right: 8px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.72);
}

.movie-card h2,
.rank-content h2 {
  margin: 9px 0 8px;
  color: #fff;
  font-size: 19px;
  line-height: 1.28;
  font-weight: 900;
}

.movie-card h2 a:hover,
.rank-content h2 a:hover {
  color: #fbbf24;
}

.movie-card p,
.rank-content p {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 14px;
}

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

.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  color: #fef3c7;
  background: rgba(245, 158, 11, 0.13);
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.card-link {
  min-height: 38px;
  margin-top: 16px;
  padding: 8px 14px;
  font-size: 14px;
}

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

.category-card {
  min-height: 190px;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(31, 41, 55, 0.82));
  border: 1px solid rgba(245, 158, 11, 0.18);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.45);
}

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

.category-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.category-card strong {
  color: #fbbf24;
  font-size: 14px;
}

.page-hero {
  padding: 86px 0 54px;
  background: radial-gradient(circle at 18% 20%, rgba(245, 158, 11, 0.18), transparent 36%),
    linear-gradient(180deg, rgba(17, 24, 39, 0.8), rgba(0, 0, 0, 0.96));
}

.search-panel,
.filter-bar {
  margin-top: 28px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

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

.search-input,
.filter-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  padding: 0 16px;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  outline: none;
}

.search-input:focus,
.filter-input:focus {
  border-color: rgba(245, 158, 11, 0.66);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.search-results {
  display: none;
  margin-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding-top: 12px;
}

.search-results.is-open {
  display: grid;
  gap: 10px;
}

.search-result {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.search-result strong {
  color: #fff;
}

.search-result span {
  color: var(--text-muted);
  font-size: 13px;
}

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

.horizontal-card {
  display: grid;
  grid-template-columns: 150px 1fr;
}

.horizontal-card .poster-frame {
  aspect-ratio: 3 / 4;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 104px 1fr;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.4);
}

.rank-number {
  color: #fbbf24;
  font-size: 26px;
  font-weight: 950;
  line-height: 1;
}

.rank-poster {
  width: 104px;
  height: 144px;
  border-radius: 14px;
}

.rank-poster::after {
  inset: 12px;
  font-size: 16px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 66px 0 42px;
  background: #000;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
  filter: blur(9px) saturate(1.15);
  transform: scale(1.04);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0.78) 54%, rgba(0, 0, 0, 0.48) 100%);
}

.detail-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

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

.detail-content h1 {
  margin: 14px 0 18px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.breadcrumb {
  color: var(--text-muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #fbbf24;
}

.detail-summary {
  color: var(--text-soft);
  font-size: 18px;
  max-width: 900px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.info-box {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-box span {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
}

.info-box strong {
  display: block;
  color: #fff;
  margin-top: 5px;
}

.player-card {
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow);
}

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

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(245, 158, 11, 0.2), rgba(0, 0, 0, 0.68));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.play-button {
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--amber), var(--orange));
  box-shadow: 0 16px 38px rgba(234, 88, 12, 0.4);
  cursor: pointer;
  font-size: 34px;
  padding-left: 6px;
}

.player-message {
  display: none;
  padding: 14px 18px;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.34);
  border-top: 1px solid rgba(248, 113, 113, 0.22);
}

.player-message.is-open {
  display: block;
}

.article-block {
  padding: 30px;
  border-radius: 24px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
}

.article-block h2 {
  margin: 0 0 14px;
  font-size: 26px;
  line-height: 1.18;
}

.article-block p {
  margin: 0;
  color: var(--text-soft);
  font-size: 16px;
}

.article-block + .article-block {
  margin-top: 18px;
}

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(17, 24, 39, 0.8), #000);
  color: var(--text-muted);
}

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 17px;
}

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

.footer-links a:hover {
  color: #fbbf24;
}

.empty-state {
  display: none;
  padding: 28px;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 18px;
}

.empty-state.is-open {
  display: block;
}

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

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

  .rank-list {
    grid-template-columns: 1fr;
  }

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }
}

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

  .brand-text small {
    display: none;
  }

  .hero,
  .hero-slider,
  .hero-content {
    min-height: 78vh;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-actions,
  .section-actions,
  .search-row {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .primary-button,
  .secondary-button,
  .text-button,
  .search-button {
    width: 100%;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .horizontal-card,
  .rank-item,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

  .rank-poster {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
  }

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

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

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

@media (max-width: 460px) {
  .info-grid {
    grid-template-columns: 1fr;
  }

  .article-block {
    padding: 22px;
  }
}
