:root {
  --bg: #0f172a;
  --panel: #1e293b;
  --panel-soft: #233049;
  --line: #334155;
  --muted: #94a3b8;
  --text: #ffffff;
  --amber: #f59e0b;
  --amber-soft: #fbbf24;
  --shadow: 0 25px 55px rgba(0, 0, 0, 0.32);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

.nav-wrap {
  width: min(1280px, calc(100% - 32px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-icon,
.footer-brand span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--amber);
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.35);
}

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

.brand-text strong {
  font-size: 20px;
  letter-spacing: -0.02em;
}

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

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

.desktop-nav a {
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease;
}

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

.nav-search,
.mobile-search,
.wide-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.mobile-search input,
.wide-search input,
.filter-bar input,
.filter-bar select {
  border: 1px solid var(--line);
  background: #111c31;
  color: #fff;
  outline: none;
  border-radius: 12px;
  padding: 11px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-search input {
  width: 210px;
}

.nav-search input:focus,
.mobile-search input:focus,
.wide-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.nav-search button,
.mobile-search button,
.wide-search button,
.btn-primary,
.btn-secondary,
.section-more {
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search button,
.mobile-search button,
.wide-search button,
.btn-primary {
  background: var(--amber);
  color: #0f172a;
}

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

.nav-search button:hover,
.mobile-search button:hover,
.wide-search button:hover,
.btn-primary:hover,
.section-more:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(245, 158, 11, 0.28);
  background: var(--amber-soft);
}

.btn-secondary:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.24);
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: #cbd5e1;
  font-size: 28px;
}

.mobile-panel {
  border-top: 1px solid var(--line);
  background: #111c31;
  padding: 16px;
}

.mobile-panel[hidden] {
  display: none;
}

.mobile-panel nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.mobile-panel nav a {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 12px;
}

.hero {
  position: relative;
  height: 400px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.72) 45%, rgba(15, 23, 42, 0.12) 100%), linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.24));
}

.hero-content {
  position: absolute;
  left: max(16px, calc((100vw - 1280px) / 2 + 16px));
  bottom: 58px;
  width: min(640px, calc(100% - 78px));
}

.hero-badge,
.page-hero span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 7px 13px;
  background: var(--amber);
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.hero h1,
.page-hero h1 {
  margin: 16px 0 14px;
  font-size: clamp(32px, 6vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.intro-strip p,
.section-head p {
  color: #cbd5e1;
}

.hero p {
  max-width: 620px;
  margin: 0 0 26px;
  font-size: clamp(16px, 2vw, 19px);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 32px;
  line-height: 1;
  transition: background 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.76);
}

.hero-prev {
  left: 16px;
}

.hero-next {
  right: 16px;
}

.hero-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dots button {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.48);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
  width: 32px;
  background: var(--amber);
}

main > .container,
.page-main > .container {
  margin-top: 48px;
}

.intro-strip {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  align-items: center;
  gap: 24px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}

.intro-strip h2,
.section-head h2,
.footer-grid h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

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

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

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

.featured-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.9fr);
  gap: 24px;
}

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

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

.movie-card {
  min-width: 0;
}

.movie-card a {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.movie-card a:hover {
  transform: translateY(-4px);
  background: var(--panel-soft);
  box-shadow: 0 24px 48px rgba(245, 158, 11, 0.14);
}

.movie-card figure {
  position: relative;
  height: 210px;
  margin: 0;
  overflow: hidden;
  background: #020617;
}

.card-large figure {
  height: 360px;
}

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

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

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}

.year-badge {
  right: 10px;
  bottom: 10px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  background: var(--amber);
  color: #0f172a;
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 10px;
  overflow: hidden;
  color: #fff;
  font-size: 18px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.2s ease;
}

.movie-card a:hover h3 {
  color: var(--amber);
}

.card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.meta-row span,
.tag-row span,
.detail-tags span,
.detail-meta span,
.detail-meta a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #334155;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 9px;
}

.meta-row span:first-child,
.tag-row span:first-child,
.detail-meta a {
  color: var(--amber);
}

.card-list a {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0;
}

