:root {
  color-scheme: dark;
  --bg: #111827;
  --bg-deep: #030712;
  --panel: #1f2937;
  --panel-soft: #273449;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f9fafb;
  --muted: #9ca3af;
  --amber: #fbbf24;
  --amber-dark: #d97706;
  --radius: 22px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.12), transparent 28rem), var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, var(--amber), #fef3c7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand {
  font-size: 22px;
  white-space: nowrap;
}

.brand-mark,
.footer-brand span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: #111827;
  background: var(--amber);
  font-size: 14px;
  box-shadow: 0 0 28px rgba(251, 191, 36, 0.32);
}

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

.desktop-nav a,
.mobile-nav a {
  color: #d1d5db;
  font-weight: 700;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
  color: var(--amber);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(31, 41, 55, 0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px;
}

.top-search input,
.mobile-nav input,
.big-search input,
.filter-panel input,
.filter-panel select {
  color: var(--text);
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  outline: none;
}

.top-search input {
  width: 190px;
  padding: 10px 12px;
}

.top-search button,
.mobile-nav button,
.big-search button,
.btn,
.filter-panel button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 900;
}

.top-search button,
.mobile-nav button,
.big-search button {
  color: #111827;
  background: var(--amber);
  padding: 10px 16px;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  background: rgba(31, 41, 55, 0.9);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 12px;
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
}

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

.mobile-nav-inner {
  display: grid;
  gap: 16px;
  padding: 18px 0;
}

.mobile-nav form {
  display: flex;
  gap: 8px;
}

.mobile-nav input {
  width: 100%;
  padding: 12px 14px;
}

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

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

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

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

.hero-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.08);
  filter: saturate(1.08);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.98) 0%, rgba(3, 7, 18, 0.78) 42%, rgba(3, 7, 18, 0.38) 100%),
    linear-gradient(0deg, #111827 0%, rgba(17, 24, 39, 0) 38%);
}

.hero-content {
  position: relative;
  min-height: 620px;
  padding: 96px 0 150px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) 380px;
  gap: 60px;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
}

.hero-kicker,
.page-hero p {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--amber);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 18px 0;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.98;
  font-weight: 1000;
  letter-spacing: -0.055em;
}

.hero-copy p {
  margin: 0;
  color: #d1d5db;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.75;
}

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

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.1);
  font-size: 13px;
  font-weight: 800;
}

.hero-tags {
  margin: 24px 0 28px;
}

.hero-actions,
.page-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  transition: transform 0.22s ease, background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

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

.btn-primary {
  background: var(--amber);
  color: #111827;
  box-shadow: 0 20px 45px rgba(251, 191, 36, 0.25);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-ghost {
  background: transparent;
  color: #fde68a;
  border: 1px solid rgba(251, 191, 36, 0.32);
}

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

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

.hero-poster span {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(251, 191, 36, 0.92);
  color: #111827;
  font-size: 28px;
  box-shadow: 0 0 50px rgba(251, 191, 36, 0.36);
}

.hero-tabs {
  position: absolute;
  left: 50%;
  bottom: 34px;
  translate: -50% 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.hero-tab {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(31, 41, 55, 0.82);
  color: #d1d5db;
  padding: 8px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.hero-tab.is-active,
.hero-tab:hover {
  border-color: rgba(251, 191, 36, 0.6);
  background: rgba(146, 64, 14, 0.42);
}

.hero-tab img {
  width: 46px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
}

.hero-tab span {
  text-align: left;
  font-weight: 800;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

main {
  min-height: 60vh;
}

.section-block {
  padding: 58px 0;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  font-weight: 1000;
}

.section-head p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.section-link {
  color: var(--amber);
  font-weight: 900;
}

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: rgba(31, 41, 55, 0.86);
  border: 1px solid var(--line);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.18);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 191, 36, 0.42);
  box-shadow: 0 24px 45px rgba(0, 0, 0, 0.32);
}

.movie-card.is-hidden {
  display: none;
}

.card-cover {
  position: relative;
  display: block;
  background: #111827;
}

.card-cover::after {
  content: "▶";
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--amber);
  color: #111827;
  font-weight: 900;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .card-cover::after {
  opacity: 1;
  transform: scale(1);
}

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

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

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 900;
}

.card-body h2 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.28;
}

.card-body p {
  margin: 0 0 14px;
  color: #cbd5e1;
  line-height: 1.65;
  font-size: 14px;
}

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

.movie-card-wide .card-cover img {
  height: 100%;
  aspect-ratio: auto;
}

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

