:root {
  --stone-50: #fafaf9;
  --stone-100: #f5f5f4;
  --stone-200: #e7e5e4;
  --stone-300: #d6d3d1;
  --stone-500: #78716c;
  --stone-600: #57534e;
  --stone-700: #44403c;
  --stone-800: #292524;
  --stone-900: #1c1917;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-300: #fcd34d;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-800: #92400e;
  --amber-900: #78350f;
  --white: #ffffff;
  --black: #000000;
  --shadow-sm: 0 8px 24px rgba(28, 25, 23, 0.08);
  --shadow-lg: 0 22px 60px rgba(28, 25, 23, 0.18);
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(28, 25, 23, 0.94);
  color: var(--amber-100);
  border-bottom: 1px solid rgba(214, 211, 209, 0.12);
  backdrop-filter: blur(18px);
}

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

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

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), var(--amber-800));
  box-shadow: 0 12px 30px rgba(217, 119, 6, 0.3);
}

.logo-text {
  color: var(--amber-50);
  font-size: 18px;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 15px;
  border-radius: 11px;
  color: var(--amber-100);
  font-size: 14px;
  font-weight: 650;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber-50);
  background: rgba(180, 83, 9, 0.78);
  transform: translateY(-1px);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: var(--amber-100);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

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

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

.mobile-sub-link {
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--stone-200);
  background: rgba(255, 255, 255, 0.05);
  font-size: 13px;
}

.hero-slider {
  position: relative;
  height: 580px;
  overflow: hidden;
  background: var(--stone-900);
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--stone-800), var(--amber-900));
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 35%, rgba(245, 158, 11, 0.34), transparent 36%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.38) 48%, rgba(0, 0, 0, 0.62)),
    linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.06) 45%);
}

.hero-content {
  position: absolute;
  top: 50%;
  left: max(24px, calc((100% - 1180px) / 2));
  width: min(640px, calc(100% - 48px));
  transform: translateY(-50%);
  color: var(--white);
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--amber-50);
  background: rgba(217, 119, 6, 0.88);
  box-shadow: 0 14px 34px rgba(217, 119, 6, 0.24);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 750;
}

.hero-content h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.35);
}

.hero-content p {
  max-width: 620px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(16px, 2vw, 21px);
}

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

.primary-button,
.ghost-button,
.inline-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button,
.inline-search button {
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), var(--amber-800));
  box-shadow: 0 16px 34px rgba(217, 119, 6, 0.28);
}

.ghost-button {
  color: var(--amber-50);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.primary-button:hover,
.ghost-button:hover,
.inline-search button:hover {
  transform: translateY(-2px);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span {
  padding: 7px 11px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.12);
  font-size: 13px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(0, 0, 0, 0.34);
  transform: translateY(-50%);
  font-size: 34px;
  line-height: 1;
  transition: background 0.25s ease, transform 0.25s ease;
}

.hero-arrow:hover {
  background: rgba(180, 83, 9, 0.86);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

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

.search-panel {
  padding: 30px 0;
  background: linear-gradient(180deg, var(--stone-900), var(--stone-800));
  color: var(--amber-50);
}

.home-search .container {
  display: grid;
  gap: 18px;
}

.search-panel h2 {
  margin: 0;
  font-size: 24px;
}

.inline-search,
.filter-bar {
  display: flex;
  gap: 12px;
}

.inline-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--stone-200);
  border-radius: 14px;
  color: var(--stone-800);
  background: var(--white);
  outline: none;
  box-shadow: var(--shadow-sm);
}

.inline-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--amber-600);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.14);
}

.quick-category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-category-row a {
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--amber-50);
  background: rgba(255, 255, 255, 0.1);
  font-size: 14px;
  transition: background 0.25s ease;
}

.quick-category-row a:hover {
  background: rgba(217, 119, 6, 0.6);
}

.content-section,
.category-section,
.featured-section,
.filter-section,
.page-section {
  padding: 62px 0;
}

.featured-section,
.category-section {
  background: var(--stone-100);
}

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

.section-heading h2 {
  margin: 0 0 6px;
  color: var(--stone-800);
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 0;
  color: var(--stone-600);
  font-size: 16px;
}

.section-more {
  flex: 0 0 auto;
  color: var(--amber-700);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(214, 211, 209, 0.7);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
  border-color: rgba(217, 119, 6, 0.35);
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--stone-800), var(--amber-900));
}

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

.movie-card:hover .card-cover img,
.category-tile:hover img {
  filter: saturate(1.08) contrast(1.04);
  transform: scale(1.08);
}

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.44), transparent 58%);
  opacity: 0.75;
}

.card-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--white);
  background: rgba(217, 119, 6, 0.9);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-500), var(--amber-800));
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--stone-500);
  font-size: 13px;
}

.card-meta a,
.detail-meta a {
  color: var(--amber-700);
  font-weight: 800;
}

.card-body h3 {
  min-height: 54px;
  margin: 0 0 8px;
  color: var(--stone-800);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 850;
}

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

.card-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.card-tags span,
.tag-list span {
  padding: 5px 8px;
  border-radius: 8px;
  color: var(--stone-600);
  background: var(--stone-100);
  font-size: 12px;
}

.featured-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}

