:root {
  --primary-900: #333d4f;
  --primary-800: #39475d;
  --primary-700: #42536f;
  --primary-600: #506688;
  --primary-100: #ebeef3;
  --accent-500: #eab308;
  --neutral-950: #0a0a0a;
  --neutral-900: #171717;
  --neutral-800: #262626;
  --neutral-700: #404040;
  --neutral-600: #525252;
  --neutral-500: #737373;
  --neutral-300: #d4d4d4;
  --neutral-200: #e5e5e5;
  --neutral-100: #f5f5f5;
  --neutral-50: #fafafa;
  --white: #ffffff;
  --shadow: 0 16px 45px rgba(20, 29, 43, 0.12);
  --shadow-soft: 0 8px 24px rgba(20, 29, 43, 0.08);
  --radius: 18px;
}

* {
  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(--neutral-900);
  background: var(--neutral-50);
  line-height: 1.6;
}

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: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 229, 229, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-700), var(--primary-900));
  box-shadow: 0 10px 22px rgba(51, 61, 79, 0.25);
}

.brand-text {
  color: var(--primary-900);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

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

.nav-link,
.mobile-link {
  color: var(--neutral-700);
  font-weight: 650;
  transition: color 0.2s ease;
}

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

.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.search-form input {
  min-width: 260px;
  height: 42px;
  border: 1px solid var(--neutral-300);
  border-radius: 12px;
  outline: none;
  padding: 0 14px;
  color: var(--neutral-800);
  background: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form input:focus,
.local-filter input:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 4px rgba(80, 102, 136, 0.14);
}

.search-form button,
.primary-button,
.secondary-button,
.filter-chip,
.player-start {
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 750;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.search-form button,
.primary-button,
.player-start {
  background: var(--primary-600);
  color: var(--white);
  padding: 10px 18px;
}

.search-form button:hover,
.primary-button:hover,
.player-start:hover {
  background: var(--primary-700);
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(51, 61, 79, 0.18);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.26);
  padding: 10px 18px;
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.24);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--neutral-100);
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--neutral-700);
  border-radius: 10px;
}

.mobile-panel {
  display: none;
  padding: 0 20px 18px;
  border-top: 1px solid var(--neutral-200);
  background: var(--white);
}

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

.mobile-search {
  margin-top: 14px;
}

.mobile-search input {
  min-width: 0;
  width: 100%;
}

.mobile-nav {
  display: grid;
  gap: 12px;
  padding-top: 14px;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  color: var(--white);
  background: var(--neutral-900);
}

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

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,0.82), rgba(0,0,0,0.54) 45%, rgba(0,0,0,0.12));
}

.hero-content {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
}

.hero-text {
  max-width: 680px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(234, 179, 8, 0.94);
  font-size: 14px;
  font-weight: 800;
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 660px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.detail-meta,
.card-meta,
.breadcrumb,
.inline-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta {
  margin: 22px 0;
  color: rgba(255, 255, 255, 0.82);
}

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

.hero-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.46);
  transform: translateY(-50%);
  cursor: pointer;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,0.46);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.section,
.page-hero,
.detail-layout,
.category-layout {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
}

.section {
  padding: 56px 0 0;
}

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

.section h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: var(--neutral-900);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-head p,
.page-hero p,
.category-card p,
.detail-intro,
.detail-text p {
  color: var(--neutral-600);
}

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

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

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

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

.poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--primary-100);
}

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

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

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--white);
  background: var(--primary-600);
  font-size: 13px;
}

.card-body {
  padding: 18px;
}

.card-title {
  display: block;
  margin-bottom: 8px;
  color: var(--neutral-900);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.card-title:hover {
  color: var(--primary-600);
}

.card-desc {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--neutral-600);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  color: var(--neutral-500);
  font-size: 13px;
}

.card-meta a {
  padding: 3px 8px;
  border-radius: 8px;
  color: var(--primary-700);
  background: var(--primary-100);
  font-weight: 750;
}

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

.tag-row span,
.detail-tags span {
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--neutral-700);
  background: var(--neutral-100);
  font-size: 12px;
}

.feature-band {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: stretch;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 48px 120px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.rank-number {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--white);
  background: var(--primary-600);
  font-weight: 850;
}

.rank-row img {
  width: 120px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--primary-100);
}

.rank-info strong {
  display: block;
  font-size: 18px;
}

.rank-info small,
.heat {
  color: var(--neutral-500);
}

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

.category-card {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  color: var(--primary-900);
}

