:root {
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --emerald-600: #059669;
  --emerald-500: #10b981;
  --emerald-400: #34d399;
  --teal-500: #14b8a6;
  --amber-400: #fbbf24;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--slate-900);
  background: var(--slate-50);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.96);
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.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-grid;
  place-items: center;
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--emerald-400), var(--teal-500));
  border-radius: 10px;
  box-shadow: 0 10px 22px rgba(16, 185, 129, 0.24);
}

.brand-name {
  font-size: 1.18rem;
  background: linear-gradient(90deg, var(--emerald-400), #5eead4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.desktop-nav > a,
.nav-dropdown > button {
  color: var(--slate-200);
  border: 0;
  background: transparent;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.desktop-nav > a:hover,
.nav-dropdown:hover > button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 180px;
  padding: 8px;
  background: var(--slate-800);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  display: block;
  padding: 10px 12px;
  color: var(--slate-200);
  border-radius: 10px;
}

.dropdown-panel a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input {
  width: 240px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: var(--white);
  background: rgba(51, 65, 85, 0.8);
  outline: 0;
  padding: 10px 13px;
}

.header-search button,
.mobile-search button {
  border: 0;
  border-radius: 12px;
  color: var(--slate-950);
  background: var(--emerald-400);
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--white);
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
  background: var(--slate-900);
}

.mobile-panel.is-open {
  display: block;
}

.mobile-search {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.mobile-search input {
  width: 100%;
}

.mobile-panel nav {
  display: grid;
  gap: 6px;
}

.mobile-panel a {
  color: var(--slate-200);
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.hero {
  position: relative;
  min-height: 720px;
  color: var(--white);
  background: var(--slate-950);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto auto;
  width: 520px;
  height: 520px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.35), transparent 64%);
  filter: blur(12px);
  pointer-events: none;
}

.hero-slide {
  position: absolute;
  inset: 0;
  min-height: 720px;
  opacity: 0;
  background-position: center;
  background-size: cover;
  transition: opacity 0.75s ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-content {
  min-height: 620px;
  padding: 70px 0 140px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 56px;
  position: relative;
}

.hero-copy {
  max-width: 720px;
}

.hero-badge,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--emerald-400);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 18px 0 18px;
  font-size: clamp(2.5rem, 6vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 650px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 1.15rem;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-tags span {
  color: #d1fae5;
  background: rgba(255, 255, 255, 0.12);
}

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

.primary-btn,
.ghost-btn,
.text-link,
.section-action,
.full-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: var(--slate-950);
  background: linear-gradient(135deg, var(--emerald-400), #5eead4);
  padding: 13px 20px;
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.25);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-action:hover,
.full-link:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  padding: 12px 18px;
}

.text-link {
  color: var(--emerald-400);
  padding: 10px 0;
}

.hero-poster {
  position: relative;
  height: 500px;
  overflow: hidden;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(15, 23, 42, 0.92));
  box-shadow: 0 38px 80px rgba(2, 6, 23, 0.42);
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.86;
  transition: transform 0.5s ease;
}

.hero-poster:hover img {
  transform: scale(1.05);
}

.hero-poster span,
.play-dot {
  position: absolute;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  color: var(--slate-950);
  background: var(--emerald-400);
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.35);
}

.hero-poster span {
  left: 24px;
  bottom: 24px;
}

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

.hero-dots button {
  width: 36px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: var(--emerald-400);
}

.hero-strip {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 4;
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px);
}

.hero-strip span {
  display: block;
  color: var(--emerald-400);
  font-size: 0.84rem;
  font-weight: 800;
}

.hero-strip strong {
  display: block;
  margin-top: 4px;
}

.hero-strip nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.hero-strip nav a {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--slate-200);
  font-size: 0.9rem;
}

.hero-strip nav a span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--slate-950);
  background: var(--emerald-400);
}

.hero-strip nav a em {
  color: var(--slate-500);
  font-style: normal;
}

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

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

