* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-panel: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --emerald: #34d399;
  --cyan: #22d3ee;
  --yellow: #facc15;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.16), transparent 32rem), linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-bar {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  color: #04111d;
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.35);
}

.logo-text {
  font-size: 1.15rem;
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  color: var(--muted-strong);
  font-size: 0.95rem;
}

.desktop-nav a,
.mobile-panel a,
.site-footer a {
  transition: color 0.2s ease, opacity 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.site-footer a:hover,
.text-link:hover {
  color: var(--emerald);
}

.nav-search,
.mobile-search,
.wide-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.82);
  border-radius: 999px;
}

.nav-search input,
.mobile-search input,
.wide-search input,
.filter-panel input,
.filter-panel select {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.nav-search input {
  width: 180px;
  padding: 11px 14px;
}

.nav-search button,
.mobile-search button,
.wide-search button {
  border: 0;
  padding: 11px 16px;
  color: #04111d;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  font-weight: 700;
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.9);
  padding: 8px 12px;
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid var(--line);
}

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

.mobile-panel nav {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.mobile-search input {
  flex: 1;
  padding: 11px 14px;
}

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

.hero-stage {
  position: relative;
  min-height: 72vh;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.45), rgba(2, 6, 23, 0.92)), linear-gradient(0deg, rgba(2, 6, 23, 1), rgba(2, 6, 23, 0.3) 45%, rgba(2, 6, 23, 0.72));
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-copy {
  max-width: 720px;
  display: grid;
  gap: 20px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: max-content;
  gap: 8px;
  color: var(--emerald);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-title-block h1 {
  margin: 0;
  color: white;
  line-height: 1.08;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.detail-title-block p,
.intro-block p,
.feature-split p {
  max-width: 760px;
  margin: 0;
  color: var(--muted-strong);
  font-size: 1.08rem;
}

.hero-tags,
.card-meta,
.tag-row,
.hero-actions,
.section-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.tag-row span {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.74);
  color: var(--muted-strong);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.9rem;
}

.hero-tags span:first-child {
  color: var(--yellow);
}

.primary-button,
.secondary-button,
.small-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.primary-button {
  padding: 13px 22px;
  color: #04111d;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 16px 36px rgba(16, 185, 129, 0.26);
}

.secondary-button {
  padding: 12px 20px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.26);
}

.primary-button:hover,
.secondary-button:hover,
.small-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.26);
}

.text-link {
  color: var(--emerald);
  gap: 6px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: white;
  background: rgba(15, 23, 42, 0.72);
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 34px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
}

.hero-dot.active {
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
}

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

.intro-block {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 30px;
}

.intro-block h2,
.section-head h2,
.feature-split h2,
.detail-article h2,
.detail-aside h2,
.card-body h2,
.category-body h2,
.ranking-content h2 {
  margin: 0;
  color: white;
  line-height: 1.18;
}

.intro-block h2,
.section-head h2,
.feature-split h2 {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
}

.wide-search {
  min-height: 56px;
}

.wide-search input {
  flex: 1;
  padding: 16px 18px;
}

.wide-search button {
  align-self: stretch;
  padding-inline: 24px;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 26px;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.76), rgba(15, 23, 42, 0.9));
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(52, 211, 153, 0.5);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.08);
  filter: brightness(0.72);
}

.card-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 6px 10px;
  color: #04111d;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  font-size: 0.78rem;
  font-weight: 800;
}

.rank-badge {
  left: auto;
  right: 12px;
  color: white;
  background: rgba(2, 6, 23, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  color: #04111d;
  background: rgba(52, 211, 153, 0.9);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.84);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 15px;
}

.card-body h2 {
  font-size: 1rem;
}

.card-body h2 a:hover,
.ranking-content h2 a:hover,
.category-body h2 a:hover {
  color: var(--emerald);
}

.card-line {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.82rem;
}

.tag-row {
  gap: 7px;
}

.tag-row span {
  padding: 4px 8px;
  font-size: 0.78rem;
}

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