.category-card p {
  margin: 0 0 18px;
}

.category-preview {
  display: grid;
  gap: 8px;
}

.category-preview a {
  color: var(--neutral-700);
}

.category-preview a:hover {
  color: var(--primary-600);
}

.page-hero {
  padding: 60px 0 36px;
}

.page-hero p {
  max-width: 760px;
  font-size: 18px;
}

.local-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 0 0 28px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.local-filter input {
  min-width: min(100%, 320px);
  flex: 1;
  height: 44px;
  border: 1px solid var(--neutral-300);
  border-radius: 12px;
  padding: 0 14px;
  outline: none;
}

.filter-chip {
  padding: 9px 14px;
  color: var(--neutral-700);
  background: var(--neutral-100);
}

.filter-chip.active,
.filter-chip:hover {
  color: var(--white);
  background: var(--primary-600);
}

.detail-hero {
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-900), var(--neutral-900));
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 34px;
  padding: 42px 0;
}

.breadcrumb {
  margin-bottom: 18px;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
}

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

.detail-title h1 {
  color: var(--white);
}

.detail-intro {
  color: rgba(255,255,255,0.78);
  font-size: 18px;
}

.detail-meta {
  margin: 18px 0 20px;
}

.detail-meta span,
.detail-meta a {
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255,255,255,0.12);
}

.detail-poster {
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--primary-100);
}

.player-section {
  width: min(1240px, calc(100% - 40px));
  margin: 46px auto 0;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: var(--neutral-900);
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(0,0,0,0.15), rgba(0,0,0,0.64));
  z-index: 2;
}

.player-overlay[hidden] {
  display: none;
}

.player-panel {
  display: grid;
  gap: 16px;
  place-items: center;
  color: var(--white);
  text-align: center;
}

.player-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  font-size: 30px;
  backdrop-filter: blur(10px);
}

.detail-content {
  width: min(1240px, calc(100% - 40px));
  margin: 36px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
}

.content-card,
.side-card {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.detail-text h2,
.side-card h2 {
  margin: 0 0 16px;
  color: var(--neutral-900);
}

.detail-text p {
  margin: 0 0 18px;
  font-size: 17px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

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

.side-list a {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: center;
}

.side-list img {
  width: 84px;
  height: 56px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--primary-100);
}

.side-list strong {
  display: block;
  line-height: 1.35;
}

.side-list small {
  color: var(--neutral-500);
}

.search-box-large {
  display: flex;
  gap: 12px;
  margin-top: 26px;
  max-width: 760px;
}

.search-box-large input {
  flex: 1;
  min-width: 0;
  height: 52px;
  border: 1px solid var(--neutral-300);
  border-radius: 14px;
  padding: 0 16px;
  outline: none;
}

.search-box-large button {
  border: 0;
  border-radius: 14px;
  padding: 0 22px;
  color: var(--white);
  background: var(--primary-600);
  font-weight: 800;
}

.empty-state {
  padding: 32px;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--neutral-600);
  box-shadow: var(--shadow-soft);
}

.site-footer {
  margin-top: 70px;
  background: var(--primary-900);
  color: rgba(255, 255, 255, 0.78);
}

.footer-inner {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner strong {
  display: block;
  color: var(--white);
  font-size: 20px;
  margin-bottom: 8px;
}

.footer-inner p {
  margin: 0;
  max-width: 620px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: start;
  justify-content: flex-end;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.78);
}

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

.hidden-by-filter {
  display: none !important;
}

@media (max-width: 1024px) {
  .movie-grid,
  .movie-grid.three,
  .category-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-band,
  .detail-layout,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 420px;
  }
}

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

  .header-inner {
    gap: 14px;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .hero {
    height: 560px;
  }

  .hero-arrow {
    display: none;
  }

  .rank-row {
    grid-template-columns: 40px 92px 1fr;
  }

  .rank-row img {
    width: 92px;
    height: 62px;
  }

  .heat {
    display: none;
  }
}

@media (max-width: 640px) {
  .brand-text {
    font-size: 18px;
  }

  .hero {
    height: 520px;
  }

  .hero h1 {
    font-size: 40px;
  }

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

  .section,
  .page-hero {
    width: min(100% - 28px, 1240px);
  }

  .section-head,
  .footer-inner {
    align-items: start;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .search-box-large {
    flex-direction: column;
  }

  .detail-layout,
  .detail-content,
  .player-section {
    width: min(100% - 28px, 1240px);
  }
}
