@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Noto+Sans+SC:wght@400;500;600;700;800;900&display=swap");

:root {
  --warm-50: #fffaf4;
  --warm-100: #fff1df;
  --warm-200: #f7dcc0;
  --primary-50: #fff3ec;
  --primary-100: #ffe0d1;
  --primary-400: #fb8a4b;
  --primary-500: #f97316;
  --primary-600: #ea580c;
  --accent-100: #fee2e2;
  --accent-500: #ef4444;
  --accent-700: #b91c1c;
  --secondary-500: #64748b;
  --secondary-600: #475569;
  --secondary-700: #334155;
  --secondary-800: #1e293b;
  --secondary-900: #0f172a;
  --white: #ffffff;
  --shadow: 0 10px 25px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--secondary-800);
  background: var(--warm-50);
  font-family: Inter, "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(247, 220, 192, 0.8);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(14px);
}

.nav-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--secondary-800);
}

.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  box-shadow: 0 10px 22px rgba(249, 115, 22, 0.28);
}

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

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

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

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

.header-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--warm-200);
  border-radius: 999px;
  background: #fff;
}

.header-search input {
  width: 150px;
  padding: 10px 12px;
  border: 0;
  outline: 0;
  font: inherit;
}

.header-search button,
.primary-button,
.secondary-button {
  border: 0;
  cursor: pointer;
  font-weight: 800;
  border-radius: 999px;
}

.header-search button {
  padding: 10px 15px;
  color: #fff;
  background: var(--primary-500);
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--warm-100);
  color: var(--secondary-800);
  font-size: 20px;
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 10px 0 18px;
  border-top: 1px solid var(--warm-200);
}

.mobile-menu.open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--warm-50);
  color: var(--secondary-700);
  font-weight: 700;
}

main,
.page-wrap {
  min-height: 70vh;
}

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

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 12% 20%, rgba(255,255,255,0.23), transparent 28%),
    linear-gradient(135deg, var(--primary-500), var(--primary-400) 45%, var(--accent-500));
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -38% -10%;
  height: 260px;
  background: rgba(255,255,255,0.18);
  filter: blur(45px);
  transform: rotate(-5deg);
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 58px 0 64px;
}

.hero-copy {
  max-width: 820px;
  margin: 0 auto 30px;
  text-align: center;
}

.hero-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy p {
  margin: 0 auto;
  max-width: 760px;
  color: rgba(255,255,255,0.90);
  font-size: clamp(16px, 2.4vw, 21px);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 26px;
  flex-wrap: wrap;
}

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

.primary-button {
  color: var(--primary-600);
  background: #fff;
  box-shadow: var(--shadow);
}

.secondary-button {
  color: #fff;
  border: 1px solid rgba(255,255,255,0.45);
  background: rgba(255,255,255,0.16);
}

.hero-slider {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 24px;
  align-items: stretch;
}

.hero-main-card {
  position: relative;
  min-height: 410px;
  overflow: hidden;
  border-radius: 28px;
  background: var(--secondary-900);
  box-shadow: var(--shadow-lg);
}

.hero-main-card img {
  width: 100%;
  height: 100%;
  min-height: 410px;
  object-fit: cover;
  opacity: 0.86;
  transition: transform 0.8s ease;
}

.hero-main-card:hover img {
  transform: scale(1.04);
}

.hero-main-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 34px;
  background: linear-gradient(180deg, rgba(15,23,42,0.08), rgba(15,23,42,0.88));
}

.hero-main-overlay h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  font-weight: 900;
}

.hero-main-overlay p {
  max-width: 680px;
  margin: 0 0 18px;
  color: rgba(255,255,255,0.88);
}

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

.hero-meta span,
.detail-meta span,
.filter-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
}

.hero-meta span {
  color: #fff;
  background: rgba(255,255,255,0.18);
}

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

.hero-side-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  min-height: 126px;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.24);
  backdrop-filter: blur(14px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-side-card:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.25);
}

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

.hero-side-card div {
  padding: 14px;
}

.hero-side-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.hero-side-card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  color: rgba(255,255,255,0.78);
  font-size: 13px;
}

.section {
  padding: 48px 0;
}

.section.white {
  background: #fff;
}

.section.soft {
  background: linear-gradient(90deg, var(--warm-100), var(--primary-50));
}

.section-title {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.section-title h2 {
  margin: 0;
  color: var(--secondary-800);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
}

.title-line {
  height: 4px;
  flex: 1;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary-500), transparent);
}

.title-line.accent {
  background: linear-gradient(90deg, var(--accent-500), transparent);
}

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

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

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

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

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

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

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

.type-badge,
.rank-badge {
  position: absolute;
  top: 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  padding: 5px 9px;
}

.type-badge {
  right: 10px;
  background: rgba(249, 115, 22, 0.92);
}

.rank-badge {
  left: 10px;
  background: rgba(239, 68, 68, 0.92);
}

.play-hover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--primary-500);
  font-size: 22px;
  opacity: 0;
  background: rgba(15, 23, 42, 0.32);
  transition: opacity 0.2s ease;
}

.play-hover::before {
  content: "";
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  z-index: -1;
}