.category-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.category-cover {
  min-height: 170px;
  display: flex;
  align-items: flex-end;
  padding: 18px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.category-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.18));
}

.category-cover span {
  position: relative;
  z-index: 2;
  color: white;
  font-size: 1.5rem;
  font-weight: 900;
}

.category-body {
  display: grid;
  gap: 13px;
  padding: 18px;
}

.category-body p,
.detail-article p,
.detail-aside dd,
.site-footer p,
.ranking-content p {
  margin: 0;
  color: var(--muted-strong);
}

.category-mini-links {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.9rem;
}

.category-mini-links a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feature-split {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  align-items: start;
  gap: 30px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 58px 74px 1fr auto;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.76);
  padding: 12px;
}

.ranking-rank {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #04111d;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  font-weight: 900;
}

.ranking-cover {
  width: 74px;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 12px;
  background: #0f172a;
}

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

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

.ranking-content h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.08rem;
}

.ranking-content p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.9rem;
}

.small-button {
  padding: 9px 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.page-hero {
  position: relative;
  padding: 88px 0 48px;
  background: radial-gradient(circle at 18% 20%, rgba(52, 211, 153, 0.18), transparent 26rem), linear-gradient(180deg, #020617, #0f172a);
  border-bottom: 1px solid var(--line);
}

.page-hero .container {
  display: grid;
  gap: 18px;
}

.page-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.8rem);
}

.filter-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.76);
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  background: rgba(2, 6, 23, 0.7);
}

.filter-panel input {
  flex: 1;
}

.filter-panel select {
  color: var(--muted-strong);
}

.detail-hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: end;
  background-size: cover;
  background-position: center;
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.94)), linear-gradient(0deg, #020617, rgba(2, 6, 23, 0.3));
}

.detail-hero-content {
  position: relative;
  z-index: 2;
  padding: 110px 0 56px;
}

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

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

.detail-head-grid {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 34px;
  align-items: end;
}

.detail-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.detail-title-block {
  display: grid;
  gap: 18px;
}

.detail-title-block h1 {
  font-size: clamp(2.2rem, 6vw, 5rem);
}

.large-tags span {
  padding: 6px 10px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(52, 211, 153, 0.26);
  border-radius: 28px;
  background: #000;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: white;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.25), rgba(2, 6, 23, 0.86));
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-overlay span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  color: #04111d;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  font-size: 2rem;
  box-shadow: 0 20px 60px rgba(16, 185, 129, 0.32);
}

.player-overlay strong {
  padding: 0 20px;
  text-align: center;
  font-size: 1.25rem;
}

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

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

.detail-article,
.detail-aside {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.74);
  padding: 26px;
}

.detail-article {
  display: grid;
  gap: 16px;
}

.detail-article h2:not(:first-child) {
  margin-top: 12px;
}

.detail-aside dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.detail-aside dt {
  color: var(--muted);
  font-size: 0.86rem;
}

.detail-aside dd {
  margin: -8px 0 0;
}

.detail-aside a {
  color: var(--emerald);
}

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), #020617);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
  padding: 46px 0;
}

.site-footer section {
  display: grid;
  align-content: start;
  gap: 10px;
}

.site-footer h2 {
  margin: 0;
  color: white;
  font-size: 1rem;
}

.site-footer a,
.site-footer p {
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.search-page-form {
  max-width: 720px;
}

.searchable-card.is-hidden {
  display: none;
}

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

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

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

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

  .intro-block,
  .feature-split,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .hero-carousel,
  .hero-stage {
    min-height: 76vh;
  }

  .hero-copy {
    padding-top: 70px;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-title-block h1 {
    letter-spacing: -0.04em;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

  .ranking-item {
    grid-template-columns: 44px 64px 1fr;
  }

  .ranking-item .small-button {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .filter-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-hero {
    min-height: auto;
  }

  .detail-hero-content {
    padding-top: 96px;
  }

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

  .detail-cover {
    width: min(220px, 70vw);
  }
}

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

  .card-line {
    min-height: auto;
  }

  .hero-tags span,
  .tag-row span {
    font-size: 0.78rem;
  }
}
