:root {
  --primary-50: #fef3e2;
  --primary-100: #fde6bd;
  --primary-400: #f7ad18;
  --primary-500: #d89410;
  --primary-600: #b6790d;
  --accent-50: #fff5ed;
  --accent-500: #f95c16;
  --accent-600: #ea420c;
  --secondary-50: #f5f7fa;
  --secondary-700: #3d486a;
  --secondary-800: #353d59;
  --secondary-900: #2f344c;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --card: #ffffff;
  --soft-shadow: 0 2px 15px -3px rgba(0, 0, 0, .07), 0 10px 20px -2px rgba(0, 0, 0, .04);
  --hover-shadow: 0 10px 40px -10px rgba(0, 0, 0, .15);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f9fafb;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  line-height: 1.5;
}

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

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

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
  backdrop-filter: blur(6px);
}

.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  box-shadow: var(--soft-shadow);
}

.brand-text {
  font-size: 22px;
  background: linear-gradient(90deg, var(--primary-600), var(--accent-600));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link {
  color: #374151;
  font-weight: 700;
  transition: color .2s ease;
}

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

.menu-toggle {
  display: none;
  padding: 8px 10px;
  border-radius: 10px;
  background: transparent;
  color: #111827;
}

.menu-toggle:hover {
  background: #f3f4f6;
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 12px 20px 18px;
}

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

.mobile-link {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: #374151;
  font-weight: 700;
}

.mobile-link:hover {
  background: var(--primary-50);
  color: var(--primary-600);
}

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #000;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity .6s ease, transform .8s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

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

.hero-overlay,
.detail-hero-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .96), rgba(0, 0, 0, .5), rgba(0, 0, 0, .08));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 76px;
  width: min(1180px, calc(100% - 48px));
  transform: translateX(-50%);
  color: #fff;
}

.hero-content > * {
  max-width: 680px;
}

.hero-kicker,
.hero-meta,
.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.hero-kicker span,
.detail-intro > p {
  display: inline-flex;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .2);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  backdrop-filter: blur(5px);
}

.hero-kicker span:first-child,
.detail-intro > p {
  background: var(--primary-500);
}

.hero-content h1 {
  margin: 18px 0 12px;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1.05;
}

.hero-content p {
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: 18px;
}

.hero-meta {
  margin-bottom: 30px;
  color: #f3f4f6;
}

.hero-meta span:last-child,
.detail-meta span:last-child {
  color: #facc15;
  font-weight: 800;
}

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

.primary-button,
.ghost-button,
.side-link,
.quick-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}

.primary-button,
.quick-search button {
  background: var(--primary-500);
  color: #fff;
}

.primary-button:hover,
.quick-search button:hover {
  background: var(--primary-600);
  transform: translateY(-1px);
}

.ghost-button {
  background: rgba(255, 255, 255, .12);
  color: #fff;
  backdrop-filter: blur(6px);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, .22);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(4px);
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, .22);
}

.hero-prev {
  left: 20px;
}

.hero-next {
  right: 20px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
}

.hero-dot.is-active {
  width: 28px;
  background: #fff;
}

.quick-search {
  max-width: 1180px;
  margin: -34px auto 34px;
  padding: 0 24px;
  position: relative;
  z-index: 5;
}

.quick-search form {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr;
  gap: 18px;
  align-items: center;
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .95);
  box-shadow: var(--hover-shadow);
  backdrop-filter: blur(8px);
}

.quick-search label,
.filter-bar label span {
  font-weight: 900;
  color: var(--secondary-900);
}

.quick-search form > div {
  display: flex;
  gap: 12px;
}

.quick-search input,
.filter-bar input {
  width: 100%;
  height: 48px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 0 18px;
  outline: none;
  background: #fff;
}

.quick-search input:focus,
.filter-bar input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(216, 148, 16, .16);
}

.content-section {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto 56px;
}

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

.section-heading p {
  margin: 0 0 6px;
  color: var(--primary-600);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .08em;
}

.section-heading h2 {
  margin: 0;
  color: var(--secondary-900);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.section-heading a {
  color: var(--primary-600);
  font-weight: 800;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, .9fr);
  gap: 28px;
  align-items: start;
}

