:root {
  --primary: #0284c7;
  --primary-dark: #0369a1;
  --primary-soft: #e0f2fe;
  --accent: #f97316;
  --accent-soft: #ffedd5;
  --ink: #1c1917;
  --muted: #78716c;
  --line: #e7e5e4;
  --surface: #ffffff;
  --soft: #f8fafc;
  --dark: #0f172a;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(231, 229, 228, 0.88);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.header-inner {
  max-width: 1280px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #38bdf8);
  box-shadow: 0 12px 24px rgba(2, 132, 199, 0.24);
}

.brand-name {
  display: block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.1;
}

.brand-subtitle {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

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

.nav-links a,
.mobile-nav a {
  padding: 10px 14px;
  border-radius: 12px;
  color: #57534e;
  font-size: 14px;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active,
.mobile-nav a:hover,
.mobile-nav a.is-active {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.nav-search {
  display: flex;
  align-items: center;
  width: min(260px, 26vw);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 6px 0 14px;
  background: #ffffff;
}

.nav-search input,
.filter-input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
}

.nav-search button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: var(--primary);
  cursor: pointer;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--ink);
  background: #f5f5f4;
  font-size: 22px;
}

.mobile-nav {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 18px;
  gap: 8px;
  flex-wrap: wrap;
}

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

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero {
  position: relative;
  min-height: 560px;
  height: 66vh;
  max-height: 720px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
}

.hero-slide.is-active {
  display: flex;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 18%, rgba(14, 165, 233, 0.42), transparent 32%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.76) 42%, rgba(15, 23, 42, 0.24) 100%),
    linear-gradient(0deg, rgba(15, 23, 42, 0.82), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 74px 24px 96px;
  color: #ffffff;
}

.hero-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.16);
  border: 1px solid rgba(186, 230, 253, 0.22);
  font-size: 13px;
  font-weight: 700;
}

.hero h1,
.hero h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  font-weight: 900;
}

.hero-summary {
  max-width: 690px;
  margin: 22px 0 0;
  color: #e0f2fe;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-meta {
  margin-top: 22px;
}

.pill,
.meta-pill,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.88);
}

.hero-actions,
.section-head,
.filter-bar,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), #38bdf8);
  box-shadow: 0 18px 32px rgba(2, 132, 199, 0.28);
}

.btn-ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
}

.hero-dots {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
}

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

.hero-dot.is-active {
  width: 30px;
  background: #ffffff;
}

.home-panel {
  position: relative;
  z-index: 8;
  margin: -48px auto 0;
  border-radius: 24px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  border: 1px solid rgba(226, 232, 240, 0.78);
}

.home-panel form,
.search-panel form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.home-panel input,
.search-panel input,
.filter-input {
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
}

.section {
  margin-top: 58px;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 22px;
}

.section-title {
  margin: 0;
  font-size: clamp(24px, 3.5vw, 34px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #0f172a;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

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

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

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 210px);
  gap: 16px;
  overflow-x: auto;
  padding: 2px 2px 18px;
  scroll-snap-type: x proximity;
}

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.84);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 42px rgba(15, 23, 42, 0.13);
  border-color: rgba(14, 165, 233, 0.32);
}

.poster-link {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #e0f2fe, #f8fafc);
}

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.72), transparent);
}

.poster-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  left: 10px;
  top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 132, 199, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  background: linear-gradient(135deg, var(--accent), #f43f5e);
}

.card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 178px;
}

.meta-line {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.movie-title {
  margin: 0;
  color: #0f172a;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 850;
}

.movie-title a:hover {
  color: var(--primary-dark);
}

.movie-line {
  margin: 0;
  color: #57534e;
  font-size: 13px;
  line-height: 1.62;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag {
  min-height: 24px;
  color: var(--primary-dark);
  background: var(--primary-soft);
}

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

.category-card {
  min-height: 164px;
  padding: 22px;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, #f0f9ff);
  border: 1px solid rgba(226, 232, 240, 0.92);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
}

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

.category-card .link-more {
  display: inline-flex;
  margin-top: 18px;
  color: var(--primary-dark);
  font-weight: 800;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 52px 92px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.82);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.rank-num {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), #38bdf8);
}

.ranking-thumb {
  width: 92px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
  background: #e0f2fe;
}

.ranking-item h2,
.ranking-item h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 900;
}

