:root {
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-200: #fde68a;
  --amber-300: #fcd34d;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --amber-900: #78350f;
  --orange-50: #fff7ed;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --rose-50: #fff1f2;
  --rose-500: #f43f5e;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-soft: 0 16px 45px rgba(120, 53, 15, 0.12);
  --shadow-card: 0 12px 30px rgba(120, 53, 15, 0.1);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--gray-800);
  background: linear-gradient(135deg, var(--amber-50), var(--orange-50), var(--rose-50));
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(255, 247, 237, 0.96));
  box-shadow: 0 8px 24px rgba(120, 53, 15, 0.08);
  backdrop-filter: blur(12px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.26);
}

.brand-text {
  font-size: clamp(18px, 2.2vw, 25px);
  background: linear-gradient(90deg, var(--amber-600), var(--orange-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-weight: 650;
  color: var(--gray-700);
}

.nav-link {
  padding: 23px 0 20px;
  border-bottom: 3px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--amber-600);
  border-color: var(--amber-600);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: var(--amber-100);
  padding: 10px;
}

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

.page-main,
.section-wrap {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: linear-gradient(100deg, var(--amber-600), var(--orange-500), var(--rose-500));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.26), transparent 26%),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.20), transparent 24%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.42), rgba(120, 53, 15, 0.12));
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(var(--container), calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  align-items: center;
  gap: 52px;
  padding: 72px 0;
}

.hero-copy {
  color: var(--white);
  animation: fade-in 0.8s ease both;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.95);
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.055em;
  text-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
}

.hero-summary {
  max-width: 760px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(17px, 2.2vw, 24px);
  line-height: 1.75;
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

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

.button,
.button-outline,
.button-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button {
  color: var(--amber-600);
  background: var(--white);
  box-shadow: 0 14px 30px rgba(120, 53, 15, 0.20);
}

.button-outline {
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.88);
}

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

.button:hover,
.button-outline:hover,
.button-soft:hover {
  transform: translateY(-2px) scale(1.02);
}

.button-outline:hover {
  color: var(--amber-600);
  background: var(--white);
}

.hero-panel {
  position: relative;
  border-radius: 32px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.24);
  box-shadow: 0 30px 70px rgba(120, 53, 15, 0.24);
  backdrop-filter: blur(18px);
}

.hero-slider {
  position: relative;
  min-height: 468px;
  border-radius: 26px;
  overflow: hidden;
  background: rgba(17, 24, 39, 0.34);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: end;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-slide .cover-box {
  position: absolute;
  inset: 0;
  border-radius: 0;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.90), rgba(17, 24, 39, 0.12));
}

.hero-slide-content {
  position: relative;
  z-index: 2;
  padding: 30px;
  color: var(--white);
}

.hero-slide-content h2 {
  margin: 10px 0;
  font-size: clamp(24px, 3.5vw, 38px);
  line-height: 1.2;
}

.hero-slide-content p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.7;
}

.hero-dots {
  position: absolute;
  right: 28px;
  bottom: 22px;
  z-index: 3;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

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

.section-pad {
  padding: 64px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 34px;
}

.title-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.title-line span {
  color: var(--amber-500);
  font-size: 28px;
}

.section-title h1,
.section-title h2 {
  margin: 0;
  color: var(--gray-800);
  font-size: clamp(28px, 4.2vw, 44px);
  letter-spacing: -0.045em;
}

.section-title p {
  margin: 12px auto 0;
  max-width: 720px;
  color: var(--gray-500);
  line-height: 1.8;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px rgba(120, 53, 15, 0.16);
}

.cover-box {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--amber-200), var(--orange-500));
}

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

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

.cover-fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: var(--white);
  font-size: 28px;
  font-weight: 900;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--amber-600), var(--rose-500));
}

.cover-empty img {
  display: none;
}

.cover-empty .cover-fallback {
  display: flex;
}

.quality-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
}

.play-mark {
  position: absolute;
  inset: auto 14px 14px auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--amber-600);
  background: var(--white);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

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

.movie-card-meta,
.detail-meta,
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  color: var(--amber-700);
  font-size: 13px;
  font-weight: 750;
}

.movie-card h2 {
  margin: 10px 0 8px;
  color: var(--gray-900);
  font-size: 19px;
  line-height: 1.35;
}

.movie-card p {
  margin: 0;
  color: var(--gray-500);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag-row span,
.info-pill {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--amber-700);
  background: var(--amber-100);
  font-size: 12px;
  font-weight: 700;
}

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

.category-card,
.info-card,
.rank-row,
.search-hero,
.detail-card {
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-card);
}

.category-card {
  padding: 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px rgba(120, 53, 15, 0.15);
}

.category-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--gray-900);
  font-size: 20px;
}

.category-card span {
  color: var(--amber-700);
  font-weight: 800;
}

.category-card p {
  margin: 10px 0 0;
  color: var(--gray-500);
  line-height: 1.7;
}

