:root {
  --teal-900: #134e4a;
  --teal-800: #115e59;
  --teal-700: #0f766e;
  --teal-600: #0d9488;
  --teal-300: #5eead4;
  --amber-500: #f59e0b;
  --amber-300: #fcd34d;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-100: #f1f5f9;
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-300: #d1d5db;
  --white: #ffffff;
  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.10);
  --shadow-lg: 0 25px 50px rgba(15, 23, 42, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--gray-900);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 55%, #f8fafc 100%);
  line-height: 1.6;
}

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

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

img.image-error {
  opacity: 0;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--teal-900), var(--slate-800));
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  color: var(--slate-900);
  font-weight: 900;
  background: linear-gradient(135deg, var(--amber-300), var(--amber-500));
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.35);
}

.brand-text {
  display: grid;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.08em;
}

.brand-text small {
  color: var(--teal-300);
  font-size: 12px;
}

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

.desktop-nav a,
.nav-dropdown button {
  color: rgba(255, 255, 255, 0.88);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 180ms ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.nav-dropdown button:hover {
  color: var(--teal-300);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: 32px;
  right: 0;
  min-width: 180px;
  display: none;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow-lg);
}

.dropdown-panel a {
  display: block;
  padding: 9px 10px;
  border-radius: 10px;
}

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

.nav-dropdown:hover .dropdown-panel {
  display: block;
}

.nav-search {
  position: relative;
  width: 260px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.mobile-panel input,
.big-search input,
.filter-bar input,
.filter-bar select,
.search-filters select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.10);
  padding: 10px 12px;
  outline: none;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.nav-search input:focus,
.mobile-panel input:focus,
.big-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.search-filters select:focus {
  border-color: var(--teal-300);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.18);
}

.nav-search button,
.mobile-panel button,
.big-search button {
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: var(--teal-600);
  padding: 10px 14px;
  cursor: pointer;
}

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

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

.mobile-panel {
  display: none;
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.96);
}

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

.mobile-panel nav {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.mobile-panel a {
  padding: 10px 4px;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: linear-gradient(90deg, var(--slate-950), var(--slate-800));
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 700ms ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: -24px;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(9px);
  transform: scale(1.08);
  opacity: 0.55;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 35%, rgba(13, 148, 136, 0.32), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.75) 48%, rgba(15, 23, 42, 0.18) 100%);
}

.hero-inner {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  height: 600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  align-items: center;
  gap: 54px;
}

.hero-copy {
  color: var(--white);
  max-width: 720px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--white);
  background: var(--amber-500);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.eyebrow.dark {
  color: var(--teal-800);
  background: rgba(13, 148, 136, 0.10);
}

.hero h1,
.page-hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 7vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-line {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(18px, 2vw, 24px);
}

.hero-meta {
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.70);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

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

.btn.primary {
  color: var(--white);
  background: var(--teal-600);
  box-shadow: 0 12px 28px rgba(13, 148, 136, 0.35);
}

.btn.primary:hover {
  background: var(--teal-700);
}

.btn.glass,
.btn.ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(6px);
}

.btn.ghost {
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.24), rgba(245, 158, 11, 0.20));
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
  transform: rotate(1deg);
}

.hero-poster img {
  width: 100%;
  height: 430px;
  object-fit: cover;
  transition: transform 500ms ease;
}

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

.hero-controls {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 32px;
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 5;
}

.hero-controls > button {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  font-size: 30px;
  cursor: pointer;
  backdrop-filter: blur(6px);
}

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

.hero-dots button {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: width 180ms ease, background 180ms ease;
}

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

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

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

