:root {
  --bg: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --panel: #ffffff;
  --panel-soft: rgba(255, 255, 255, 0.86);
  --teal: #0f766e;
  --teal-bright: #14b8a6;
  --cyan: #06b6d4;
  --shadow: 0 22px 50px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(20, 184, 166, 0.12), transparent 28rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 32rem);
  color: var(--text);
}

body.menu-open {
  overflow: hidden;
}

img.is-img-missing {
  opacity: 0;
}

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

.site-header-inner {
  width: min(1200px, calc(100% - 32px));
  height: 72px;
  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;
  color: #0f172a;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.site-logo-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--teal-bright), var(--cyan));
  color: #ffffff;
  box-shadow: 0 18px 30px rgba(20, 184, 166, 0.28);
}

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

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

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

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--teal);
  background: #f0fdfa;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #ffffff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #0f172a;
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

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

.hero-slider {
  position: relative;
  height: min(700px, calc(100vh - 72px));
  min-height: 560px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 800ms ease, transform 1200ms ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-fallback {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 28%, rgba(20, 184, 166, 0.55), transparent 24rem),
    linear-gradient(135deg, #020617, #0f172a 54%, #115e59);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.72) 44%, rgba(15, 23, 42, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.82) 0%, transparent 40%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(690px, 100%);
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.14);
  border: 1px solid rgba(94, 234, 212, 0.32);
  color: #99f6e4;
  font-weight: 800;
}

.hero-copy h1 {
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.06em;
  margin-bottom: 22px;
}

.hero-copy p {
  max-width: 680px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
  margin-bottom: 28px;
}

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

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal-bright), var(--cyan));
  box-shadow: 0 18px 32px rgba(6, 182, 212, 0.28);
}

.secondary-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

.ghost-button {
  color: var(--teal);
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 40px rgba(15, 23, 42, 0.16);
}

.hero-tags,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.hero-tags span,
.tag-list span,
.meta-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.44);
  transition: all 0.22s ease;
}

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

.main-section {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.main-section.compact-top {
  padding-top: 40px;
}

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

.section-heading h2,
.section-heading h1,
.detail-copy h1 {
  color: #0f172a;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-intro,
.detail-copy .lead {
  max-width: 760px;
  color: var(--muted);
  line-height: 1.8;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 168px;
  padding: 24px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 92% 16%, rgba(20, 184, 166, 0.18), transparent 9rem),
    #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card strong {
  display: block;
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 22px;
}

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

.category-card span {
  display: inline-flex;
  margin-top: 16px;
  color: var(--teal);
  font-weight: 800;
}

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

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

.movie-card[hidden],
.rank-row[hidden] {
  display: none;
}

.movie-card-link {
  display: flex;
  height: 100%;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.94);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 22%, rgba(45, 212, 191, 0.42), transparent 9rem),
    linear-gradient(135deg, #0f172a, #134e4a);
}

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

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

.poster-rank {
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.72);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.movie-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 18px;
}

.movie-card-body h3 {
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  margin-bottom: 10px;
}

.movie-card-body p {
  flex: 1;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
}

.meta-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 24px;
}

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

.rank-row a {
  display: grid;
  grid-template-columns: 60px 84px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 112px;
  padding: 14px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-row a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #06b6d4);
  font-size: 18px;
  font-weight: 900;
}

