:root {
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-400: #38bdf8;
  --primary-500: #0ea5e9;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --accent-500: #d97706;
  --accent-600: #b45309;
  --secondary-50: #f8fafc;
  --secondary-100: #f1f5f9;
  --secondary-200: #e2e8f0;
  --secondary-300: #cbd5e1;
  --secondary-400: #94a3b8;
  --secondary-500: #64748b;
  --secondary-600: #475569;
  --secondary-700: #334155;
  --secondary-800: #1e293b;
  --secondary-900: #0f172a;
  --shadow-soft: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
  --shadow-soft-lg: 0 14px 35px -12px rgba(15, 23, 42, 0.28), 0 12px 25px -18px rgba(15, 23, 42, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--secondary-50);
  color: var(--secondary-900);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--secondary-200);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
  color: #fff;
  box-shadow: 0 12px 26px -16px var(--primary-600);
}

.brand-name {
  font-size: 20px;
  letter-spacing: -0.02em;
}

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

.nav-link {
  border-radius: 10px;
  padding: 10px 13px;
  color: var(--secondary-700);
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: var(--primary-50);
  color: var(--primary-700);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
  border: 1px solid var(--secondary-300);
  border-radius: 12px;
  background: #fff;
  color: var(--secondary-900);
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 240px;
  padding: 10px 14px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.16);
}

.header-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.play-button {
  border: 0;
  border-radius: 12px;
  background: var(--primary-600);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.mobile-search button {
  padding: 10px 16px;
}

.header-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.play-button:hover {
  background: var(--primary-700);
  box-shadow: 0 12px 24px -18px var(--primary-600);
  transform: translateY(-1px);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.26);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--secondary-100);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: var(--secondary-700);
}

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

.mobile-panel.open {
  display: grid;
  gap: 10px;
}

.mobile-link {
  display: block;
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  color: var(--secondary-700);
  font-weight: 700;
}

.mobile-search {
  display: flex;
  gap: 8px;
}

.mobile-search input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
}

.hero-section {
  position: relative;
  height: 520px;
  overflow: hidden;
  background: var(--secondary-900);
}

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

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

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

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

.hero-content {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 56px;
  color: #fff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
  max-width: 780px;
  margin: 0 0 12px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content h2 {
  font-size: clamp(30px, 5vw, 52px);
}

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

.hero-tags,
.meta-row,
.sub-meta,
.card-meta,
.breadcrumbs,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags span,
.meta-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 700;
}

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

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

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

.hero-arrow.prev {
  left: 20px;
}

.hero-arrow.next {
  right: 20px;
}

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

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

.hero-dots button.active {
  width: 32px;
  background: #fff;
}

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

.page-section {
  padding: 54px 0 0;
}

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

.section-heading div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-heading h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: var(--secondary-900);
  font-size: 28px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-title p,
.detail-title p {
  max-width: 780px;
  margin: 8px 0 0;
  color: var(--secondary-600);
}

.heading-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--primary-50);
  color: var(--primary-600);
  font-size: 18px;
}

.grid-large,
.grid-cards,
.category-grid {
  display: grid;
  gap: 24px;
}

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

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

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

.movie-card {
  min-width: 0;
}

.card-link,
.large-link,
.horizontal-link,
.category-card a {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-link:hover,
.large-link:hover,
.horizontal-link:hover,
.category-card a:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft-lg);
}

.card-cover,
.large-link,
.horizontal-cover,
.category-covers {
  position: relative;
  overflow: hidden;
}

.card-cover {
  aspect-ratio: 4 / 3;
}

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

.card-link:hover img,
.large-link:hover img,
.horizontal-link:hover img,
.category-card a:hover img {
  transform: scale(1.08);
}

.type-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.type-chip {
  top: 10px;
  right: 10px;
}

.rank-badge {
  top: 10px;
  left: 10px;
  min-width: 30px;
  background: var(--accent-500);
}

.card-body {
  padding: 14px;
}

.card-body h2,
.horizontal-body h2,
.large-content h2 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 8px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-body h2 {
  min-height: 48px;
  color: var(--secondary-900);
  font-size: 16px;
  line-height: 1.45;
}

.card-body p,
.horizontal-body p,
.large-content p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
}

.card-body p {
  min-height: 42px;
  margin: 0 0 10px;
  color: var(--secondary-600);
  font-size: 14px;
  -webkit-line-clamp: 2;
}

.card-meta,
.sub-meta {
  color: var(--secondary-500);
  font-size: 12px;
}

.card-meta {
  justify-content: space-between;
}

.large-link {
  position: relative;
  aspect-ratio: 16 / 9;
}

.cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.18), transparent);
}

.large-content {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  padding: 24px;
  color: #fff;
}

.large-content h2 {
  color: #fff;
  font-size: 25px;
  line-height: 1.2;
}

.large-content p {
  margin: 0 0 13px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  -webkit-line-clamp: 2;
}

.card-horizontal + .card-horizontal {
  margin-top: 16px;
}

.horizontal-link {
  display: flex;
  align-items: stretch;
}

.horizontal-cover {
  width: 210px;
  min-height: 132px;
  flex: 0 0 210px;
}

.horizontal-body {
  flex: 1;
  min-width: 0;
  padding: 18px 18px 18px 0;
}

.horizontal-body h2 {
  color: var(--secondary-900);
  font-size: 19px;
  transition: color 0.2s ease;
}