.section-heading.centered {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.section-heading.between {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.section-heading h2 {
  margin: 12px 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
}

.section-heading p {
  margin: 0;
  color: var(--gray-600);
}

.section-heading.light h2,
.section-heading.light p {
  color: var(--white);
}

.section-link {
  color: var(--teal-700);
  font-weight: 800;
}

.light-link {
  color: var(--teal-300);
}

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

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

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

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

.poster-frame {
  position: relative;
  height: 230px;
  overflow: hidden;
  background:
    radial-gradient(circle at 75% 25%, rgba(245, 158, 11, 0.22), transparent 30%),
    linear-gradient(135deg, #0f172a, #134e4a);
}

.poster-frame.small {
  height: 138px;
}

.poster-frame.wide {
  width: 220px;
  min-height: 150px;
  height: auto;
  flex: 0 0 220px;
}

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

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

.corner-badge,
.rank-no {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--white);
  background: var(--teal-600);
  font-size: 12px;
  font-weight: 800;
}

.rank-no {
  left: 12px;
  right: auto;
  background: var(--amber-500);
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 54px;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--gray-900);
  font-size: 18px;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card:hover h3 {
  color: var(--teal-700);
}

.card-body p {
  display: -webkit-box;
  min-height: 66px;
  margin: 0 0 16px;
  overflow: hidden;
  color: var(--gray-600);
  font-size: 14px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.card-meta {
  color: #64748b;
  font-size: 13px;
}

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

.movie-card-compact h3 {
  min-height: 42px;
  font-size: 15px;
}

.movie-card-compact p {
  min-height: auto;
  margin: 0;
  font-size: 12px;
}

.movie-card-horizontal {
  display: flex;
}

.movie-card-horizontal .card-body h3 {
  min-height: auto;
}

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

.category-tile {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: var(--radius-lg);
  color: var(--white);
  background:
    radial-gradient(circle at 80% 20%, rgba(252, 211, 77, 0.24), transparent 28%),
    linear-gradient(135deg, var(--teal-800), var(--slate-900));
  box-shadow: var(--shadow-md);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.category-tile span {
  font-size: 20px;
  font-weight: 900;
}

.category-tile p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.category-tile strong {
  color: var(--teal-300);
}

.dark-section {
  width: 100%;
  max-width: none;
  padding: 68px max(16px, calc((100vw - 1180px) / 2));
  background:
    radial-gradient(circle at 10% 20%, rgba(13, 148, 136, 0.28), transparent 32%),
    linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

.page-hero {
  color: var(--white);
  background:
    radial-gradient(circle at 80% 25%, rgba(245, 158, 11, 0.18), transparent 30%),
    linear-gradient(90deg, var(--teal-900), var(--slate-800));
}

.page-hero > div {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 72px 0;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--teal-300);
  font-size: 18px;
}

.filter-bar,
.search-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 30px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.filter-bar input,
.filter-bar select,
.search-filters select {
  width: auto;
  min-width: 180px;
  flex: 1;
  color: var(--gray-900);
  border-color: #dbe3eb;
  background: #f8fafc;
}

.search-panel {
  display: grid;
}

.big-search {
  display: flex;
  gap: 12px;
}

.big-search input {
  color: var(--gray-900);
  border-color: #dbe3eb;
  background: #f8fafc;
  min-height: 54px;
}

.search-filters {
  display: flex;
  gap: 12px;
}

.search-status {
  margin: 22px 0;
  color: var(--gray-600);
  font-weight: 700;
}

.ranking-section .rank-list {
  display: grid;
  gap: 18px;
}

.detail-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 70px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 24px;
  color: #64748b;
  font-size: 14px;
}

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

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

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #000;
  box-shadow: var(--shadow-lg);
}

.player-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.20), rgba(2, 6, 23, 0.66));
  cursor: pointer;
  transition: opacity 220ms ease;
}

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

.play-icon {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: rgba(13, 148, 136, 0.92);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.35);
  font-size: 34px;
  text-indent: 4px;
}

.player-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 16px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent);
  opacity: 0;
  transition: opacity 180ms ease;
}

.player-card:hover .player-controls,
.player-card:focus-within .player-controls {
  opacity: 1;
}

.player-controls button {
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  padding: 8px 13px;
  cursor: pointer;
}

.info-card,
.side-card {
  margin-top: 24px;
  padding: 26px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.title-row h1 {
  margin: 12px 0 10px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
}

.pill {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.pill.soft {
  color: var(--teal-800);
  background: rgba(13, 148, 136, 0.12);
}

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

.detail-meta span,
.tag-row span {
  border-radius: 999px;
  padding: 7px 12px;
  color: #475569;
  background: var(--slate-100);
  font-size: 14px;
}

.copy-block {
  margin-top: 28px;
}

.copy-block h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.copy-block p {
  margin: 0 0 14px;
  color: var(--gray-700);
}

.lead-text {
  color: var(--teal-700) !important;
  font-weight: 800;
}

.review-block {
  padding: 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f8fafc, #ecfeff);
}

.detail-side {
  position: sticky;
  top: 94px;
}

.side-card {
  margin-top: 0;
}

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

.site-footer {
  color: var(--gray-300);
  background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 20px;
  margin-bottom: 14px;
}

.site-footer h3 {
  color: var(--white);
  margin-top: 0;
}

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

.site-footer a:hover {
  color: var(--teal-300);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  padding: 22px;
  color: #94a3b8;
}

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

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

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    height: auto;
    min-height: 600px;
    padding: 64px 0 96px;
  }

  .hero-poster {
    max-width: 420px;
  }

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

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

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

  .detail-side {
    position: static;
  }
}

@media (max-width: 760px) {
  .brand-text strong {
    font-size: 17px;
  }

  .hero {
    min-height: 640px;
  }

  .hero h1,
  .page-hero h1 {
    font-size: 38px;
  }

  .hero-poster {
    display: none;
  }

  .hero-controls {
    left: 16px;
    right: auto;
    bottom: 22px;
  }

  .section,
  .page-hero > div,
  .detail-shell {
    width: min(100% - 24px, 1180px);
  }

  .section-heading.between {
    display: block;
  }

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

  .poster-frame {
    height: 190px;
  }

  .movie-card-horizontal {
    display: block;
  }

  .poster-frame.wide {
    width: 100%;
    height: 190px;
  }

  .filter-bar,
  .big-search,
  .search-filters {
    display: grid;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

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

  .poster-frame {
    height: 230px;
  }

  .hero-actions {
    display: grid;
  }
}
