:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #059669;
  --primary-deep: #047857;
  --accent: #0d9488;
  --soft: #ecfdf5;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --radius: 22px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 44%, #f1f5f9 100%);
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.72);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  max-width: 1200px;
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 20px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(5, 150, 105, 0.28);
}

.brand-name {
  font-size: 1.08rem;
}

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

.nav-link,
.mobile-link {
  color: #334155;
  font-weight: 700;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
  padding: 10px 15px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--primary-deep);
  background: var(--soft);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 0;
  background: var(--soft);
  border-radius: 14px;
  cursor: pointer;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: var(--primary-deep);
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  padding: 0 20px 16px;
}

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

.mobile-link {
  padding: 12px 14px;
}

.hero {
  position: relative;
  overflow: hidden;
  background: #031b18;
}

.hero-stage {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.9s ease;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.92));
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(167, 243, 208, 0.34);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero h1,
.page-hero h1 {
  margin: 24px 0 12px;
  font-size: clamp(2.35rem, 7vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.hero h2 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(1.55rem, 4vw, 3.4rem);
  line-height: 1.12;
}

.hero p {
  max-width: 760px;
  margin: 0;
  color: #dffcf1;
  font-size: clamp(1rem, 2.4vw, 1.32rem);
}

.hero-tags,
.detail-tags,
.movie-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

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

.hero-tags span,
.detail-tags span,
.movie-tags span {
  color: #065f46;
  background: #d1fae5;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

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

.btn,
.home-search button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn {
  min-height: 48px;
  padding: 0 22px;
}

.btn.primary,
.home-search button,
.btn.small {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 16px 28px rgba(5, 150, 105, 0.28);
}

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

.btn.small {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.9rem;
}

.btn:hover,
.home-search button:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.hero-control {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 3;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  font-size: 1.8rem;
  line-height: 1;
  backdrop-filter: blur(12px);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  background: rgba(255, 255, 255, 0.42);
  border-radius: 999px;
}

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

.search-band {
  margin-top: -52px;
  position: relative;
  z-index: 5;
  padding: 0 20px;
}

.search-panel {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 480px);
  gap: 20px;
  align-items: center;
  padding: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(4, 120, 87, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.search-panel h2,
.search-panel p {
  margin: 0;
}

.search-panel h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.search-panel p {
  color: #b7f7d7;
}

.home-search,
.toolbar {
  display: flex;
  gap: 12px;
}

.home-search input,
.toolbar input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.36);
  outline: 0;
  border-radius: 999px;
  padding: 14px 18px;
  background: #ffffff;
  color: var(--ink);
}

.home-search button {
  border: 0;
  min-width: 96px;
  cursor: pointer;
}

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

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

.section-head h2 {
  margin: 0;
  font-size: clamp(1.65rem, 4vw, 2.45rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-head > span {
  flex: 1;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), rgba(5, 150, 105, 0));
  border-radius: 999px;
}

.category-grid,
.featured-grid,
.movie-grid {
  display: grid;
  gap: 20px;
}

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

.category-tile {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  color: #ffffff;
  background-size: cover;
  background-position: center;
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.movie-card:hover,
.compact-card:hover,
.category-panel:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.16);
}

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

.category-tile p {
  margin: 8px 0 0;
  color: #d1fae5;
  font-size: 0.9rem;
}

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

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

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

.movie-card {
  display: block;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  border-color: rgba(16, 185, 129, 0.35);
}

.movie-poster {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #134e4a);
}

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

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

.pill {
  position: absolute;
  top: 12px;
  z-index: 2;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.72rem;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.top-left {
  left: 12px;
}

.top-right {
  right: 12px;
}

.movie-card-body {
  padding: 18px;
}

.movie-tags {
  margin-bottom: 10px;
}

.movie-card h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  line-height: 1.28;
  transition: color 0.2s ease;
}

.movie-card:hover h3,
.compact-card:hover strong,
.category-panel a:hover {
  color: var(--primary-deep);
}

.movie-card p {
  min-height: 48px;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta,
.info-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  color: #475569;
  font-size: 0.84rem;
}

.movie-meta span,
.info-row span {
  padding: 4px 8px;
  background: #f1f5f9;
  border-radius: 999px;
}

.featured-card {
  position: relative;
}

.featured-card .movie-poster {
  aspect-ratio: 16 / 11;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) 1.15fr;
  gap: 34px;
  align-items: start;
}

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

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

