:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --orange-50: #fff7ed;
  --orange-100: #ffedd5;
  --orange-500: #f97316;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --gray-950: #030712;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 45px rgba(15, 23, 42, 0.16);
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-2xl: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  color: var(--gray-900);
  background: linear-gradient(180deg, var(--amber-50), var(--white) 32%, var(--orange-50));
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 237, 213, 0.96));
  border-bottom: 1px solid rgba(253, 230, 138, 0.7);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

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

.brand-icon,
.footer-logo span {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.35);
}

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

.brand-copy strong {
  font-size: 20px;
  color: var(--gray-800);
}

.brand-copy small {
  margin-top: 3px;
  color: var(--gray-500);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--gray-700);
  font-weight: 600;
}

.desktop-nav a,
.nav-dropdown > button {
  border: 0;
  background: transparent;
  padding: 8px 0;
  color: var(--gray-700);
  transition: color 0.2s ease;
}

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

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  width: 190px;
  padding: 8px;
  background: var(--white);
  border: 1px solid var(--amber-100);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
}

.nav-dropdown-menu a:hover {
  background: var(--amber-50);
}

.top-search,
.mobile-search,
.search-page-form {
  position: relative;
  display: flex;
  align-items: center;
}

.top-search input,
.mobile-search input,
.search-page-form input,
.filter-input input {
  width: 260px;
  border: 1px solid var(--amber-200);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  padding: 10px 44px 10px 16px;
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.top-search input:focus,
.mobile-search input:focus,
.search-page-form input:focus,
.filter-input input:focus,
.filter-bar select:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.top-search button,
.mobile-search button {
  position: absolute;
  right: 8px;
  border: 0;
  background: transparent;
  color: var(--amber-700);
  font-size: 22px;
}

.mobile-toggle {
  display: none;
  border: 0;
  color: var(--gray-700);
  background: transparent;
  font-size: 28px;
}

.mobile-nav {
  display: none;
  padding: 14px 16px 18px;
  background: var(--white);
  border-top: 1px solid var(--amber-200);
}

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

.mobile-nav a {
  display: block;
  padding: 10px 4px;
  color: var(--gray-700);
  font-weight: 600;
}

.mobile-category-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
  padding-left: 14px;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: var(--gray-900);
}

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

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

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

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

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 7, 18, 0.88), rgba(3, 7, 18, 0.58) 42%, rgba(3, 7, 18, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1280px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: var(--amber-500);
  color: var(--white);
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.section-kicker {
  background: var(--amber-100);
  color: var(--amber-700);
  margin-bottom: 8px;
}

.hero h1,
.compact-hero h1 {
  margin: 18px 0 14px;
  color: var(--white);
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1;
  max-width: 760px;
}

.hero-one-line {
  max-width: 720px;
  margin: 0 0 10px;
  color: var(--gray-200);
  font-size: 22px;
  font-weight: 600;
}

.hero-summary {
  max-width: 700px;
  margin: 0 0 30px;
  color: var(--gray-300);
  font-size: 16px;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.primary-button,
.ghost-button,
.soft-button,
.search-page-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.search-page-form button {
  color: var(--white);
  background: var(--amber-500);
  border: 0;
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.35);
}

.primary-button:hover,
.search-page-form button:hover {
  background: var(--amber-600);
  transform: translateY(-1px);
}

.ghost-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(8px);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.28);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  transform: translateY(-50%);
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-size: 40px;
  line-height: 1;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--white);
}

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

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

.section-title-row h2 {
  margin: 0;
  color: var(--gray-900);
  font-size: clamp(28px, 3vw, 40px);
}

.section-title-row a {
  color: var(--amber-700);
  font-weight: 700;
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 280px;
  gap: 24px;
  overflow-x: auto;
  padding: 2px 2px 18px;
  scrollbar-width: none;
}

.scroll-row::-webkit-scrollbar {
  display: none;
}

.section-band {
  background: linear-gradient(90deg, var(--amber-100), var(--orange-100));
}

.card-grid {
  display: grid;
  gap: 24px;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-poster {
  position: relative;
  height: 210px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-100), var(--orange-100));
}

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

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

.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.05));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.card-overlay span,
.play-float,
.large-play {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}

.movie-card:hover .card-overlay {
  opacity: 1;
}

.category-pill,
.year-pill,
.rank-badge,
.tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.category-pill {
  background: rgba(255, 255, 255, 0.92);
  color: var(--amber-700);
  padding: 5px 10px;
}

.category-pill.strong {
  background: var(--amber-500);
  color: var(--white);
}

.card-category {
  position: absolute;
  left: 12px;
  top: 12px;
}

.year-pill {
  position: absolute;
  right: 12px;
  bottom: 12px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.68);
  padding: 5px 10px;
}

.rank-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.35);
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: var(--gray-900);
  font-size: 18px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

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

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

.genre-line {
  color: var(--gray-500);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: 150px 1fr;
  min-height: 132px;
  border-radius: 14px;
}

.horizontal-poster {
  height: 100%;
}

.horizontal-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-500);
  font-size: 12px;
  margin-bottom: 8px;
}

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

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

.category-tile {
  display: flex;
  min-height: 210px;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--amber-100);
  border-radius: var(--radius-2xl);
  padding: 24px;
  background: linear-gradient(135deg, var(--white), var(--amber-50));
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.category-tile span {
  color: var(--amber-700);
  font-size: 24px;
  font-weight: 800;
}

.category-tile strong {
  margin: 14px 0;
  color: var(--gray-700);
  font-size: 15px;
  line-height: 1.7;
}

