:root {
  --primary-50: #e0fafa;
  --primary-100: #b3f0f0;
  --primary-400: #1ab0b0;
  --primary-500: #009999;
  --primary-600: #007a7a;
  --primary-700: #005b5b;
  --secondary-50: #f0f4f8;
  --secondary-100: #d9e2ec;
  --secondary-200: #bcccdc;
  --secondary-300: #9fb3c8;
  --secondary-400: #829ab1;
  --secondary-500: #627d98;
  --secondary-600: #486581;
  --secondary-700: #334e68;
  --secondary-800: #243b53;
  --secondary-900: #102a43;
  --white: #ffffff;
  --black: #000000;
  --radius: 18px;
  --shadow: 0 14px 40px rgba(16, 42, 67, 0.12);
  --shadow-strong: 0 22px 60px rgba(16, 42, 67, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 22px rgba(16, 42, 67, 0.08);
  backdrop-filter: blur(14px);
}

.nav-shell {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 76px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
  border-radius: 14px;
  box-shadow: 0 12px 24px rgba(0, 153, 153, 0.22);
  transform: translateZ(0);
  transition: transform 0.2s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--secondary-900);
}

.brand-subtitle {
  margin-top: 2px;
  color: var(--secondary-500);
  font-size: 12px;
}

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

.nav-link {
  color: var(--secondary-700);
  font-weight: 700;
  transition: color 0.2s ease;
}

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

.header-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  width: min(300px, 28vw);
  border: 1px solid var(--secondary-100);
  border-radius: 999px;
  background: var(--secondary-50);
}

.header-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 10px 12px 10px 16px;
  background: transparent;
  color: var(--secondary-900);
}

.header-search button {
  border: 0;
  padding: 10px 16px;
  color: var(--white);
  background: var(--primary-500);
  font-weight: 700;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--secondary-800);
  background: var(--secondary-100);
}

.mobile-panel {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--secondary-100);
  background: var(--white);
}

.mobile-panel.open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

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

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  color: var(--white);
  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.03);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 24%, rgba(0, 153, 153, 0.34), transparent 26%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.56) 44%, rgba(0, 0, 0, 0.18) 100%),
    linear-gradient(0deg, rgba(16, 42, 67, 0.86), rgba(16, 42, 67, 0.06) 44%, rgba(16, 42, 67, 0.5));
}

.hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  min-height: 100%;
  padding: 72px 0 86px;
}

.hero-copy {
  width: min(720px, 100%);
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(0, 153, 153, 0.9);
  box-shadow: 0 12px 30px rgba(0, 153, 153, 0.22);
  font-size: 14px;
  font-weight: 800;
}

.hero h1,
.hero h2 {
  margin: 18px 0 16px;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 660px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(16px, 2vw, 20px);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.hero-meta span,
.tag,
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-meta span {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

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

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

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: var(--white);
  background: var(--primary-500);
  box-shadow: 0 14px 30px rgba(0, 153, 153, 0.28);
}

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

.btn-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.btn-light {
  color: var(--primary-700);
  background: var(--white);
}

.hero-search {
  position: absolute;
  z-index: 5;
  right: 0;
  bottom: 28px;
  left: 0;
}

.hero-search-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px);
}

.hero-search-card input {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  outline: 0;
  padding: 0 18px;
  color: var(--secondary-900);
  background: rgba(255, 255, 255, 0.94);
}

.hero-dots {
  position: absolute;
  z-index: 6;
  right: 28px;
  bottom: 120px;
  display: flex;
  gap: 10px;
}

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

.hero-dot.active {
  width: 30px;
  background: var(--primary-400);
}

