:root {
  --emerald: #059669;
  --emerald-dark: #047857;
  --teal: #0d9488;
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-900: #0f172a;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--slate-900);
  background: linear-gradient(135deg, var(--slate-50), var(--slate-100));
}

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.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  backdrop-filter: blur(16px);
}

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

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: var(--slate-900);
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 10px 20px rgba(5, 150, 105, 0.25);
}

.desktop-nav,
.mobile-nav {
  align-items: center;
  gap: 6px;
}

.desktop-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--slate-600);
  font-weight: 650;
  font-size: 14px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--emerald-dark);
  background: rgba(5, 150, 105, 0.10);
}

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

.menu-button span {
  width: 20px;
  height: 2px;
  background: var(--slate-700);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border: 1px solid var(--slate-200);
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

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

.hero-slider {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 30%, rgba(16, 185, 129, 0.32), transparent 34%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 120px 0 92px;
  color: var(--white);
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-kicker {
  padding: 8px 12px;
  margin-bottom: 18px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.hero-content h1 {
  max-width: 820px;
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 82px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.75;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 650;
}

.hero-tags span {
  color: #ecfdf5;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

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

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

.btn.primary,
.btn.secondary {
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 15px 28px rgba(5, 150, 105, 0.28);
}

.btn.glass {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
}

.btn.full {
  width: 100%;
  margin-top: 18px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dot.active {
  width: 34px;
  background: var(--white);
}

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

.wide-section {
  width: min(1360px, calc(100% - 32px));
}

.narrow-section {
  width: min(960px, calc(100% - 32px));
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading h2,
.page-hero h1 {
  margin: 8px 0 10px;
  color: var(--slate-900);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-hero p {
  margin: 0;
  color: var(--slate-600);
  line-height: 1.75;
}

.section-kicker {
  color: var(--emerald-dark);
}

.section-kicker.light {
  color: #d1fae5;
}

.center {
  text-align: center;
}

.center .section-kicker {
  margin-inline: auto;
}

.with-search,
.row-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.search-box {
  min-width: min(360px, 100%);
  display: grid;
  gap: 7px;
  color: var(--slate-600);
  font-weight: 800;
  font-size: 13px;
}

.search-box input {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  outline: none;
  color: var(--slate-900);
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.search-box input:focus {
  border-color: rgba(5, 150, 105, 0.45);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
}

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

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

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

.movie-card article {
  height: 100%;
  overflow: hidden;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

.movie-card.compact .poster-frame {
  aspect-ratio: 16 / 9;
}

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

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

.year-badge,
.play-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
}

.year-badge {
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 750;
}

.play-badge {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  background: var(--emerald);
  box-shadow: 0 12px 25px rgba(5, 150, 105, 0.35);
}

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

.eyebrow {
  color: var(--emerald-dark);
  font-size: 12px;
  font-weight: 850;
}

.movie-card h3 {
  display: -webkit-box;
  min-height: 54px;
  margin: 6px 0 8px;
  overflow: hidden;
  color: var(--slate-900);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card.compact h3 {
  min-height: 46px;
  font-size: 16px;
}

.movie-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--slate-600);
  font-size: 14px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.category-card {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: 26px;
  color: var(--white);
  background: #020617;
  box-shadow: var(--shadow-soft);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.category-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.82));
}

.category-card-content {
  position: absolute;
  inset: auto 0 0;
  padding: 22px;
}

.category-card-content span {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.17);
  backdrop-filter: blur(8px);
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 23px;
  font-weight: 900;
}

.category-card p,
.category-card small {
  display: -webkit-box;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.6;
  -webkit-box-orient: vertical;
}

.category-card p {
  margin: 0 0 8px;
  -webkit-line-clamp: 2;
}

.category-card small {
  -webkit-line-clamp: 1;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 36px;
  align-items: start;
}

.ranking-panel,
.detail-card,
.side-card {
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.ranking-panel {
  position: sticky;
  top: 98px;
  padding: 24px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--slate-200);
  border-radius: 18px;
  background: var(--white);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
  transform: translateY(-2px);
  border-color: rgba(5, 150, 105, 0.35);
  box-shadow: var(--shadow-soft);
}

.rank-item.compact {
  grid-template-columns: 34px 72px minmax(0, 1fr);
  padding: 10px;
}

.rank-number {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--emerald-dark);
  background: #d1fae5;
  font-weight: 900;
}

.rank-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, #064e3b, #0f172a);
}

.rank-info {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.rank-info strong,
.rank-info small,
.rank-info em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info strong {
  font-size: 16px;
}

.rank-info small {
  color: var(--slate-500);
  font-size: 12px;
}

.rank-info em {
  color: var(--slate-600);
  font-size: 13px;
  font-style: normal;
}

.page-hero {
  padding: 72px 0;
}

.green-hero {
  color: var(--white);
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.22), transparent 28%),
    linear-gradient(135deg, var(--emerald), var(--teal));
}

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

.page-hero h1,
.green-hero p {
  color: var(--white);
}

.green-hero p {
  max-width: 760px;
  opacity: 0.92;
}

.text-link {
  color: var(--emerald-dark);
  font-weight: 850;
}

.empty-state {
  padding: 24px;
  border: 1px dashed var(--slate-200);
  border-radius: 18px;
  color: var(--slate-600);
  text-align: center;
  background: var(--white);
}

.player-section {
  background: #020617;
}

.player-shell {
  position: relative;
  width: min(1280px, 100%);
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.movie-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-button {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 18px 45px rgba(5, 150, 105, 0.35);
  cursor: pointer;
}

.player-button span {
  margin-left: 5px;
  font-size: 32px;
}

.detail-section {
  padding-top: 36px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 24px;
  color: var(--slate-500);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--emerald-dark);
}

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

.detail-main {
  display: grid;
  gap: 22px;
}

.detail-card,
.side-card {
  padding: 28px;
}

.detail-card h1 {
  margin: 12px 0 14px;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 14px;
  color: var(--slate-900);
  font-size: 22px;
  font-weight: 900;
}

.detail-card p {
  margin: 0;
  color: var(--slate-700);
  font-size: 16px;
  line-height: 1.9;
  white-space: pre-line;
}

.meta-row,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--slate-600);
}