.category-tile,
.category-panel-link {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  min-height: 210px;
  border: 1px solid var(--line);
  background: rgba(31, 41, 55, 0.86);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-tile:hover,
.category-panel-link:hover {
  transform: translateY(-5px);
  border-color: rgba(251, 191, 36, 0.4);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
}

.category-tile span,
.category-tile p {
  position: relative;
  z-index: 1;
}

.category-tile span {
  display: block;
  padding: 106px 18px 8px;
  color: #fff;
  font-size: 22px;
  font-weight: 1000;
}

.category-tile p {
  margin: 0;
  padding: 0 18px 18px;
  color: #d1d5db;
  line-height: 1.55;
  font-size: 13px;
}

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

.category-panel-link {
  min-height: 260px;
  padding: 22px;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
}

.category-collage {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.category-collage img {
  height: 190px;
  width: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.category-panel h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.category-panel p {
  color: #cbd5e1;
  line-height: 1.75;
}

.category-panel span {
  color: var(--amber);
  font-weight: 900;
}

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

.rank-item {
  position: relative;
  overflow: hidden;
  min-height: 240px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.rank-item img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  opacity: 0.58;
  transition: transform 0.3s ease;
}

.rank-item:hover img {
  transform: scale(1.06);
}

.rank-item strong,
.rank-item span {
  position: relative;
  z-index: 1;
}

.rank-item strong {
  display: inline-flex;
  margin: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--amber);
  color: #111827;
}

.rank-item span {
  display: block;
  margin-top: 120px;
  padding: 0 14px 16px;
  font-weight: 900;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 92px 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(251, 191, 36, 0.22), transparent 28rem),
    linear-gradient(110deg, #030712 0%, #111827 52%, #3b2406 100%);
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  max-width: 780px;
  margin: 12px 0 18px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  font-weight: 1000;
  letter-spacing: -0.04em;
}

.page-hero span {
  display: block;
  max-width: 700px;
  color: #cbd5e1;
  line-height: 1.8;
  font-size: 18px;
}

.page-hero-actions {
  margin-top: 26px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 14px;
  align-items: end;
  margin-bottom: 24px;
  padding: 18px;
  border-radius: var(--radius);
  background: rgba(31, 41, 55, 0.86);
  border: 1px solid var(--line);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: #d1d5db;
  font-weight: 900;
}

.filter-panel input,
.filter-panel select,
.big-search input {
  width: 100%;
  padding: 14px 16px;
}

.big-search {
  display: flex;
  gap: 12px;
  max-width: 760px;
  margin-top: 28px;
}

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

.top-rank-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.top-rank-card a {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 430px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.top-rank-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.52;
}

.top-rank-card strong,
.top-rank-card h2,
.top-rank-card p {
  position: relative;
  z-index: 1;
}

.top-rank-card strong {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 22px;
  border-radius: 50%;
  background: var(--amber);
  color: #111827;
  font-size: 24px;
}

.top-rank-card h2 {
  margin: 185px 22px 10px;
  font-size: 28px;
}

.top-rank-card p {
  margin: 0 22px 22px;
  color: #d1d5db;
  line-height: 1.7;
}

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

.rank-row a {
  display: grid;
  grid-template-columns: 64px 96px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(31, 41, 55, 0.86);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row a:hover {
  transform: translateX(5px);
  border-color: rgba(251, 191, 36, 0.4);
}

.rank-row strong {
  color: var(--amber);
  font-size: 24px;
  text-align: center;
}

.rank-row img {
  width: 96px;
  height: 128px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-row h2 {
  margin: 0 0 8px;
  font-size: 21px;
}

.rank-row p {
  color: #cbd5e1;
  margin: 0 0 10px;
  line-height: 1.6;
}

.rank-row span {
  color: var(--amber);
  font-size: 13px;
  font-weight: 900;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: #cbd5e1;
  padding: 30px 0 20px;
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--amber);
}

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

.watch-column,
.detail-sidebar {
  display: grid;
  gap: 22px;
}

.video-player {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  border: 0;
  color: #111827;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.04));
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-overlay span {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--amber);
  font-size: 32px;
  box-shadow: 0 0 56px rgba(251, 191, 36, 0.42);
}

.video-player.is-playing .player-overlay,
.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-bar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.video-player:hover .player-bar,
.video-player:focus-within .player-bar {
  opacity: 1;
}

.player-bar button {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  color: #111827;
  background: rgba(251, 191, 36, 0.92);
  font-weight: 900;
  cursor: pointer;
}

.player-error {
  display: none;
  position: absolute;
  inset: 0;
  place-items: center;
  color: #fff;
  background: rgba(0, 0, 0, 0.78);
  font-weight: 900;
}

.video-player.has-error .player-error {
  display: grid;
}

.detail-title-card,
.detail-section,
.side-card {
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(31, 41, 55, 0.88);
  padding: 24px;
}

.detail-title-card p {
  margin: 0 0 10px;
  color: var(--amber);
  font-weight: 900;
}

.detail-title-card h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  font-weight: 1000;
  letter-spacing: -0.035em;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  color: #d1d5db;
}

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.detail-section h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-section p {
  color: #d1d5db;
  line-height: 1.9;
  font-size: 17px;
}

.detail-cover {
  width: 100%;
  border-radius: 26px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.side-card dl {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  margin: 0;
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  margin: 0;
  color: #fff;
}

.side-card a {
  color: var(--amber);
}

.related-block {
  padding-top: 42px;
}

.site-footer {
  margin-top: 60px;
  background: #030712;
  border-top: 1px solid var(--line);
  color: #cbd5e1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 34px;
  padding: 48px 0;
}

.footer-brand {
  font-size: 21px;
  margin-bottom: 14px;
}

.site-footer p {
  max-width: 460px;
  line-height: 1.75;
}

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

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 9px 0;
  color: #cbd5e1;
}

.site-footer a:hover {
  color: var(--amber);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 20px 16px;
  text-align: center;
  color: #9ca3af;
}

@media (max-width: 1024px) {
  .top-search,
  .desktop-nav {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 76px;
  }

  .hero-poster {
    max-width: 310px;
    transform: none;
  }

  .hero-tabs {
    grid-template-columns: repeat(3, 1fr);
  }

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

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

  .detail-sidebar {
    grid-template-columns: 260px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .brand {
    font-size: 18px;
  }

  .hero {
    min-height: 760px;
  }

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

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

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

  .hero-tab:nth-child(n + 5) {
    display: none;
  }

  .section-head,
  .big-search,
  .filter-panel {
    display: grid;
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .category-grid,
  .category-panel-grid,
  .top-rank-grid,
  .rank-strip,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .category-panel-link,
  .movie-card-wide,
  .rank-row a,
  .detail-sidebar {
    grid-template-columns: 1fr;
  }

  .category-collage img {
    height: 150px;
  }

  .rank-row img {
    width: 100%;
    height: 220px;
  }

  .player-bar {
    opacity: 1;
    flex-wrap: wrap;
  }
}