.rank-row img {
  width: 84px;
  height: 84px;
  border-radius: 18px;
  object-fit: cover;
  background: linear-gradient(135deg, #0f172a, #134e4a);
}

.rank-info strong,
.rank-info small {
  display: block;
}

.rank-info strong {
  color: #0f172a;
  font-size: 17px;
  font-weight: 900;
}

.rank-info small {
  color: var(--muted);
  line-height: 1.6;
  margin-top: 6px;
}

.side-panel {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 24px;
  border-radius: var(--radius);
  background: #0f172a;
  color: #e2e8f0;
  box-shadow: var(--shadow);
}

.side-panel h2,
.side-panel h3 {
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 14px;
}

.side-panel p,
.side-panel li {
  color: #cbd5e1;
  line-height: 1.75;
}

.side-panel ul {
  display: grid;
  gap: 12px;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 170px 190px auto;
  gap: 12px;
  margin-bottom: 28px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(12px);
}

.filter-panel label {
  display: grid;
  gap: 7px;
}

.filter-panel span {
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #14b8a6;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

.library-count {
  margin: 18px 0 28px;
  color: var(--muted);
  font-weight: 700;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: min(1200px, calc(100% - 32px));
  margin: 28px auto 0;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: var(--teal);
  font-weight: 800;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  margin-top: 0;
  background: #0f172a;
}

.detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 0%, rgba(20, 184, 166, 0.38), transparent 24rem),
    linear-gradient(180deg, #0f172a 0%, #020617 100%);
}

.detail-inner {
  position: relative;
  z-index: 2;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 34px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background:
    radial-gradient(circle at 70% 20%, rgba(20, 184, 166, 0.36), transparent 18rem),
    #020617;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.36);
  aspect-ratio: 16 / 9;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  color: #ffffff;
  background:
    radial-gradient(circle at center, rgba(20, 184, 166, 0.22), transparent 18rem),
    rgba(2, 6, 23, 0.54);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.play-circle {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--teal-bright), var(--cyan));
  font-size: 30px;
  box-shadow: 0 24px 54px rgba(6, 182, 212, 0.36);
}

.player-status {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  color: #ccfbf1;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  pointer-events: none;
}

.detail-copy {
  color: #e2e8f0;
}

.detail-copy h1 {
  color: #ffffff;
  margin-bottom: 18px;
}

.detail-copy .lead {
  color: #cbd5e1;
  font-size: 17px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.detail-meta span {
  display: block;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.detail-meta b {
  display: block;
  color: #5eead4;
  font-size: 12px;
  margin-bottom: 4px;
}

.content-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 30px;
}

.article-panel,
.info-panel {
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.07);
}

.article-panel {
  padding: 32px;
}

.article-panel h2,
.info-panel h2 {
  color: #0f172a;
  font-size: 26px;
  font-weight: 900;
  margin-bottom: 16px;
}

.article-panel p {
  color: #334155;
  line-height: 1.92;
  margin-bottom: 24px;
}

.info-panel {
  position: sticky;
  top: 96px;
  padding: 24px;
  align-self: start;
}

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

.info-list li {
  display: grid;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: #334155;
}

.info-list b {
  color: #0f766e;
  font-size: 12px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

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

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px;
}

.footer-logo {
  color: #ffffff;
  margin-bottom: 12px;
}

.footer-inner p {
  max-width: 520px;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.footer-links a {
  padding: 9px 12px;
  border-radius: 999px;
  color: #ccfbf1;
  background: rgba(255, 255, 255, 0.06);
}

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

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

  body.menu-open .mobile-nav {
    display: block;
  }

  .hero-slider {
    height: auto;
    min-height: 640px;
  }

  .hero-content {
    padding: 76px 0 110px;
  }

  .section-heading,
  .rank-layout,
  .detail-inner,
  .content-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: grid;
  }

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

  .filter-panel {
    grid-template-columns: 1fr 1fr;
  }

  .side-panel,
  .info-panel {
    position: static;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

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

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

  .site-logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 13px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .main-section {
    padding: 48px 0;
  }

  .category-grid,
  .movie-grid,
  .related-grid,
  .filter-panel,
  .detail-meta {
    grid-template-columns: 1fr;
  }

  .rank-row a {
    grid-template-columns: 48px 72px 1fr;
    gap: 10px;
    padding: 12px;
  }

  .rank-number {
    width: 42px;
    height: 42px;
  }

  .rank-row img {
    width: 72px;
    height: 72px;
  }

  .article-panel {
    padding: 22px;
  }
}