.horizontal-link:hover h2,
.card-link:hover h2 {
  color: var(--primary-600);
}

.horizontal-body p {
  margin: 0 0 12px;
  color: var(--secondary-600);
  -webkit-line-clamp: 2;
}

.category-card a {
  height: 100%;
}

.category-covers {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  height: 180px;
  background: var(--secondary-200);
}

.category-covers img:first-child {
  grid-row: span 2;
}

.category-body {
  padding: 22px;
}

.category-body h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-body p {
  margin: 0 0 16px;
  color: var(--secondary-600);
}

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

.page-hero {
  background: linear-gradient(135deg, var(--secondary-900), var(--secondary-800));
  color: #fff;
}

.page-title {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0;
}

.page-title h1,
.page-title p {
  color: #fff;
}

.page-title p {
  color: rgba(255, 255, 255, 0.8);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(150px, 190px));
  gap: 12px;
  margin-bottom: 24px;
  border: 1px solid var(--secondary-200);
  border-radius: 18px;
  padding: 16px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  padding: 12px 14px;
}

.empty-state {
  display: none;
  border-radius: 16px;
  padding: 32px;
  background: #fff;
  color: var(--secondary-600);
  text-align: center;
  box-shadow: var(--shadow-soft);
}

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

.breadcrumbs {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 0;
  color: var(--secondary-500);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: var(--primary-700);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 0;
}

.detail-main,
.detail-side,
.detail-text {
  min-width: 0;
}

.detail-title {
  margin-bottom: 20px;
}

.detail-title h1 {
  font-size: clamp(28px, 4vw, 42px);
}

.detail-tags {
  margin-top: 14px;
}

.detail-tags span {
  background: var(--primary-50);
  color: var(--primary-700);
}

.player-shell {
  overflow: hidden;
  border-radius: 18px;
  background: #000;
  box-shadow: var(--shadow-soft-lg);
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
  object-fit: contain;
}

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.25);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-cover img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

.play-cover::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background: linear-gradient(to top, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.18));
}

.play-button {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 24px;
  font-size: 18px;
}

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

.detail-text {
  margin-top: 24px;
  border-radius: 18px;
  padding: 26px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.detail-text h2,
.detail-side h2 {
  margin: 0 0 14px;
  color: var(--secondary-900);
  font-size: 24px;
}

.detail-text p {
  margin: 0 0 18px;
  color: var(--secondary-700);
  line-height: 1.8;
}

.detail-side {
  position: sticky;
  top: 96px;
  align-self: start;
  border-radius: 18px;
  padding: 20px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.side-list .card-horizontal + .card-horizontal {
  margin-top: 12px;
}

.side-list .horizontal-link {
  box-shadow: none;
  border: 1px solid var(--secondary-200);
}

.side-list .horizontal-cover {
  width: 104px;
  min-height: 92px;
  flex-basis: 104px;
}

.side-list .horizontal-body {
  padding: 12px 12px 12px 0;
}

.side-list .horizontal-body h2 {
  margin-bottom: 6px;
  font-size: 15px;
}

.side-list .horizontal-body p,
.side-list .sub-meta span:nth-child(n+3) {
  display: none;
}

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

.site-footer {
  margin-top: 72px;
  background: var(--secondary-900);
  color: #fff;
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 34px;
}

.footer-brand {
  margin-bottom: 14px;
  font-size: 20px;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.site-footer p,
.site-footer a,
.footer-bottom {
  color: var(--secondary-400);
  font-size: 14px;
}

.site-footer p {
  margin: 0;
  line-height: 1.8;
}

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

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

.footer-bottom {
  margin-top: 30px;
  border-top: 1px solid var(--secondary-800);
  padding-top: 24px;
  text-align: center;
}

@media (max-width: 1180px) {
  .grid-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .detail-side {
    position: static;
  }
}

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

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

  .hero-section {
    height: 560px;
  }

  .hero-content {
    padding-bottom: 62px;
  }

  .hero-arrow {
    display: none;
  }

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

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

@media (max-width: 720px) {
  .grid-cards,
  .grid-large {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .section-heading {
    display: block;
  }

  .horizontal-link {
    gap: 0;
  }

  .horizontal-cover {
    width: 132px;
    flex-basis: 132px;
  }

  .horizontal-body {
    padding: 12px 12px 12px 0;
  }

  .horizontal-body h2 {
    font-size: 16px;
  }

  .horizontal-body p {
    font-size: 13px;
  }

  .card-body {
    padding: 12px;
  }

  .card-body p {
    display: none;
  }

  .card-body h2 {
    min-height: 46px;
    font-size: 15px;
  }

  .page-title {
    padding: 38px 0;
  }

  .detail-text {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .header-inner,
  .container,
  .page-title,
  .detail-layout,
  .breadcrumbs,
  .footer-inner,
  .hero-content,
  .mobile-panel {
    width: min(100% - 24px, 1280px);
  }

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

  .hero-content h1,
  .hero-content h2 {
    font-size: 34px;
  }

  .hero-content p {
    font-size: 16px;
  }

  .hero-actions {
    display: grid;
  }

  .grid-cards,
  .grid-large {
    grid-template-columns: 1fr 1fr;
  }

  .horizontal-cover {
    width: 112px;
    flex-basis: 112px;
  }

  .sub-meta span:nth-child(n+4) {
    display: none;
  }
}
