:root {
  --bg: #f9fafb;
  --panel: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #e5e7eb;
  --ocean: #0284c7;
  --ocean-dark: #0369a1;
  --ocean-soft: #e0f2fe;
  --island: #16a34a;
  --sand: #fef9c3;
  --shadow-soft: 0 2px 15px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
  font-family: Inter, "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-soft);
}

.site-nav {
  width: min(100% - 32px, 1280px);
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  white-space: nowrap;
  background: linear-gradient(90deg, var(--ocean), var(--island));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--ocean), var(--island));
  color: #fff;
  font-size: 13px;
  box-shadow: 0 10px 25px rgba(2, 132, 199, 0.25);
}

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

.nav-link {
  color: #4b5563;
  font-size: 14px;
  font-weight: 700;
  transition: color 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--ocean);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 10px;
  background: #374151;
}

.main-wrap {
  min-height: 60vh;
}

.hero {
  position: relative;
  min-height: 500px;
  height: 70vh;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.35) 48%, rgba(0, 0, 0, 0.1)), linear-gradient(0deg, rgba(0, 0, 0, 0.75), transparent 45%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 72px;
  z-index: 2;
  width: min(680px, calc(100% - 48px));
  color: #fff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 16px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 640px;
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: clamp(16px, 2vw, 20px);
}

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

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

.primary-btn {
  color: #fff;
  background: linear-gradient(90deg, var(--ocean), var(--island));
  box-shadow: 0 14px 30px rgba(2, 132, 199, 0.25);
}

.secondary-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(8px);
}

.primary-btn:hover,
.secondary-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.hero-controls {
  position: absolute;
  right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 72px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 42px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition: background 0.25s ease, width 0.25s ease;
}

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

.section,
.page-hero,
.detail-layout {
  width: min(100% - 32px, 1280px);
  margin: 0 auto;
}

.section {
  padding: 56px 0;
}

.section.alt {
  width: 100%;
  max-width: none;
  background: #fff;
}

.section.alt > .section-inner {
  width: min(100% - 32px, 1280px);
  margin: 0 auto;
}

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

.section-heading h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: #111827;
}

.section-heading p,
.page-hero p,
.detail-title p {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 760px;
}

.section-more {
  color: var(--ocean);
  font-weight: 800;
  white-space: nowrap;
}

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 260px;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 0 18px;
  scroll-snap-type: x proximity;
}

.rail .movie-card {
  scroll-snap-align: start;
}

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

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

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

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

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

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

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

.watch-pill {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  font-size: 13px;
  font-weight: 800;
}

.rank-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--ocean), var(--island));
  font-weight: 900;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.card-content {
  padding: 16px;
}

.meta-row,
.tag-row,
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.meta-row span,
.tag-row span,
.breadcrumbs a,
.breadcrumbs span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--ocean-soft);
  color: var(--ocean-dark);
  font-size: 12px;
  font-weight: 800;
}

.tag-row span {
  background: #dcfce7;
  color: #166534;
}

.card-content h3 {
  margin: 12px 0 8px;
  color: #111827;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-content h3 a:hover {
  color: var(--ocean);
}

.card-content p {
  min-height: 45px;
  margin: 0 0 12px;
  color: #6b7280;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.category-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, #fff, #f0f9ff 52%, #f0fdf4);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(2, 132, 199, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.category-card p {
  margin: 0;
  color: var(--muted);
}

.category-link {
  margin-top: 24px;
  color: var(--ocean);
  font-weight: 900;
}

.page-hero {
  padding: 52px 0 20px;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.search-box {
  flex: 1 1 320px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--muted);
  font-weight: 800;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #111827;
}

.filter-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}

.filter-chip {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: #4b5563;
  background: #f3f4f6;
  font-weight: 800;
  white-space: nowrap;
}

.filter-chip.is-active,
.filter-chip:hover {
  color: #fff;
  background: linear-gradient(90deg, var(--ocean), var(--island));
}

.global-results {
  margin-bottom: 24px;
  padding: 18px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.global-results h3 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 900;
}

.global-result-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.global-result {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: #f9fafb;
}

.global-result img {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
}