.ranking-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.page-hero {
  margin: 26px auto 0;
  padding: 42px;
  border-radius: 28px;
  color: #ffffff;
  background:
    radial-gradient(circle at 88% 22%, rgba(56, 189, 248, 0.54), transparent 34%),
    linear-gradient(135deg, #0f172a, #0369a1 58%, #0ea5e9);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 950;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: #e0f2fe;
  line-height: 1.8;
}

.filter-bar {
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.filter-input {
  max-width: 420px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--primary-dark);
  font-weight: 700;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.player-card,
.detail-side,
.content-card {
  border-radius: 24px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(14, 165, 233, 0.24), rgba(2, 6, 23, 0.36));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-circle {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-dark);
  font-size: 34px;
  box-shadow: 0 20px 45px rgba(2, 6, 23, 0.32);
}

.detail-title-block {
  padding: 24px;
}

.detail-title-block h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  font-weight: 950;
  letter-spacing: -0.04em;
  color: #0f172a;
}

.detail-title-block p {
  margin: 0;
  color: #57534e;
  line-height: 1.8;
}

.detail-side {
  padding: 18px;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 18px;
  background: #e0f2fe;
}

.detail-facts {
  margin: 18px 0 0;
  display: grid;
  gap: 10px;
}

.fact {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 10px;
}

.fact strong {
  color: #0f172a;
}

.content-card {
  padding: 28px;
}

.content-card h2 {
  margin: 0 0 14px;
  color: #0f172a;
  font-size: 24px;
  font-weight: 900;
}

.content-card p {
  margin: 0 0 18px;
  color: #44403c;
  line-height: 1.9;
}

.site-footer {
  margin-top: 72px;
  padding: 48px 0;
  color: #cbd5e1;
  background: #0f172a;
}

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

.site-footer h2,
.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.site-footer p,
.site-footer a {
  color: #cbd5e1;
  line-height: 1.8;
  font-size: 14px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid rgba(203, 213, 225, 0.18);
  color: #94a3b8;
  font-size: 13px;
}

.empty-state {
  display: none;
  padding: 32px;
  border-radius: 22px;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
}

.movie-card.is-hidden {
  display: none;
}

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

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

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

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

  .menu-button {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

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

  .hero h1,
  .hero h2 {
    font-size: clamp(34px, 12vw, 58px);
  }

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

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

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

  .detail-side {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 18px;
  }

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

@media (max-width: 640px) {
  .header-inner {
    height: 64px;
    padding: 0 16px;
  }

  .brand {
    min-width: 0;
  }

  .brand-subtitle {
    display: none;
  }

  .container {
    padding: 0 16px;
  }

  .hero-content {
    padding: 64px 16px 90px;
  }

  .hero-summary {
    font-size: 15px;
  }

  .home-panel form,
  .search-panel form {
    grid-template-columns: 1fr;
  }

  .section {
    margin-top: 42px;
  }

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

  .card-body {
    padding: 12px;
    min-height: 164px;
  }

  .movie-title {
    font-size: 15px;
  }

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

  .ranking-item {
    grid-template-columns: 38px 74px 1fr;
  }

  .ranking-item .btn {
    grid-column: 2 / -1;
    width: 100%;
  }

  .page-hero {
    padding: 28px;
    border-radius: 22px;
  }

  .filter-bar {
    display: block;
  }

  .filter-input {
    max-width: none;
    margin-top: 12px;
  }

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

  .play-circle {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }

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