* {
  box-sizing: border-box;
}

:root {
  --amber: #d97706;
  --amber-dark: #b45309;
  --amber-soft: #fef3c7;
  --orange: #f97316;
  --blue: #2563eb;
  --green: #16a34a;
  --purple: #9333ea;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --surface: #ffffff;
  --page: #f9fafb;
  --dark: #09090b;
  --shadow: 0 14px 45px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  color: #ffffff;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-solid,
.site-header:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

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

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

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: var(--amber);
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.35);
}

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

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

.nav-link,
.mobile-nav-link {
  font-weight: 650;
  transition: color 0.2s ease;
}

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

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 190px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

.site-header.is-solid .header-search,
.site-header:hover .header-search {
  border-color: var(--line);
  background: #f3f4f6;
}

.header-search input,
.mobile-search input {
  width: 100%;
  color: inherit;
  border: 0;
  outline: 0;
  background: transparent;
}

.header-search input::placeholder {
  color: currentColor;
  opacity: 0.7;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  color: inherit;
  background: rgba(255, 255, 255, 0.16);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 2px;
  background: currentColor;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border-radius: 18px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-soft);
}

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

.mobile-search {
  margin-bottom: 12px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f9fafb;
}

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

.mobile-nav-link {
  padding: 10px 8px;
  border-radius: 10px;
}

.hero-slider {
  position: relative;
  height: clamp(520px, 78vh, 720px);
  overflow: hidden;
  background: #000000;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1s ease, visibility 1s ease;
}

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

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

.hero-slide::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.10));
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2));
  right: 24px;
  bottom: 86px;
  z-index: 2;
  max-width: 780px;
  color: #ffffff;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.badge-row span,
.detail-badges span,
.card-badges span,
.poster-badges span,
.category-pill,
.rank-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.badge-row span {
  padding: 9px 14px;
  color: #ffffff;
  background: var(--amber);
}

.badge-row span:nth-child(2) {
  background: rgba(37, 99, 235, 0.88);
}

.badge-row span:nth-child(3) {
  background: rgba(22, 163, 74, 0.88);
}

.badge-row span:nth-child(4) {
  background: rgba(147, 51, 234, 0.88);
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content p {
  display: -webkit-box;
  max-width: 720px;
  margin: 0 0 28px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(16px, 1.7vw, 20px);
  line-height: 1.75;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

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

.btn:hover {
  transform: translateY(-1px) scale(1.02);
}

.btn-primary {
  color: #ffffff;
  background: var(--amber);
  box-shadow: 0 14px 32px rgba(217, 119, 6, 0.28);
}

.btn-primary:hover {
  background: var(--amber-dark);
}

.btn-glass {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
}

.hero-control:hover {
  background: rgba(255, 255, 255, 0.30);
}

.hero-prev {
  left: max(16px, calc((100vw - 1260px) / 2));
}

.hero-next {
  right: max(16px, calc((100vw - 1260px) / 2));
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: #ffffff;
}

.section {
  padding: 76px 0;
}

.section-light {
  background: #ffffff;
}

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

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--amber);
  font-weight: 850;
}

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-lead {
  max-width: 720px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.category-card {
  position: relative;
  min-height: 150px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(217, 119, 6, 0.12);
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, #fff7ed);
  box-shadow: var(--shadow-soft);
}

.category-card::after {
  position: absolute;
  right: -42px;
  bottom: -42px;
  width: 120px;
  height: 120px;
  content: "";
  border-radius: 999px;
  background: rgba(217, 119, 6, 0.10);
}

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

.category-card h3 {
  position: relative;
  margin: 0 0 10px;
  font-size: 22px;
}

.category-card p {
  position: relative;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

.wide-poster {
  aspect-ratio: 16 / 9;
}

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

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

.card-poster::after {
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  content: "";
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-poster::after {
  opacity: 1;
}

.poster-year {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 6px 8px;
  border-radius: 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.72);
}

.poster-badges {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-badges {
  opacity: 1;
}

.poster-badges span {
  padding: 6px 8px;
  color: #ffffff;
  background: var(--amber);
}

.poster-badges span:nth-child(2) {
  background: var(--blue);
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 10px;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.38;
  font-weight: 850;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

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

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

.card-meta,
.card-badges {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.card-badges {
  justify-content: flex-start;
  margin-bottom: 12px;
}

.card-badges span {
  padding: 7px 9px;
  color: #92400e;
  background: var(--amber-soft);
}

.card-meta span:last-child {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.movie-card-wide {
  display: grid;
  grid-template-columns: 42% 1fr;
}

.ranking-list {
  display: grid;
  gap: 12px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.ranking-row:hover {
  border-color: rgba(217, 119, 6, 0.35);
  transform: translateY(-2px);
}

.rank-number {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber), var(--orange));
}

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 17px;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.rank-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 8px;
}

.rank-tag {
  padding: 7px 9px;
  color: #92400e;
  background: var(--amber-soft);
}

.page-hero,
.detail-hero {
  position: relative;
  padding: 132px 0 64px;
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.36), transparent 32%), linear-gradient(135deg, #111827, #020617 70%);
  overflow: hidden;
}

.page-hero::after,
.detail-hero::after {
  position: absolute;
  inset: auto -10% -46% 48%;
  width: 680px;
  height: 680px;
  content: "";
  border-radius: 999px;
  background: rgba(217, 119, 6, 0.16);
  filter: blur(4px);
}

.page-hero .container,
.detail-hero .container {
  position: relative;
  z-index: 2;
}

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

.breadcrumb a:hover {
  color: #ffffff;
}

.page-hero h1,
.detail-copy h1 {
  max-width: 880px;
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.12;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.page-hero p,
.detail-copy p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.8;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.filter-input {
  width: min(420px, 100%);
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
}

.filter-input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.12);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-pill {
  padding: 8px 12px;
  color: #92400e;
  background: var(--amber-soft);
}

.detail-hero {
  padding-bottom: 86px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 30px;
  margin-top: -46px;
  align-items: start;
}

.player-card,
.detail-panel,
.related-panel {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000000;
}

.player-shell video,
.player-cover,
.player-cover img {
  width: 100%;
  height: 100%;
}

.player-shell video {
  object-fit: contain;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: #ffffff;
  background: #000000;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
  position: absolute;
  inset: 0;
  object-fit: cover;
  opacity: 0.68;
}

.player-cover::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.12));
}

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