.movie-card:hover .play-hover {
  opacity: 1;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: var(--secondary-800);
  font-size: 17px;
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-body h3 a:hover,
.compact-title:hover {
  color: var(--primary-600);
}

.card-body p,
.compact-body p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 12px;
  color: var(--secondary-600);
  font-size: 14px;
}

.card-meta,
.meta-row {
  justify-content: space-between;
  color: var(--secondary-500);
  font-size: 13px;
}

.horizontal-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 0 12px;
}

.horizontal-row .movie-card {
  flex: 0 0 280px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
  padding: 10px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.compact-cover {
  display: block;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 10;
}

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

.compact-body {
  min-width: 0;
  padding: 4px 4px 4px 0;
}

.compact-title {
  display: block;
  margin-bottom: 6px;
  font-weight: 900;
  color: var(--secondary-800);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

.category-tile {
  min-height: 168px;
  border-radius: 22px;
  padding: 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.category-tile h2,
.category-tile h3 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 900;
}

.category-tile p {
  margin: 0 0 14px;
  color: rgba(255,255,255,0.84);
}

.category-tile span {
  font-weight: 900;
}

.page-hero {
  padding: 42px 0;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
}

.page-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 900;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: rgba(255,255,255,0.88);
}

.filter-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 26px;
  padding: 18px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--warm-200);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--secondary-800);
  background: #fff;
  font: inherit;
  outline: 0;
}

.filter-row {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 12px;
}

.result-count {
  color: var(--secondary-600);
  font-weight: 700;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 34px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.08);
  font-weight: 800;
}

.pagination a.active,
.pagination a:hover {
  color: #fff;
  background: var(--primary-500);
}

.back-link,
.breadcrumbs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--secondary-600);
  font-weight: 800;
}

.back-link:hover,
.breadcrumbs a:hover {
  color: var(--primary-600);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
  gap: 28px;
  padding: 34px 0 52px;
}

.detail-main,
.detail-side,
.player-card {
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
  margin-bottom: 22px;
}

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

.player-box video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(0,0,0,0.12), rgba(0,0,0,0.48));
  pointer-events: none;
}

.player-overlay button {
  width: 76px;
  height: 76px;
  border: 0;
  border-radius: 50%;
  color: var(--primary-500);
  background: rgba(255,255,255,0.92);
  font-size: 30px;
  cursor: pointer;
  pointer-events: auto;
  box-shadow: var(--shadow-lg);
}

.player-status {
  padding: 12px 16px;
  color: var(--secondary-600);
  font-size: 14px;
  background: #fff;
}

.detail-main {
  padding: 26px;
}

.detail-title {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 900;
}

.detail-meta {
  margin-bottom: 22px;
}

.detail-meta span {
  color: var(--secondary-700);
  background: var(--warm-100);
}

.detail-meta span.primary {
  color: var(--primary-600);
  background: var(--primary-100);
}

.detail-section {
  padding-top: 22px;
  margin-top: 22px;
  border-top: 1px solid var(--warm-200);
}

.detail-section h2,
.detail-section h3 {
  margin: 0 0 12px;
  color: var(--secondary-800);
  font-weight: 900;
}

.detail-section p {
  margin: 0;
  color: var(--secondary-700);
  white-space: pre-line;
}

.review-box {
  padding: 16px;
  border-radius: 16px;
  background: var(--warm-50);
}

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

.tag-list span {
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--accent-700);
  background: var(--accent-100);
  font-size: 13px;
  font-weight: 800;
}

.detail-side {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 20px;
}

.detail-side h2 {
  margin: 0 0 16px;
  font-size: 22px;
  font-weight: 900;
}

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

.site-footer {
  color: var(--warm-100);
  background: var(--secondary-800);
  margin-top: 30px;
}

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

.site-footer p,
.site-footer a {
  display: block;
  margin: 7px 0;
  color: var(--warm-200);
}

.site-footer h3 {
  margin: 0 0 10px;
  color: #fff;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  color: var(--warm-200);
  text-align: center;
  font-size: 14px;
}

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

.no-results {
  display: none;
  padding: 26px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
  color: var(--secondary-600);
  font-weight: 800;
}

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

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

  .nav-shell {
    flex-wrap: wrap;
  }

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

  .hero-slider,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }

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

@media (max-width: 760px) {
  .nav-shell {
    width: min(100% - 22px, 1180px);
    gap: 10px;
  }

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

  .header-search {
    order: 3;
    width: 100%;
  }

  .header-search input {
    width: 100%;
    flex: 1;
  }

  .hero-inner {
    padding: 42px 0;
  }

  .hero-main-card,
  .hero-main-card img {
    min-height: 360px;
  }

  .hero-main-overlay {
    padding: 22px;
  }

  .hero-side-card {
    grid-template-columns: 120px 1fr;
  }

  .movie-grid,
  .movie-grid.three,
  .category-grid,
  .compact-list,
  .filter-row {
    grid-template-columns: 1fr;
  }

  .compact-card {
    grid-template-columns: 130px 1fr;
  }

  .section {
    padding: 34px 0;
  }
}

@media (max-width: 480px) {
  .compact-card,
  .hero-side-card {
    grid-template-columns: 1fr;
  }

  .compact-cover {
    aspect-ratio: 16 / 9;
  }
}