.hero-arrow {
  position: absolute;
  z-index: 6;
  top: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

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

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

.main-section {
  padding: 64px 0 0;
}

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

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

.section-head p,
.page-hero p,
.detail-title p {
  margin: 8px 0 0;
  color: var(--secondary-600);
}

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

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

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

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

.card {
  overflow: hidden;
  border: 1px solid rgba(188, 204, 220, 0.6);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.card-hover {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card-hover:hover {
  border-color: rgba(0, 153, 153, 0.5);
  box-shadow: var(--shadow-strong);
  transform: translateY(-6px);
}

.poster-link {
  display: block;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--secondary-200);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.52), transparent 58%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.card-hover:hover .poster-shade {
  opacity: 1;
}

.poster-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: var(--primary-600);
  background: rgba(255, 255, 255, 0.92);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.card-hover:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.poster-year,
.poster-region,
.rank-badge {
  position: absolute;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
}

.poster-year {
  right: 12px;
  background: rgba(0, 0, 0, 0.68);
}

.poster-region {
  left: 12px;
  max-width: calc(100% - 96px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--primary-500);
}

.rank-badge {
  right: 12px;
  bottom: 12px;
  top: auto;
  background: linear-gradient(135deg, #ffb020, #ff6b35);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0 0 8px;
  color: var(--secondary-900);
  font-size: 18px;
  line-height: 1.3;
}

.movie-info h3 a:hover {
  color: var(--primary-600);
}

.movie-meta,
.movie-one-line {
  margin: 0;
  color: var(--secondary-600);
  font-size: 14px;
}

.movie-one-line {
  display: -webkit-box;
  min-height: 44px;
  margin-top: 9px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag {
  color: var(--primary-700);
  background: var(--primary-50);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip {
  color: var(--secondary-800);
  background: var(--white);
  border: 1px solid var(--secondary-100);
  box-shadow: 0 8px 20px rgba(16, 42, 67, 0.06);
}

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

.category-card {
  position: relative;
  min-height: 170px;
  padding: 24px;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-500), var(--secondary-900));
}

.category-card::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -48px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.category-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 8px;
  font-size: 22px;
}

.category-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 22px;
}

.rank-panel {
  padding: 18px;
}

.rank-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 8px;
  border-bottom: 1px solid var(--secondary-100);
}

.rank-row:last-child {
  border-bottom: 0;
}

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

.rank-num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: var(--white);
  background: var(--secondary-900);
  font-weight: 900;
}

.rank-row:nth-child(-n + 3) .rank-num {
  background: var(--primary-500);
}

.rank-title {
  font-weight: 800;
  color: var(--secondary-900);
}

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

.page-hero {
  padding: 60px 0;
  background:
    radial-gradient(circle at 75% 20%, rgba(0, 153, 153, 0.22), transparent 30%),
    linear-gradient(135deg, var(--secondary-900), var(--secondary-800));
  color: var(--white);
}

.page-hero h1,
.page-hero p {
  color: var(--white);
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
}

.filter-card,
.search-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 26px;
  padding: 14px;
}

.filter-card input,
.search-card input,
.filter-card select {
  min-height: 46px;
  border: 1px solid var(--secondary-100);
  border-radius: 999px;
  outline: 0;
  padding: 0 16px;
  color: var(--secondary-900);
  background: var(--secondary-50);
}

.filter-card input:focus,
.search-card input:focus {
  border-color: var(--primary-500);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--secondary-500);
  font-size: 14px;
}

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

.detail-hero {
  padding: 44px 0 24px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: start;
}

.player-card {
  overflow: hidden;
  background: var(--secondary-900);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--black);
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--black);
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  color: var(--white);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.2));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
  display: inline-grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 50%;
  color: var(--primary-600);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
  font-size: 28px;
  transition: transform 0.2s ease;
}

.play-button:hover {
  transform: scale(1.08);
}

.detail-side {
  padding: 24px;
}

.detail-cover {
  overflow: hidden;
  margin-bottom: 18px;
  border-radius: 16px;
  background: var(--secondary-100);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.detail-title h1 {
  margin-bottom: 12px;
}

.detail-title p {
  font-size: 16px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.meta-item {
  padding: 12px;
  border-radius: 14px;
  background: var(--secondary-50);
}

.meta-item strong {
  display: block;
  color: var(--secondary-500);
  font-size: 12px;
}

.meta-item span {
  color: var(--secondary-900);
  font-weight: 800;
}

.article-card {
  padding: 28px;
}

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

.article-card p {
  margin: 0 0 18px;
  color: var(--secondary-700);
}

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

.search-results-empty {
  padding: 34px;
  text-align: center;
  color: var(--secondary-600);
}

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

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

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

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

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

  .hero {
    height: auto;
    min-height: 640px;
  }

  .hero-content {
    padding-top: 90px;
    padding-bottom: 170px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-dots {
    right: 18px;
    bottom: 132px;
  }

  .hero-search-card,
  .filter-card,
  .search-card {
    grid-template-columns: 1fr;
  }

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

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

  .rank-meta {
    grid-column: 2;
  }
}

@media (max-width: 560px) {
  .container-custom {
    width: min(100% - 24px, 1180px);
  }

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

  .brand-subtitle {
    display: none;
  }

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

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

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

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

  .article-card,
  .detail-side {
    padding: 20px;
  }
}

.category-overview {
  display: grid;
  grid-template-columns: 1fr;
}
.category-overview-covers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  background: var(--secondary-100);
}
.category-overview-covers img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
}
.category-overview-body {
  padding: 20px;
}
.category-overview-body h2 {
  margin: 0 0 8px;
  font-size: 24px;
}
.category-overview-body p {
  margin: 0;
  color: var(--secondary-600);
}