.pill {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--emerald-dark);
  background: #d1fae5;
  font-weight: 850;
}

.movie-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--slate-100);
}

.tag-row {
  margin: 18px 0;
}

.tag-row span {
  color: var(--slate-700);
  background: var(--slate-100);
}

blockquote {
  margin: 22px 0;
  padding: 18px 20px;
  border-left: 5px solid var(--emerald);
  border-radius: 16px;
  color: var(--slate-700);
  background: #ecfdf5;
  line-height: 1.8;
}

.detail-side {
  position: sticky;
  top: 98px;
  display: grid;
  gap: 22px;
}

.poster-card {
  padding: 0;
  overflow: hidden;
}

.poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, #064e3b, #0f172a);
}

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

.side-related .movie-card article {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: stretch;
  border-radius: 16px;
  box-shadow: none;
  border: 1px solid var(--slate-200);
}

.side-related .poster-frame {
  height: 100%;
  aspect-ratio: auto;
}

.side-related .movie-card-body {
  padding: 12px;
}

.side-related .movie-card h3 {
  min-height: auto;
  margin: 4px 0;
  font-size: 14px;
}

.side-related .movie-card p,
.side-related .year-badge,
.side-related .play-badge {
  display: none;
}

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

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

.footer-logo {
  color: var(--white);
  margin-bottom: 12px;
}

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

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

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

.back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: var(--emerald);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-top.visible {
  opacity: 1;
  pointer-events: auto;
}

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

[hidden] {
  display: none !important;
}

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

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

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

  .ranking-panel,
  .detail-side {
    position: static;
  }
}

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

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

  .hero-slider {
    min-height: 620px;
  }

  .hero-content {
    padding: 100px 0 92px;
  }

  .hero-arrow {
    display: none;
  }

  .with-search,
  .row-heading,
  .footer-inner {
    display: grid;
    grid-template-columns: 1fr;
  }

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

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

  .rank-item {
    grid-template-columns: 36px 82px minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .nav-shell,
  .mobile-nav,
  .section,
  .category-preview,
  .wide-section,
  .narrow-section,
  .page-hero-inner,
  .footer-inner {
    width: min(100% - 24px, 1280px);
  }

  .hero-content {
    width: min(100% - 24px, 1280px);
  }

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

  .section,
  .category-preview {
    padding: 46px 0;
  }

  .hero-slider {
    min-height: 580px;
  }

  .rank-item,
  .rank-item.compact {
    grid-template-columns: 32px 70px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-info em {
    display: none;
  }

  .detail-card,
  .side-card {
    padding: 20px;
  }

  .side-related .movie-card article {
    grid-template-columns: 100px minmax(0, 1fr);
  }
}