.global-result strong,
.global-result span {
  display: block;
}

.global-result strong {
  margin-bottom: 6px;
  font-size: 15px;
  line-height: 1.35;
}

.global-result span {
  color: var(--muted);
  font-size: 12px;
}

.ranking-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 46px 74px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.ranking-number {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--ocean), var(--island));
  font-weight: 900;
}

.ranking-item img {
  width: 74px;
  height: 96px;
  border-radius: 14px;
  object-fit: cover;
}

.ranking-text strong,
.ranking-text em {
  display: block;
}

.ranking-text strong {
  margin-bottom: 5px;
  font-size: 16px;
  line-height: 1.35;
}

.ranking-text em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.detail-hero {
  background: #0f172a;
  color: #fff;
}

.detail-backdrop {
  position: relative;
  min-height: 460px;
  overflow: hidden;
}

.detail-backdrop > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
  filter: blur(1px);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.56)), linear-gradient(0deg, #0f172a, transparent 65%);
}

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  padding: 70px 0 48px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.breadcrumbs {
  margin-bottom: 18px;
}

.breadcrumbs a,
.breadcrumbs span {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.12);
}

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

.detail-title p {
  max-width: 780px;
  color: #d1d5db;
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 26px;
}

.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: #e5e7eb;
  font-weight: 800;
  font-size: 13px;
}

.player-section {
  width: min(100% - 32px, 1120px);
  margin: 48px auto 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow-hover);
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  color: #fff;
  background: #000;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.18), rgba(0, 0, 0, 0.72));
}

.player-cover span {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 112px;
  height: 112px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--ocean), var(--island));
  color: #fff;
  font-weight: 900;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.42);
}

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

.content-panel {
  width: min(100% - 32px, 1120px);
  margin: 32px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
}

.article-box,
.side-box {
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  padding: 28px;
}

.article-box h2,
.side-box h2 {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 900;
}

.article-box p {
  margin: 0 0 18px;
  color: #374151;
  font-size: 16px;
}

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

.related-list a {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f9fafb;
  transition: background 0.25s ease;
}

.related-list a:hover {
  background: #f0f9ff;
}

.related-list img {
  width: 70px;
  height: 94px;
  border-radius: 12px;
  object-fit: cover;
}

.related-list strong,
.related-list span {
  display: block;
}

.related-list strong {
  margin-bottom: 6px;
  line-height: 1.35;
}

.related-list span {
  color: var(--muted);
  font-size: 13px;
}

.site-footer {
  margin-top: 64px;
  background: #111827;
  color: #d1d5db;
}

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

.footer-logo {
  color: #fff;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}

.footer-brand p {
  max-width: 520px;
  margin: 18px 0 0;
  color: #9ca3af;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
}

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

.site-footer a:hover {
  color: #38bdf8;
}

.footer-bottom {
  border-top: 1px solid #1f2937;
  padding: 20px 16px;
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}

.is-filtered-out {
  display: none !important;
}

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

  .content-panel,
  .ranking-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 16px 18px;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid #eef2f7;
    box-shadow: var(--shadow-soft);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-link {
    padding: 12px 14px;
    border-radius: 12px;
  }

  .nav-link:hover,
  .nav-link.is-active {
    background: var(--ocean-soft);
  }

  .hero {
    height: 640px;
  }

  .hero-content {
    bottom: 106px;
  }

  .hero-controls {
    left: 24px;
    right: auto;
    bottom: 58px;
  }

  .filter-bar,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-chips {
    width: 100%;
  }

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

  .detail-layout {
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 20px;
    padding-top: 44px;
  }

  .detail-backdrop {
    min-height: 520px;
  }

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

@media (max-width: 560px) {
  .site-logo,
  .footer-logo {
    font-size: 20px;
  }

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

  .movie-grid,
  .category-grid,
  .global-result-list {
    grid-template-columns: 1fr;
  }

  .rail {
    grid-auto-columns: 72%;
  }

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

  .detail-poster {
    width: 190px;
  }

  .player-cover span {
    width: 86px;
    height: 86px;
  }

  .article-box,
  .side-box {
    padding: 22px;
  }
}
