:root {
  color-scheme: light;
  --site-bg: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --teal: #0d9488;
  --cyan: #0891b2;
  --blue: #2563eb;
  --amber: #f59e0b;
  --card: #ffffff;
  --line: #e2e8f0;
  --shadow: 0 18px 45px rgba(15, 23, 42, .12);
}

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fafc 0%, #eef7fb 48%, #f8fafc 100%);
  color: var(--ink);
}

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

.site-nav {
  height: 72px;
  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: 22px;
  font-weight: 800;
  color: #0f766e;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--cyan), var(--blue));
  box-shadow: 0 12px 24px rgba(13, 148, 136, .28);
}

.site-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 999px;
  color: #475569;
  font-weight: 700;
  transition: all .22s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #0f766e;
  background: #ccfbf1;
}

.mobile-toggle {
  display: none;
  padding: 9px 14px;
  border-radius: 999px;
  background: #0f766e;
  color: #ffffff;
  font-weight: 700;
}

.mobile-menu {
  display: none;
  padding: 0 16px 16px;
  background: #ffffff;
  border-top: 1px solid var(--line);
}

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

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  min-height: 620px;
  display: none;
  background-size: cover;
  background-position: center;
}

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

.hero-content {
  min-height: 620px;
  display: grid;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 84px;
}

.hero-panel {
  max-width: 760px;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 32px;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(15, 23, 42, .78), rgba(15, 118, 110, .48));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel h1 {
  margin-top: 14px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -.04em;
}

.hero-panel p {
  margin-top: 18px;
  max-width: 680px;
  color: rgba(255, 255, 255, .88);
  font-size: 18px;
  line-height: 1.8;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  color: #0f172a;
  background: rgba(255, 255, 255, .88);
  font-weight: 800;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.primary-button,
.secondary-button,
.section-link,
.search-box button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: all .22s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 16px 32px rgba(8, 145, 178, .25);
}

.secondary-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .12);
}

.primary-button:hover,
.secondary-button:hover,
.section-link:hover,
.search-box button:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  right: 32px;
  bottom: 32px;
  display: flex;
  gap: 10px;
}

.hero-controls button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(15, 23, 42, .58);
  backdrop-filter: blur(12px);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 44px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dots button {
  width: 26px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .45);
}

.hero-dots button.is-active {
  width: 48px;
  background: #ffffff;
}

.page-hero {
  padding: 72px 0 54px;
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(20, 184, 166, .95), transparent 34%), linear-gradient(135deg, #0f766e, #0891b2 50%, #1d4ed8);
}

.page-hero h1,
.detail-copy h1 {
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.03em;
}

.page-hero p {
  max-width: 760px;
  margin-top: 14px;
  color: rgba(255, 255, 255, .88);
  font-size: 18px;
  line-height: 1.75;
}

.section-block {
  padding: 54px 0;
}

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

.section-head h2 {
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 900;
  letter-spacing: -.03em;
}

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

.section-link,
.search-box button {
  color: #0f766e;
  background: #ccfbf1;
}

.search-panel {
  margin-top: -30px;
  position: relative;
  z-index: 20;
}

.search-box {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.search-box input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  outline: none;
  background: #f1f5f9;
  color: var(--ink);
}

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

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, .85);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
  transition: all .25s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #0f766e, #0891b2);
}

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(15, 23, 42, .78));
}

.poster-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, .72);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.card-body {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.card-body strong {
  min-height: 48px;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 850;
}

.card-line {
  min-height: 44px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #0f766e;
  font-size: 13px;
  font-weight: 800;
}

.card-meta em {
  font-style: normal;
}

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

.category-card,
.library-card {
  display: grid;
  gap: 10px;
  padding: 24px;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #0891b2, #2563eb);
  box-shadow: 0 18px 38px rgba(8, 145, 178, .2);
  transition: transform .22s ease;
}

.category-card:hover,
.library-card:hover {
  transform: translateY(-4px);
}

.category-card strong,
.library-card strong {
  font-size: 22px;
  font-weight: 900;
}

.category-card span,
.library-card span {
  color: rgba(255, 255, 255, .84);
  line-height: 1.6;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 54px 78px minmax(0, 1fr) 64px;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, .85);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
  transition: transform .22s ease;
}

