:root {
  color-scheme: light;
  --primary-50: #f0f9ff;
  --primary-100: #e0f2fe;
  --primary-400: #38bdf8;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --primary-900: #0c4a6e;
  --secondary-400: #fbbf24;
  --secondary-500: #f59e0b;
  --neutral-50: #fafafa;
  --neutral-100: #f5f5f5;
  --neutral-200: #e5e5e5;
  --neutral-500: #737373;
  --neutral-600: #525252;
  --neutral-700: #404040;
  --neutral-900: #171717;
  --shadow-soft: 0 20px 60px rgba(15, 23, 42, 0.12);
  --radius-xl: 24px;
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--neutral-900);
  background: linear-gradient(180deg, #ffffff 0%, var(--primary-50) 45%, #ffffff 100%);
}

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

img {
  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.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(2, 132, 199, 0.08);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  border-radius: 13px;
  box-shadow: 0 12px 30px rgba(2, 132, 199, 0.28);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

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

.brand-copy small {
  margin-top: 4px;
  color: var(--neutral-500);
  font-size: 12px;
}

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

.main-nav a {
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--neutral-600);
  font-size: 14px;
  font-weight: 600;
  transition: 0.2s ease;
}

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

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  background: var(--neutral-100);
  border: 1px solid var(--neutral-200);
  border-radius: 14px;
}

.header-search input {
  width: 180px;
  border: 0;
  background: transparent;
  outline: 0;
  padding: 8px 10px;
}

.header-search button,
.menu-toggle,
.carousel-buttons button {
  border: 0;
  color: #fff;
  background: var(--primary-600);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: 0.2s ease;
}

.header-search button:hover,
.menu-toggle:hover,
.carousel-buttons button:hover {
  background: var(--primary-700);
}

.menu-toggle {
  display: none;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #071827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.45), transparent 40%), linear-gradient(135deg, #06121f, #0f4166 48%, #062033);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 7, 18, 0.92), rgba(3, 7, 18, 0.58) 45%, rgba(3, 7, 18, 0.18));
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(4px) saturate(1.1);
  opacity: 0.42;
  transform: scale(1.08);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 40px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: center;
  padding: 80px 0;
}

.hero-copy {
  color: #fff;
}

.eyebrow,
.section-title span,
.page-hero span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--primary-600);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-copy .eyebrow {
  color: var(--primary-100);
  background: rgba(255, 255, 255, 0.12);
  padding: 8px 12px;
  border-radius: 999px;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 7vw, 80px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 720px;
  margin: 26px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 20px;
  line-height: 1.8;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  color: #075985;
  background: var(--primary-100);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-copy .tag-row span {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: 0.2s ease;
}

.btn.primary,
.btn.full {
  color: #fff;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  box-shadow: 0 14px 34px rgba(2, 132, 199, 0.25);
}

.btn.ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.btn.full {
  width: 100%;
  margin-top: 16px;
}

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

.hero-card {
  align-self: center;
  justify-self: end;
  width: 300px;
  padding: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(14px);
}

.hero-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary-600), #082f49);
}

.hero-card span {
  display: block;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

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

.section-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 70px 20px 0;
}

.section-title {
  margin-bottom: 24px;
}

.section-title h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  color: var(--neutral-900);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.row-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.row-title a {
  color: var(--primary-700);
  font-weight: 800;
}

.category-chip-row,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.category-chip-row a,
.footer-links a {
  padding: 12px 16px;
  color: var(--primary-900);
  background: #fff;
  border: 1px solid var(--primary-100);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(2, 132, 199, 0.08);
  font-weight: 800;
  transition: 0.2s ease;
}

.category-chip-row a:hover,
.footer-links a:hover {
  transform: translateY(-2px);
  color: #fff;
  background: var(--primary-600);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  align-items: start;
  gap: 30px;
}

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

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

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

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

.poster-link {
  display: block;
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #dbeafe, #075985);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
}

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

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

.poster-meta {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 9px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

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

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

.movie-body h3 {
  margin: 13px 0 6px;
  font-size: 17px;
  line-height: 1.35;
}

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

.movie-body p {
  display: -webkit-box;
  min-height: 45px;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--neutral-600);
  font-size: 14px;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-info,
.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--neutral-500);
  font-size: 13px;
  font-weight: 700;
}

.movie-info span,
.meta-line span {
  padding: 4px 8px;
  background: var(--neutral-100);
  border-radius: 999px;
}

.rank-panel,
.content-card,
.category-overview-card a {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(2, 132, 199, 0.08);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  transition: 0.2s ease;
}

.rank-item:hover {
  background: var(--primary-50);
}

.rank-item strong {
  color: var(--primary-700);
  font-size: 15px;
}