.play-face {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 14px;
  justify-items: center;
  font-weight: 900;
}

.play-circle {
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  border-radius: 999px;
  background: var(--amber);
  box-shadow: 0 18px 42px rgba(217, 119, 6, 0.36);
}

.detail-panel {
  padding: 28px;
}

.detail-section + .detail-section {
  margin-top: 26px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.detail-section h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.detail-section p {
  margin: 0;
  color: #374151;
  line-height: 1.9;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.detail-badges span {
  padding: 8px 11px;
  color: #92400e;
  background: var(--amber-soft);
}

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

.tag-list span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #374151;
  background: #f3f4f6;
}

.related-panel {
  position: sticky;
  top: 94px;
  padding: 22px;
}

.related-panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.small-card {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.small-card:hover {
  background: #f9fafb;
}

.small-card img {
  width: 108px;
  height: 72px;
  flex: 0 0 auto;
  border-radius: 12px;
  object-fit: cover;
  background: #111827;
}

.small-card span {
  min-width: 0;
}

.small-card strong,
.small-card em {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.small-card strong {
  margin-bottom: 6px;
  font-size: 14px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
}

.small-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  -webkit-line-clamp: 1;
}

.quote-box {
  padding: 18px;
  border-left: 4px solid var(--amber);
  border-radius: 0 14px 14px 0;
  background: #fffbeb;
}

.search-results-empty {
  padding: 70px 20px;
  text-align: center;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.text-page {
  max-width: 860px;
  padding: 36px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.text-page h2 {
  margin-top: 0;
}

.text-page p,
.text-page li {
  color: #374151;
  line-height: 1.9;
}

.text-page ul {
  padding-left: 22px;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
}

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

.footer-brand {
  color: #ffffff;
  font-size: 22px;
}

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

.site-footer p {
  max-width: 380px;
  color: #9ca3af;
  line-height: 1.8;
}

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

.site-footer a:hover {
  color: #f59e0b;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 28px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #6b7280;
  font-size: 14px;
}

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

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

  .header-search {
    margin-left: auto;
  }

  .menu-toggle {
    display: block;
  }

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

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

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

  .related-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 66px;
  }

  .brand-text {
    font-size: 18px;
  }

  .header-search {
    display: none;
  }

  .hero-slider {
    height: 560px;
  }

  .hero-content {
    left: 20px;
    bottom: 76px;
  }

  .hero-control {
    width: 40px;
    height: 40px;
  }

  .section {
    padding: 54px 0;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .movie-card-wide {
    display: block;
  }

  .ranking-row {
    grid-template-columns: 44px 1fr;
  }

  .rank-tags {
    grid-column: 2;
    justify-content: start;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

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

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