.ranking-item:hover {
  transform: translateX(4px);
}

.rank-number {
  display: flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #f59e0b);
  font-weight: 900;
}

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

.ranking-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.ranking-copy strong {
  font-size: 18px;
  font-weight: 900;
}

.ranking-copy span,
.ranking-copy em {
  color: var(--muted);
  line-height: 1.5;
}

.ranking-copy em {
  font-size: 13px;
  font-style: normal;
}

.score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 999px;
  color: #b45309;
  background: #fef3c7;
  font-weight: 900;
}

.detail-hero {
  padding: 56px 0;
  background: radial-gradient(circle at 20% 0%, rgba(20, 184, 166, .38), transparent 32%), linear-gradient(135deg, #0f172a, #164e63 48%, #0f766e);
  color: #ffffff;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .32);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, .78);
  font-size: 14px;
}

.breadcrumb a {
  color: #ccfbf1;
  font-weight: 700;
}

.detail-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.detail-meta span,
.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  font-weight: 800;
}

.detail-meta span {
  color: #ecfeff;
  background: rgba(255, 255, 255, .13);
}

.tag-pill {
  color: #0f766e;
  background: #ccfbf1;
  font-size: 13px;
}

.detail-copy p {
  margin-top: 18px;
  color: rgba(255, 255, 255, .86);
  font-size: 18px;
  line-height: 1.8;
}

.player-section {
  padding: 52px 0 24px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: var(--shadow);
}

.player-shell video {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(15, 23, 42, .48), rgba(13, 148, 136, .28));
}

.player-cover.is-hidden {
  display: none;
}

.player-start {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #0f766e;
  background: #ffffff;
  font-size: 34px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, .35);
}

.content-panel {
  margin-top: 28px;
  padding: 30px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

.content-panel h2 {
  margin-bottom: 14px;
  font-size: 26px;
  font-weight: 900;
}

.content-panel p {
  color: #334155;
  font-size: 17px;
  line-height: 1.9;
}

.content-panel p + p {
  margin-top: 14px;
}

.pagination-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 36px;
}

.pagination-row a {
  display: inline-flex;
  min-width: 42px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 999px;
  background: #ffffff;
  color: #0f766e;
  border: 1px solid #ccfbf1;
  font-weight: 800;
}

.pagination-row a.is-active {
  color: #ffffff;
  background: #0f766e;
}

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

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-logo {
  color: #67e8f9;
}

.footer-inner p {
  margin-top: 10px;
  max-width: 620px;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.footer-links a {
  color: #ffffff;
  font-weight: 700;
}

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

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

@media (max-width: 960px) {
  .site-links {
    display: none;
  }

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

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

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

  .detail-poster {
    max-width: 360px;
  }
}

@media (max-width: 720px) {
  .hero-carousel,
  .hero-slide,
  .hero-content {
    min-height: 560px;
  }

  .hero-panel {
    padding: 24px;
    border-radius: 24px;
  }

  .hero-controls {
    right: 16px;
    bottom: 20px;
  }

  .hero-dots {
    display: none;
  }

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

  .section-head,
  .footer-inner,
  .search-box {
    flex-direction: column;
    align-items: stretch;
  }

  .ranking-item {
    grid-template-columns: 44px 64px minmax(0, 1fr);
  }

  .ranking-item img {
    width: 64px;
    height: 88px;
  }

  .score-pill {
    grid-column: 2 / 4;
    justify-self: start;
  }
}

@media (max-width: 430px) {
  .movie-grid,
  .category-grid,
  .library-grid {
    grid-template-columns: 1fr;
  }

  .site-logo {
    font-size: 18px;
  }
}