.featured-panel,
.ranking-panel,
.player-card,
.detail-article,
.detail-side {
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.featured-panel,
.ranking-panel {
  padding: 24px;
}

.compact-heading {
  margin-bottom: 16px;
}

.compact-list {
  display: grid;
  gap: 16px;
}

.compact-card a {
  display: flex;
  gap: 16px;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  transition: box-shadow .25s ease, transform .25s ease;
}

.compact-card a:hover {
  box-shadow: var(--hover-shadow);
  transform: translateY(-2px);
}

.compact-card img {
  flex: 0 0 160px;
  width: 160px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
}

.compact-card span {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.compact-card strong,
.movie-info strong,
.ranking-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-card strong {
  color: #111827;
  font-size: 18px;
}

.compact-card em,
.ranking-card em,
.movie-meta {
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
}

.compact-card small,
.ranking-card small {
  color: #6b7280;
  font-size: 13px;
}

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

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

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

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

.poster-link {
  display: block;
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--secondary-800), var(--secondary-900));
  box-shadow: var(--soft-shadow);
  transition: box-shadow .25s ease, transform .25s ease;
}

.poster-wrap img,
.category-cover img,
.category-mosaic img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-link:hover .poster-wrap {
  box-shadow: var(--hover-shadow);
  transform: translateY(-2px);
}

.poster-link:hover .poster-wrap img,
.compact-card a:hover img,
.ranking-card a:hover img {
  transform: scale(1.05);
}

.poster-wrap img,
.compact-card img,
.ranking-card img {
  transition: transform .35s ease;
}

.rating-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 4px 8px;
  border-radius: 9px;
  background: rgba(0, 0, 0, .72);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(4px);
}

.movie-info {
  display: grid;
  gap: 6px;
  padding: 12px 2px 0;
}

.movie-info strong {
  color: #111827;
  font-size: 16px;
}

.poster-link:hover .movie-info strong {
  color: var(--primary-600);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 8px;
  background: var(--primary-50);
  color: var(--primary-600);
  font-size: 12px;
  font-weight: 800;
}

.large-tags span {
  background: rgba(255, 255, 255, .16);
  color: #fff;
}

.ranking-panel h2 {
  margin: 0 0 18px;
  color: var(--secondary-900);
  font-size: 24px;
}

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

.ranking-card a {
  display: grid;
  grid-template-columns: 46px 92px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  transition: box-shadow .25s ease, transform .25s ease;
}

.home-ranking .ranking-card a {
  grid-template-columns: 38px 76px 1fr;
}

.home-ranking .score-pill {
  display: none;
}

.ranking-card a:hover {
  box-shadow: var(--hover-shadow);
  transform: translateY(-2px);
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  color: #fff;
  font-weight: 900;
}

.ranking-card img {
  width: 92px;
  height: 62px;
  border-radius: 12px;
  object-fit: cover;
}

.ranking-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.score-pill {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--primary-50);
  color: var(--primary-600);
  font-weight: 900;
}

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

.category-card,
.category-large-card a {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}

.category-card:hover,
.category-large-card a:hover {
  transform: translateY(-3px);
  box-shadow: var(--hover-shadow);
}

.category-cover,
.category-mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  min-height: 112px;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--secondary-800), var(--secondary-900));
}

.category-cover img,
.category-mosaic img {
  min-height: 112px;
}

.category-card strong,
.category-large-body strong {
  color: var(--secondary-900);
  font-size: 20px;
}

.category-card em,
.category-large-body em {
  color: var(--muted);
  font-style: normal;
  font-size: 14px;
}

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

.category-large-body {
  display: grid;
  gap: 10px;
}

.category-large-body span {
  color: var(--primary-600);
  font-weight: 900;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 40px;
  color: #fff;
  background: linear-gradient(135deg, var(--secondary-900), var(--secondary-800), #111827);
}

.page-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 360px;
  height: 360px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(249, 92, 22, .34), transparent 62%);
}

.page-hero > div {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 70px 0;
}

.page-hero p {
  margin: 0 0 12px;
  color: var(--primary-400);
  font-weight: 900;
  letter-spacing: .08em;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 54px);
}