.card-list figure {
  height: 132px;
}

.card-list .card-body h3 {
  min-height: auto;
  -webkit-line-clamp: 1;
}

.card-list .card-body p {
  min-height: auto;
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--panel);
  padding: 20px;
  box-shadow: var(--shadow);
}

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

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

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

.category-tile span {
  display: inline-flex;
  margin-bottom: 58px;
  border-radius: 999px;
  background: var(--amber);
  color: #0f172a;
  font-weight: 900;
  padding: 7px 12px;
}

.category-tile p {
  margin: 0;
  color: #e2e8f0;
  font-weight: 700;
}

.page-main {
  padding-bottom: 56px;
}

.page-hero {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.22), transparent 34%), linear-gradient(135deg, #1e293b, #0f172a);
  padding: clamp(32px, 5vw, 58px);
  box-shadow: var(--shadow);
}

.compact-hero h1 {
  font-size: clamp(30px, 4vw, 48px);
}

.hero-category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-category-links a {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  padding: 9px 12px;
}

.hero-category-links a:hover {
  background: var(--amber);
  color: #0f172a;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 24px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
}

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

.category-overview-card a {
  display: grid;
  grid-template-columns: 190px 1fr;
  overflow: hidden;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-overview-card a:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 44px rgba(245, 158, 11, 0.12);
}

.category-overview-card img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.category-overview-card div {
  padding: 22px;
}

.category-overview-card h2 {
  margin: 0 0 10px;
  color: #fff;
}

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

.category-overview-card ul {
  margin: 0;
  padding-left: 18px;
  color: #cbd5e1;
}

.category-overview-card li + li {
  margin-top: 6px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

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

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

.detail-primary,
.detail-side,
.side-panel,
.detail-copy {
  min-width: 0;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), rgba(0, 0, 0, 0.16));
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.play-ring {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--amber);
  color: #0f172a;
  font-size: 34px;
  font-weight: 900;
  box-shadow: 0 0 44px rgba(245, 158, 11, 0.48);
  padding-left: 6px;
}

.detail-copy {
  margin-top: 24px;
  border-radius: 18px;
  background: var(--panel);
  padding: clamp(22px, 3vw, 32px);
}

.detail-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
}

.detail-copy h2 {
  margin: 28px 0 12px;
  color: #fff;
  font-size: 22px;
}

.detail-copy p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.85;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.detail-poster {
  width: 100%;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.side-panel {
  margin-top: 18px;
  border-radius: 18px;
  background: var(--panel);
  padding: 22px;
}

.side-panel h2 {
  margin: 0 0 18px;
}

.side-panel dl {
  margin: 0;
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
}

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

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

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: #0b1120;
  padding: 48px 0 24px;
}

.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 36px;
}

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

.site-footer p,
.site-footer li,
.site-footer a {
  color: var(--muted);
}

.site-footer ul {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 8px;
}

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

.copyright {
  width: min(1280px, calc(100% - 32px));
  margin: 30px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 14px;
}

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

@media (min-width: 768px) {
  .hero {
    height: 500px;
  }
}

@media (min-width: 1024px) {
  .hero {
    height: 600px;
  }
}

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

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

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

  .detail-side {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 18px;
  }

  .side-panel {
    margin-top: 0;
  }
}

@media (max-width: 820px) {
  .nav-wrap {
    height: 68px;
  }

  .brand-text small,
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .intro-strip,
  .footer-grid,
  .category-overview-grid,
  .category-overview-card a,
  .detail-side {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

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

  .card-list a {
    grid-template-columns: 145px 1fr;
  }
}

@media (max-width: 560px) {
  .container,
  .nav-wrap,
  .footer-grid,
  .copyright {
    width: min(100% - 24px, 1280px);
  }

  .hero-content {
    bottom: 48px;
    width: calc(100% - 60px);
  }

  .hero-control {
    width: 34px;
    height: 34px;
    font-size: 26px;
  }

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

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

  .card-list figure,
  .movie-card figure {
    height: 230px;
  }

  .page-hero,
  .detail-copy,
  .intro-strip {
    padding: 22px;
  }
}