.rank-item span {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-item em {
  color: var(--secondary-500);
  font-style: normal;
  font-weight: 900;
}

.movie-carousel {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 20px;
}

.movie-carousel .movie-card {
  flex: 0 0 210px;
  scroll-snap-align: start;
}

.carousel-buttons {
  display: flex;
  gap: 8px;
}

.page-main {
  padding-bottom: 80px;
}

.page-hero {
  max-width: 1240px;
  margin: 0 auto;
  padding: 88px 20px 22px;
}

.page-hero p {
  max-width: 760px;
  color: var(--neutral-600);
  font-size: 18px;
  line-height: 1.8;
}

.small-hero {
  padding-bottom: 0;
}

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

.category-overview-card a {
  display: block;
  min-height: 190px;
  padding: 26px;
  transition: 0.2s ease;
}

.category-overview-card a:hover {
  transform: translateY(-4px);
}

.category-overview-card strong {
  display: block;
  color: var(--primary-900);
  font-size: 28px;
  letter-spacing: -0.04em;
}

.category-overview-card em {
  display: block;
  margin-top: 8px;
  color: var(--neutral-600);
  font-style: normal;
}

.mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.mini-list span {
  padding: 6px 10px;
  color: var(--primary-700);
  background: var(--primary-50);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 150px;
  gap: 12px;
  margin-bottom: 30px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--neutral-200);
  outline: 0;
  padding: 12px 14px;
  background: var(--neutral-50);
  border-radius: 12px;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--primary-400);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16);
}

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

.ranking-card {
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: 20px;
  transition: 0.2s ease;
}

.ranking-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-100);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
}

.ranking-link {
  display: grid;
  grid-template-columns: 64px 72px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
}

.ranking-link strong {
  color: var(--primary-700);
  font-size: 22px;
}

.ranking-thumb {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  background: linear-gradient(135deg, #dbeafe, #075985);
}

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

.ranking-copy {
  min-width: 0;
}

.ranking-copy b,
.ranking-copy em,
.ranking-copy small {
  display: block;
}

.ranking-copy b {
  font-size: 18px;
}

.ranking-copy em {
  margin: 5px 0;
  color: var(--neutral-500);
  font-style: normal;
  font-size: 13px;
}

.ranking-copy small {
  overflow: hidden;
  color: var(--neutral-600);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-link i {
  color: var(--secondary-500);
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.detail-main {
  padding-bottom: 90px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #071827;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(56, 189, 248, 0.35), transparent 38%), linear-gradient(135deg, #06121f, #082f49);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3, 7, 18, 0.92), rgba(3, 7, 18, 0.58));
}

.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: blur(4px) saturate(1.2);
  transform: scale(1.08);
}

.detail-wrap {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
  padding: 54px 20px 70px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 24px;
  padding: 8px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  font-weight: 800;
}

.detail-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

.detail-poster-img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #dbeafe, #075985);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

.detail-copy h1 {
  color: #fff;
  font-size: clamp(38px, 6vw, 72px);
}

.detail-copy .one-line {
  max-width: 850px;
  margin: 20px 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 20px;
  line-height: 1.8;
}

.detail-copy .meta-line span {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.player-section {
  padding-top: 48px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.22), rgba(2, 6, 23, 0.64));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  border-radius: 50%;
  box-shadow: 0 18px 40px rgba(2, 132, 199, 0.35);
  font-size: 34px;
}

.video-shell.is-playing .play-overlay {
  opacity: 0;
  visibility: hidden;
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.content-card {
  padding: 26px;
}

.content-card:nth-child(3) {
  grid-column: 1 / -1;
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-card p {
  margin: 0;
  color: var(--neutral-700);
  font-size: 16px;
  line-height: 1.9;
}

.tag-row.dark span {
  color: var(--primary-900);
  background: var(--primary-50);
}

.site-footer {
  margin-top: 80px;
  padding: 44px 20px;
  color: #fff;
  background: linear-gradient(135deg, #06121f, #082f49);
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
  gap: 28px;
  align-items: start;
}

.footer-inner strong {
  font-size: 24px;
}

.footer-inner p {
  color: rgba(255, 255, 255, 0.7);
}

.footer-links a {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

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

@media (max-width: 1080px) {
  .hero-content,
  .split-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .rank-panel {
    position: static;
    justify-self: start;
  }

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

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: wrap;
    min-height: auto;
    padding: 14px 18px;
  }

  .main-nav {
    display: none;
    order: 4;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .main-nav.open {
    display: flex;
  }

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

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

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

  .hero {
    min-height: 760px;
  }

  .hero-content,
  .detail-grid,
  .detail-content,
  .category-overview-grid,
  .filter-bar,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .detail-poster {
    width: min(280px, 100%);
  }

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

  .ranking-link {
    grid-template-columns: 42px 58px minmax(0, 1fr);
  }

  .ranking-link i {
    display: none;
  }
}

@media (max-width: 520px) {
  .brand-copy small {
    display: none;
  }

  .hero-content {
    width: min(100% - 28px, 1200px);
    gap: 26px;
  }

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

  .hero-copy p,
  .detail-copy .one-line {
    font-size: 16px;
  }

  .section-wrap {
    padding-top: 48px;
  }

  .movie-grid.large,
  .movie-grid,
  .movie-grid.related-grid {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .movie-body p {
    display: none;
  }

  .movie-body h3 {
    font-size: 15px;
  }

  .movie-info span:nth-child(3) {
    display: none;
  }

  .row-title {
    align-items: start;
    flex-direction: column;
  }
}