.featured-main .movie-card .card-cover {
  aspect-ratio: 16 / 9;
}

.featured-main .movie-card h3 {
  font-size: 24px;
}

.featured-side,
.side-list {
  display: grid;
  gap: 14px;
}

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

.horizontal-card .card-cover {
  height: 100%;
  min-height: 132px;
  aspect-ratio: auto;
}

.horizontal-card .card-body h3 {
  min-height: auto;
  font-size: 16px;
}

.horizontal-card .card-body p {
  min-height: auto;
  -webkit-line-clamp: 2;
}

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

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

.category-tile {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--stone-900);
  box-shadow: var(--shadow-sm);
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
}

.category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.16));
}

.category-content {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  gap: 8px;
  padding: 22px;
  color: var(--white);
}

.category-content strong {
  font-size: 24px;
  line-height: 1.2;
}

.category-content em {
  color: rgba(255, 255, 255, 0.82);
  font-style: normal;
  font-size: 14px;
}

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

.page-hero {
  color: var(--white);
  background:
    radial-gradient(circle at 14% 20%, rgba(245, 158, 11, 0.34), transparent 34%),
    linear-gradient(135deg, var(--stone-900), var(--amber-900));
}

.small-hero {
  padding: 72px 0 64px;
}

.page-hero span {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 7px 13px;
  border-radius: 999px;
  color: var(--amber-50);
  background: rgba(217, 119, 6, 0.72);
  font-weight: 800;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 18px;
}

.filter-section {
  background: var(--stone-50);
}

.filter-bar {
  position: sticky;
  top: 80px;
  z-index: 20;
  margin-bottom: 28px;
  padding: 14px;
  border: 1px solid rgba(214, 211, 209, 0.72);
  border-radius: 18px;
  background: rgba(250, 250, 249, 0.92);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}

.filter-bar select {
  width: 220px;
  flex: 0 0 220px;
}

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

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--stone-500);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--amber-700);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(320px, 0.85fr);
  gap: 28px;
}

.detail-main {
  display: grid;
  gap: 22px;
}

.player-card,
.detail-card,
.side-card {
  border: 1px solid rgba(214, 211, 209, 0.72);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.player-card {
  overflow: hidden;
  background: var(--black);
}

.video-player {
  position: relative;
  overflow: hidden;
  background: var(--black);
}

.video-player video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--black);
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.28));
  text-align: center;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.big-play {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(217, 119, 6, 0.94);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.34);
  font-size: 30px;
}

.player-overlay strong {
  max-width: 80%;
  font-size: clamp(20px, 4vw, 32px);
}

.custom-controls {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 4;
  display: flex;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.video-player:hover .custom-controls,
.custom-controls.active {
  opacity: 1;
  pointer-events: auto;
}

.custom-controls button {
  border: 0;
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.detail-card,
.side-card {
  padding: 24px;
}

.detail-card h1 {
  margin: 0 0 14px;
  color: var(--stone-800);
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1.18;
  font-weight: 900;
}

.detail-card h2,
.side-card h2 {
  margin: 24px 0 10px;
  color: var(--stone-800);
  font-size: 22px;
  font-weight: 850;
}

.side-card h2 {
  margin-top: 0;
}

.detail-card p {
  margin: 0 0 12px;
  color: var(--stone-600);
  font-size: 16px;
}

.one-line {
  margin: 18px 0 8px !important;
  padding: 16px 18px;
  border-left: 4px solid var(--amber-600);
  border-radius: 0 12px 12px 0;
  background: var(--amber-50);
  color: var(--stone-700) !important;
  font-weight: 650;
}

.sticky-side {
  position: sticky;
  top: 86px;
}

.site-footer {
  color: var(--stone-300);
  background: var(--stone-900);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.footer-brand p {
  max-width: 460px;
  color: var(--stone-300);
}

.footer-links {
  display: grid;
  align-content: start;
  gap: 9px;
}

.footer-links h2 {
  margin: 0 0 8px;
  color: var(--amber-50);
  font-size: 16px;
}

.footer-links a {
  color: var(--stone-300);
  font-size: 14px;
}

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

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--stone-500);
  text-align: center;
  font-size: 14px;
}

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

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

  .sticky-side {
    position: static;
  }
}

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

  .mobile-menu-button {
    display: block;
  }

  .hero-slider {
    height: 540px;
  }

  .hero-content {
    left: 20px;
    width: calc(100% - 40px);
  }

  .hero-arrow {
    display: none;
  }

  .content-section,
  .category-section,
  .featured-section,
  .filter-section,
  .page-section {
    padding: 42px 0;
  }

  .section-heading {
    display: grid;
  }

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

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

  .horizontal-card .card-cover {
    min-height: 128px;
  }

  .inline-search,
  .filter-bar,
  .wide-filter {
    display: grid;
  }

  .filter-bar select {
    width: 100%;
    flex-basis: auto;
  }

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

@media (max-width: 520px) {
  .container,
  .header-inner,
  .mobile-nav,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

  .hero-slider {
    height: 500px;
  }

  .hero-tags span:nth-child(3) {
    display: none;
  }

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

  .movie-card:not(.horizontal-card) .card-cover {
    aspect-ratio: 16 / 9;
  }

  .card-body h3 {
    min-height: auto;
  }

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