.section-heading h2,
.ranking-head h2,
.detail-content h1,
.detail-content h2,
.page-hero h1 {
  margin: 6px 0 10px;
  color: var(--slate-900);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.section-heading p {
  max-width: 680px;
  margin: 0;
  color: var(--slate-600);
}

.section-action,
.full-link {
  color: var(--emerald-600);
  background: #ecfdf5;
  padding: 12px 16px;
}

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

.category-tile,
.overview-card,
.movie-card,
.ranking-card,
.detail-content,
.related-list-card,
.detail-side-card {
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
}

.category-tile {
  display: grid;
  gap: 14px;
  padding: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-covers {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  grid-template-rows: 76px 76px;
  gap: 7px;
  overflow: hidden;
  border-radius: 16px;
  background: linear-gradient(135deg, #064e3b, var(--slate-900));
}

.category-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-covers img:first-child {
  grid-row: span 2;
}

.category-tile h3,
.overview-card h3,
.movie-card h3 {
  margin: 0;
}

.category-tile p,
.overview-card p,
.movie-card p,
.detail-side-card p {
  color: var(--slate-600);
  margin: 8px 0 0;
}

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

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

.movie-card {
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #0f766e, #0f172a);
}

.poster-frame,
.poster-frame img {
  width: 100%;
  height: 100%;
}

.poster-frame img {
  object-fit: cover;
  transition: transform 0.42s ease;
}

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

.image-missing {
  opacity: 0;
}

.play-dot {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .play-dot {
  opacity: 1;
  transform: translateY(0);
}

.poster-meta {
  position: absolute;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.82);
  padding: 4px 9px;
  font-size: 0.78rem;
  font-weight: 800;
}

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

.card-meta {
  display: flex;
  gap: 8px;
  color: var(--slate-500);
  font-size: 0.82rem;
  font-weight: 700;
}

.movie-card h3 {
  margin-top: 8px;
  font-size: 1.05rem;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.overview-card a:hover,
.rank-item a:hover {
  color: var(--emerald-600);
}

.tag-row {
  margin-top: 12px;
}

.ranking-card {
  padding: 20px;
}

.ranking-card ol {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.rank-item a {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--slate-100);
}

.rank-number {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--slate-950);
  background: #d1fae5;
  font-weight: 900;
}

.rank-title {
  font-weight: 800;
}

.rank-meta {
  color: var(--slate-500);
  font-size: 0.82rem;
}

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

.page-hero {
  color: var(--white);
  background: radial-gradient(circle at 10% 20%, rgba(16, 185, 129, 0.34), transparent 34%), linear-gradient(135deg, var(--slate-900), var(--slate-800));
  padding: 66px 0;
}

.page-hero h1 {
  color: var(--white);
  font-size: clamp(2.2rem, 5vw, 4.4rem);
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1.08rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.92rem;
}

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

.breadcrumb.light {
  color: rgba(255, 255, 255, 0.76);
}

.hero-mini-links {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 26px;
}

.hero-mini-links a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

.hero-mini-links span {
  color: rgba(255, 255, 255, 0.58);
}

.catalog-controls {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
}

.catalog-controls label {
  display: grid;
  gap: 6px;
  color: var(--slate-600);
  font-size: 0.86rem;
  font-weight: 800;
}

.catalog-controls input,
.catalog-controls select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  background: var(--slate-50);
  padding: 0 12px;
  outline: 0;
}

.catalog-controls input:focus,
.catalog-controls select:focus {
  border-color: var(--emerald-400);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

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

.empty-state {
  margin-top: 30px;
  padding: 36px;
  text-align: center;
  color: var(--slate-500);
  border: 1px dashed var(--slate-200);
  border-radius: 18px;
  background: var(--white);
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.overview-card {
  padding: 22px;
}

.overview-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.overview-main span {
  color: var(--slate-900);
  font-size: 1.35rem;
  font-weight: 900;
}

.overview-main strong {
  color: var(--emerald-600);
}

.overview-card ul,
.related-list-card ul {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.overview-card li a,
.related-list-card li a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--slate-100);
}

.overview-card li span,
.related-list-card li span {
  color: var(--slate-500);
}

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

.sticky-card {
  position: sticky;
  top: 92px;
}

.detail-player-section {
  color: var(--white);
  background: linear-gradient(180deg, var(--slate-950), var(--slate-900));
  padding: 30px 0 50px;
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: stretch;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

.video-el {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border: 0;
  background: radial-gradient(circle at center, rgba(16, 185, 129, 0.2), rgba(2, 6, 23, 0.86));
  cursor: pointer;
  overflow: hidden;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
}

.player-cover span {
  position: relative;
  z-index: 2;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: var(--slate-950);
  background: var(--emerald-400);
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.35);
  font-size: 1.5rem;
}

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

.detail-side-card {
  overflow: hidden;
  color: var(--slate-900);
}

.detail-side-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: linear-gradient(135deg, #064e3b, var(--slate-900));
}

.detail-side-card div {
  padding: 18px;
}

.detail-side-card h2 {
  margin: 4px 0 8px;
  line-height: 1.2;
}

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

.detail-content,
.related-list-card {
  padding: 28px;
}

.detail-title-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.detail-content h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.detail-content h2 {
  margin-top: 28px;
  font-size: 1.45rem;
}

.detail-content p {
  color: var(--slate-700);
  font-size: 1.03rem;
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 20px 0;
}

.detail-meta-grid span {
  display: grid;
  gap: 4px;
  padding: 13px;
  border-radius: 14px;
  background: var(--slate-50);
  color: var(--slate-600);
}

.detail-meta-grid strong {
  color: var(--slate-900);
}

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

.site-footer {
  color: var(--slate-300);
  background: var(--slate-900);
  margin-top: 50px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
  padding: 44px 0;
}

.footer-brand {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 14px;
}

.site-footer p {
  color: var(--slate-400);
  margin: 0;
}

.site-footer h2 {
  color: var(--white);
  margin: 0 0 12px;
  font-size: 1rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.site-footer a:hover {
  color: var(--emerald-400);
}

.footer-bottom {
  text-align: center;
  color: var(--slate-500);
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 1100px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .hero-content,
  .split-layout,
  .player-layout,
  .detail-main,
  .ranking-layout {
    grid-template-columns: 1fr;
  }

  .hero-poster,
  .detail-side-card {
    display: none;
  }

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

  .hero-strip {
    grid-template-columns: 1fr;
  }

  .hero-strip nav {
    grid-template-columns: repeat(2, 1fr);
  }

  .sticky-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .hero,
  .hero-slide {
    min-height: 680px;
  }

  .hero-content {
    min-height: 560px;
    padding-top: 46px;
  }

  .hero-strip {
    display: none;
  }

  .hero-dots {
    bottom: 32px;
  }

  .category-grid,
  .movie-grid,
  .catalog-grid,
  .overview-grid,
  .related-grid,
  .footer-grid,
  .catalog-controls,
  .detail-meta-grid,
  .hero-mini-links {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .detail-title-row {
    display: grid;
    align-items: start;
  }

  .rank-item a {
    grid-template-columns: 38px 1fr;
  }

  .rank-meta {
    grid-column: 2;
  }

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