.category-tile em {
  display: grid;
  gap: 6px;
  color: var(--gray-500);
  font-size: 13px;
  font-style: normal;
}

.page-hero {
  color: var(--white);
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.34), transparent 30%), linear-gradient(135deg, var(--gray-900), var(--gray-950));
}

.compact-hero {
  padding: 70px 0;
}

.compact-hero h1 {
  color: var(--white);
  margin-bottom: 16px;
}

.compact-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--gray-300);
  font-size: 18px;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 24px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

.detail-container .breadcrumb {
  color: var(--gray-600);
}

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

.overview-stack {
  display: grid;
  gap: 30px;
  padding: 56px 0;
}

.category-overview-card {
  border: 1px solid var(--amber-100);
  border-radius: var(--radius-2xl);
  padding: 24px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.category-overview-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.category-overview-head h2 {
  margin: 0 0 10px;
  font-size: 30px;
}

.category-overview-head p {
  margin: 0;
  color: var(--gray-600);
}

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

.soft-button {
  color: var(--amber-700);
  background: var(--amber-50);
  border: 1px solid var(--amber-200);
  padding: 10px 18px;
}

.soft-button:hover {
  background: var(--amber-100);
}

.filter-bar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--amber-100);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-sm);
}

.filter-input {
  flex: 1;
}

.filter-input input {
  width: 100%;
  border-radius: 14px;
}

.filter-bar select {
  border: 1px solid var(--amber-200);
  border-radius: 14px;
  background: var(--white);
  padding: 0 14px;
  outline: none;
}

.detail-page {
  padding: 34px 0 70px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
  gap: 32px;
}

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

.movie-video,
.player-cover,
.player-cover img,
.player-cover-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.movie-video {
  z-index: 1;
  object-fit: contain;
  background: #000;
}

.player-cover {
  z-index: 3;
  border: 0;
  padding: 0;
  overflow: hidden;
  background: #000;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover img {
  object-fit: cover;
}

.player-cover-shade {
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.12));
}

.player-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 84px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
  transform: translate(-50%, -50%);
  font-size: 34px;
}

.player-error {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  display: none;
  width: min(88%, 420px);
  transform: translate(-50%, -50%);
  border-radius: 16px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.72);
  padding: 18px;
  text-align: center;
}

.player-shell.player-unavailable .player-error {
  display: block;
}

.detail-headline {
  padding: 24px 0 10px;
}

.detail-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.detail-tags span:not(.category-pill),
.tag {
  color: var(--gray-600);
  background: var(--gray-100);
  padding: 5px 10px;
}

.detail-headline h1 {
  margin: 18px 0 10px;
  color: var(--gray-900);
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
}

.detail-one-line {
  margin: 0 0 18px;
  color: var(--gray-700);
  font-size: 20px;
  line-height: 1.7;
}

.detail-genre {
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  padding: 16px 0;
  color: var(--gray-600);
}

.detail-panel,
.side-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.detail-panel {
  margin-top: 24px;
  padding: 26px;
}

.detail-panel h2,
.side-card h2 {
  margin: 0 0 16px;
  color: var(--gray-900);
  font-size: 24px;
}

.detail-panel p {
  margin: 0;
  color: var(--gray-700);
  font-size: 16px;
  line-height: 1.9;
}

.detail-side {
  position: relative;
}

.detail-side > div {
  position: sticky;
  top: 92px;
}

.side-card {
  padding: 22px;
  margin-bottom: 20px;
}

.side-card dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.side-card dt {
  color: var(--gray-500);
  font-size: 13px;
}

.side-card dd {
  margin: -6px 0 0;
  color: var(--gray-900);
  font-weight: 600;
  line-height: 1.6;
}

.warm-card {
  background: linear-gradient(135deg, var(--amber-50), var(--orange-50));
  border-color: var(--amber-200);
}

.warm-card p {
  color: var(--gray-600);
  line-height: 1.7;
}

.related-block {
  padding-bottom: 0;
}

.search-page-form {
  margin-top: 26px;
  max-width: 760px;
  gap: 12px;
}

.search-page-form input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 16px;
}

.search-page-form button {
  border-radius: 16px;
  white-space: nowrap;
}

.about-content {
  display: grid;
  gap: 24px;
  padding: 56px 0;
}

.site-footer {
  color: var(--gray-300);
  background: linear-gradient(180deg, var(--gray-900), var(--gray-950));
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 38px;
  padding: 52px 0;
}

.footer-logo strong {
  color: var(--white);
  font-size: 24px;
}

.footer-brand p {
  max-width: 540px;
  color: var(--gray-400);
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 16px;
  color: var(--white);
}

.site-footer ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--gray-400);
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 16px;
  color: var(--gray-500);
  text-align: center;
}

[data-hidden="true"] {
  display: none !important;
}

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

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

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

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

  .detail-side > div {
    position: static;
  }
}

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

  .brand-copy small {
    display: none;
  }

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

  .hero-content {
    padding: 0 16px;
  }

  .hero h1,
  .compact-hero h1 {
    font-size: 38px;
  }

  .hero-one-line {
    font-size: 18px;
  }

  .hero-summary {
    -webkit-line-clamp: 2;
  }

  .hero-control {
    display: none;
  }

  .section-title-row,
  .category-overview-head,
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .three-grid,
  .four-grid,
  .category-grid,
  .footer-grid,
  .overview-list {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal {
    grid-template-columns: 122px 1fr;
  }

  .card-poster {
    height: 190px;
  }

  .player-play {
    width: 66px;
    height: 66px;
    font-size: 28px;
  }
}