.compact-card {
  display: grid;
  grid-template-columns: auto 112px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.compact-card img {
  width: 112px;
  height: 74px;
  object-fit: cover;
  border-radius: 13px;
  background: #0f172a;
}

.compact-card strong {
  display: block;
  margin-bottom: 4px;
  line-height: 1.35;
}

.compact-card p,
.compact-card span {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.compact-card span:not(.rank-num) {
  display: inline-flex;
  margin-top: 5px;
}

.rank-num {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 12px;
  font-weight: 900;
}

.text-link {
  margin-top: 18px;
  color: var(--primary-deep);
}

.page-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 76px 20px 28px;
}

.page-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.1rem;
}

.simple-hero,
.category-hero,
.ranking-hero,
.search-hero {
  border-radius: 0 0 38px 38px;
}

.category-overview {
  display: grid;
  gap: 22px;
}

.category-panel {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 24px;
  align-items: center;
  padding: 24px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 26px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-panel h2 {
  margin: 14px 0 10px;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.category-panel p {
  color: var(--muted);
}

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

.toolbar-section {
  padding-top: 38px;
}

.toolbar {
  position: relative;
  z-index: 5;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 24px;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.07);
}

.sticky-toolbar {
  position: sticky;
  top: 88px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.filter-chip {
  border: 1px solid #d1fae5;
  color: #065f46;
  background: #ecfdf5;
  border-radius: 999px;
  padding: 9px 13px;
  cursor: pointer;
  font-weight: 800;
}

.filter-chip.active,
.filter-chip:hover,
.link-chip:hover {
  color: #ffffff;
  background: var(--primary);
}

.detail-page {
  background: #f8fafc;
}

.detail-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  color: #64748b;
  font-size: 0.94rem;
}

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

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

.detail-main,
.detail-side > * {
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 26px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

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

.site-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.24), rgba(2, 6, 23, 0.68));
  border: 0;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: 5px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 999px;
  font-size: 2rem;
  box-shadow: 0 18px 40px rgba(5, 150, 105, 0.36);
}

.detail-info {
  padding: 26px;
}

.detail-info h1 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  line-height: 1.14;
  letter-spacing: -0.035em;
}

.lead-text {
  color: #334155;
  font-size: 1.08rem;
}

.detail-info h2 {
  margin: 26px 0 10px;
  font-size: 1.3rem;
}

.detail-info p {
  color: #475569;
}

.detail-tags {
  margin-top: 18px;
}

.detail-side {
  display: grid;
  gap: 18px;
}

.poster-card {
  padding: 16px;
}

.poster-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 18px;
  background: #0f172a;
}

.poster-card div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
}

.poster-card strong {
  color: var(--ink);
}

.related-box {
  padding: 18px;
}

.related-box h2 {
  margin: 0 0 14px;
  font-size: 1.25rem;
}

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

.related-list .compact-card {
  grid-template-columns: 96px 1fr;
}

.related-list .compact-card img {
  width: 96px;
  height: 64px;
}

.site-footer {
  margin-top: 84px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #111827 52%, #042f2e);
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 0.9fr;
  gap: 34px;
  padding: 44px 20px 34px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 1.08rem;
}

.footer-grid p {
  color: #94a3b8;
}

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

.footer-links a:hover {
  color: #6ee7b7;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  font-size: 0.92rem;
}

[data-card].is-hidden {
  display: none;
}

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

  .featured-grid,
  .split-layout,
  .detail-grid,
  .category-panel,
  .footer-grid,
  .search-panel {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .category-grid,
  .featured-grid,
  .movie-grid,
  .compact-grid,
  .ranking-list.wide,
  .category-samples,
  .detail-side {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .section-head > span {
    width: 120px;
    flex: none;
  }

  .sticky-toolbar {
    position: static;
  }
}

@media (max-width: 580px) {
  .nav-wrap {
    min-height: 64px;
  }

  .hero-stage {
    min-height: 610px;
  }

  .hero-content {
    padding: 74px 18px 118px;
  }

  .hero-actions,
  .home-search,
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .category-grid,
  .featured-grid,
  .movie-grid,
  .compact-grid,
  .ranking-list.wide,
  .category-samples,
  .detail-side {
    grid-template-columns: 1fr;
  }

  .compact-card,
  .related-list .compact-card {
    grid-template-columns: 92px 1fr;
  }

  .compact-card .rank-num {
    position: absolute;
    margin: -18px 0 0 -18px;
  }

  .compact-card {
    position: relative;
  }

  .compact-card img,
  .related-list .compact-card img {
    width: 92px;
    height: 64px;
  }

  .search-band {
    margin-top: -36px;
  }

  .search-panel {
    padding: 20px;
    border-radius: 22px;
  }

  .detail-wrap {
    padding: 20px 14px 0;
  }

  .detail-info {
    padding: 20px;
  }
}