.filter-panel {
  position: sticky;
  top: 84px;
  z-index: 20;
  display: grid;
  grid-template-columns: 2fr repeat(4, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 30px;
  padding: 18px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 44px;
  border: 1px solid var(--amber-200);
  border-radius: 14px;
  padding: 0 12px;
  color: var(--gray-800);
  background: var(--white);
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.13);
}

.filter-count {
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 14px;
  color: var(--amber-700);
  background: var(--amber-100);
  font-weight: 850;
  white-space: nowrap;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 76px 90px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.rank-number {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--white);
  background: linear-gradient(135deg, var(--amber-600), var(--rose-500));
  font-size: 22px;
  font-weight: 900;
}

.rank-row .cover-box {
  border-radius: 16px;
}

.rank-info h2,
.rank-info h3 {
  margin: 0 0 8px;
  color: var(--gray-900);
  font-size: 20px;
}

.rank-info p {
  margin: 0;
  color: var(--gray-500);
  line-height: 1.7;
}

.rank-score {
  display: grid;
  justify-items: end;
  gap: 5px;
  color: var(--amber-700);
  font-weight: 850;
}

.page-hero {
  padding: 58px 0 28px;
}

.page-hero-box,
.search-hero {
  padding: 34px;
  border-radius: 32px;
  color: var(--white);
  background: linear-gradient(100deg, var(--amber-600), var(--orange-500), var(--rose-500));
  box-shadow: var(--shadow-soft);
}

.page-hero h1,
.search-hero h1 {
  margin: 12px 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.page-hero p,
.search-hero p {
  margin: 0;
  max-width: 850px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
}

.detail-hero {
  padding: 44px 0 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 34px;
  align-items: start;
}

.player-card,
.detail-card {
  overflow: hidden;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: var(--gray-900);
  box-shadow: 0 28px 70px rgba(17, 24, 39, 0.28);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--gray-900);
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.72), rgba(17, 24, 39, 0.18));
  transition: opacity 0.2s ease;
}

.player-shell.is-playing .player-overlay {
  opacity: 0;
}

.player-button {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  color: var(--amber-700);
  background: var(--white);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.26);
  font-weight: 900;
  cursor: pointer;
}

.player-status {
  margin-top: 12px;
  color: var(--gray-500);
  font-size: 14px;
}

.detail-card {
  padding: 30px;
}

.breadcrumbs {
  margin-bottom: 18px;
}

.detail-card h1 {
  margin: 0 0 16px;
  color: var(--gray-900);
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.055em;
}

.detail-lead {
  margin: 0 0 22px;
  color: var(--gray-700);
  font-size: 18px;
  line-height: 1.85;
}

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

.info-item {
  padding: 14px;
  border-radius: 16px;
  background: var(--amber-50);
}

.info-item span {
  display: block;
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 800;
}

.info-item strong {
  display: block;
  margin-top: 5px;
  color: var(--gray-900);
}

.content-block {
  margin-top: 28px;
  padding: 26px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
}

.content-block h2 {
  margin: 0 0 12px;
  color: var(--gray-900);
  font-size: 25px;
}

.content-block p {
  margin: 0;
  color: var(--gray-700);
  line-height: 1.95;
}

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

.related-grid .movie-card h2 {
  font-size: 16px;
}

.related-grid .movie-card p {
  display: none;
}

.site-footer {
  margin-top: 72px;
  color: var(--amber-50);
  background: linear-gradient(135deg, var(--amber-900), #9a3412);
}

.footer-grid {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1.35fr 0.9fr 0.9fr 1.2fr;
  gap: 30px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 20px;
  font-weight: 900;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

.site-footer p,
.site-footer li {
  color: var(--amber-100);
  line-height: 1.8;
}

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

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

.footer-bottom {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 28px;
  border-top: 1px solid rgba(253, 230, 138, 0.26);
  text-align: center;
  color: var(--amber-200);
  font-size: 14px;
}

.empty-filter {
  display: none;
  padding: 28px;
  border-radius: var(--radius-xl);
  color: var(--amber-700);
  background: var(--amber-100);
  text-align: center;
  font-weight: 900;
}

.empty-filter.show {
  display: block;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .hero-inner,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

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

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

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

@media (max-width: 760px) {
  .nav-shell {
    min-height: 64px;
  }

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

  .nav-links {
    position: absolute;
    top: 64px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--shadow-card);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    padding: 13px 14px;
    border-radius: 14px;
    border-bottom: 0;
  }

  .nav-link.active,
  .nav-link:hover {
    background: var(--amber-100);
  }

  .brand-text {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero,
  .hero-inner {
    min-height: auto;
  }

  .hero-inner {
    padding: 46px 0;
    gap: 28px;
  }

  .hero-slider {
    min-height: 420px;
  }

  .hero-slide-content {
    padding: 22px;
  }

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

  .filter-panel {
    position: static;
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 48px 74px 1fr;
  }

  .rank-score {
    grid-column: 3;
    justify-items: start;
  }

  .rank-number {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 18px;
  }

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

@media (max-width: 520px) {
  .movie-grid,
  .category-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .page-hero-box,
  .search-hero,
  .detail-card,
  .content-block {
    padding: 22px;
    border-radius: 22px;
  }
}