.page-hero span {
  display: block;
  max-width: 760px;
  color: #e5e7eb;
  font-size: 18px;
}

.filter-bar {
  display: grid;
  gap: 16px;
  width: min(1180px, calc(100% - 48px));
  margin: -18px auto 34px;
  padding: 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--soft-shadow);
}

.filter-bar label {
  display: grid;
  gap: 10px;
}

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

.filter-chips button {
  padding: 8px 14px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-weight: 800;
}

.filter-chips button.is-active,
.filter-chips button:hover {
  background: var(--primary-500);
  color: #fff;
}

.empty-state {
  margin: 36px 0;
  padding: 28px;
  border-radius: 18px;
  background: #fff;
  color: var(--muted);
  text-align: center;
  box-shadow: var(--soft-shadow);
}

.detail-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: #000;
}

.detail-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 36px;
  align-items: end;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 110px 0 70px;
  color: #fff;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: var(--hover-shadow);
}

.detail-intro h1 {
  margin: 18px 0 18px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
}

.detail-meta {
  margin-bottom: 18px;
  color: #e5e7eb;
}

.detail-one-line {
  max-width: 800px;
  margin: 22px 0 26px;
  color: #f3f4f6;
  font-size: 18px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
  margin-top: 42px;
}

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

.player-card {
  padding: 16px;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: #050505;
}

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

.video-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  background: linear-gradient(to top, rgba(0, 0, 0, .86), rgba(0, 0, 0, .28));
  color: #fff;
  text-align: center;
}

.video-shell.is-playing .video-cover {
  display: none;
}

.play-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  font-size: 28px;
  box-shadow: var(--hover-shadow);
}

.video-cover strong {
  font-size: 22px;
}

.detail-article {
  padding: 30px;
}

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

.detail-article p {
  margin: 0 0 26px;
  color: #374151;
  font-size: 17px;
  line-height: 1.85;
}

.inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inline-links a {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--primary-50);
  color: var(--primary-600);
  font-weight: 800;
}

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

.detail-side h2 {
  margin: 0 0 18px;
  font-size: 22px;
}

.detail-side dl {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px 14px;
  margin: 0 0 22px;
}

.detail-side dt {
  color: var(--muted);
}

.detail-side dd {
  margin: 0;
  color: #111827;
  font-weight: 800;
}

.side-link {
  width: 100%;
  margin-top: 10px;
  background: var(--primary-50);
  color: var(--primary-600);
}

.side-link:hover {
  background: var(--primary-500);
  color: #fff;
}

.site-footer {
  margin-top: 70px;
  color: #d1d5db;
  background: linear-gradient(135deg, var(--secondary-900), var(--secondary-800), var(--secondary-900));
}

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

.footer-about p {
  max-width: 520px;
  color: #d1d5db;
}

.footer-brand {
  margin-bottom: 16px;
  color: #fff;
  font-size: 20px;
}

.footer-col h2 {
  margin: 0 0 16px;
  color: var(--primary-400);
  font-size: 17px;
}

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

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

.footer-bottom {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
  color: #9ca3af;
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

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

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

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

  .menu-toggle {
    display: inline-flex;
  }

  .split-section,
  .detail-layout,
  .footer-inner,
  .detail-hero-content {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: 220px;
  }

  .detail-side {
    position: static;
  }

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

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

  .quick-search form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .top-nav {
    padding: 0 16px;
  }

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

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

  .hero-content {
    width: calc(100% - 32px);
    bottom: 58px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-actions,
  .quick-search form > div {
    flex-direction: column;
  }

  .content-section,
  .filter-bar,
  .page-hero > div,
  .detail-hero-content,
  .footer-inner,
  .footer-bottom {
    width: calc(100% - 32px);
  }

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

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

  .compact-card a,
  .ranking-card a {
    grid-template-columns: 1fr;
  }

  .compact-card a {
    display: grid;
  }

  .compact-card img,
  .ranking-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .ranking-card a,
  .home-ranking .ranking-card a {
    grid-template-columns: 38px 1fr;
  }

  .ranking-card img {
    grid-column: 1 / -1;
  }

  .score-pill {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .detail-poster {
    display: none;
  }

  .detail-article {
    padding: 22px;
  }
}
