:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --card: #172033;
  --line: rgba(34, 211, 238, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --purple: #a855f7;
  --shadow: 0 24px 80px rgba(8, 145, 178, 0.18);
  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;
  background:
    radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.18), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(59, 130, 246, 0.16), transparent 28%),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
}

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

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

button,
input {
  font: inherit;
}

.site-nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  box-shadow: 0 0 35px rgba(34, 211, 238, 0.35);
}

.brand-text {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, #67e8f9, #60a5fa, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link,
.mobile-link {
  color: #cbd5e1;
  border-radius: 999px;
  transition: 0.25s ease;
}

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

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: white;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(59, 130, 246, 0.18));
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.92);
  color: white;
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #e2e8f0;
  border-radius: 999px;
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-menu.open {
  display: grid;
  gap: 8px;
}

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

main {
  overflow: hidden;
}

.hero-carousel {
  position: relative;
  min-height: 760px;
  padding-top: 68px;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 68px 0 0 0;
  min-height: 692px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}

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

.hero-image {
  width: 100%;
  height: 100%;
  min-height: 692px;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.84) 42%, rgba(2, 6, 23, 0.24) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.1) 45%, rgba(2, 6, 23, 0.2) 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2));
  top: 50%;
  transform: translateY(-50%);
  width: min(650px, calc(100% - 48px));
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 13px;
  border: 1px solid rgba(34, 211, 238, 0.35);
  border-radius: 999px;
  background: rgba(14, 116, 144, 0.18);
  color: #67e8f9;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 88px);
  line-height: 0.96;
  letter-spacing: -0.055em;
  background: linear-gradient(90deg, #f8fafc 0%, #67e8f9 48%, #93c5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-summary {
  margin: 24px 0 0;
  max-width: 620px;
  color: #cbd5e1;
  font-size: clamp(18px, 2.3vw, 24px);
  line-height: 1.75;
}

.hero-tags,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span,
.detail-meta span,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #dbeafe;
  font-size: 13px;
}

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

.primary-btn,
.ghost-btn,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.25s ease;
}

.primary-btn,
.ghost-btn {
  min-height: 48px;
  padding: 0 24px;
}

.primary-btn {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  box-shadow: 0 18px 45px rgba(14, 165, 233, 0.3);
}

.primary-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 22px 55px rgba(14, 165, 233, 0.42);
}

.ghost-btn {
  border: 1px solid rgba(148, 163, 184, 0.24);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.62);
}

.ghost-btn:hover {
  border-color: rgba(34, 211, 238, 0.55);
  color: white;
  background: rgba(8, 145, 178, 0.16);
}

.hero-search-panel {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 54px;
  transform: translateX(-50%);
  width: min(1180px, calc(100% - 32px));
  padding: 18px;
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-search,
.search-panel {
  display: flex;
  gap: 12px;
}

.hero-search input,
.search-panel input {
  flex: 1;
  min-width: 0;
  height: 50px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  padding: 0 18px;
  background: rgba(2, 6, 23, 0.8);
  color: white;
  outline: none;
}

.hero-search input:focus,
.search-panel input:focus {
  border-color: rgba(34, 211, 238, 0.7);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.hero-search button,
.search-panel button,
.filter-cloud button {
  border: 0;
  cursor: pointer;
  color: white;
  background: linear-gradient(135deg, #0891b2, #2563eb);
  border-radius: 16px;
  font-weight: 800;
}

.hero-search button,
.search-panel button {
  padding: 0 24px;
}

.hero-category-links,
.filter-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.hero-category-links a,
.filter-cloud button {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: #cbd5e1;
  transition: 0.25s ease;
}

.hero-category-links a:hover,
.filter-cloud button:hover,
.filter-cloud button.active {
  color: white;
  border-color: rgba(34, 211, 238, 0.5);
  background: rgba(8, 145, 178, 0.25);
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  top: 50%;
  z-index: 6;
  transform: translateY(-50%);
  display: grid;
  gap: 10px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.45);
  cursor: pointer;
  transition: 0.25s ease;
}

.hero-dot.active {
  height: 38px;
  background: linear-gradient(180deg, var(--cyan), var(--blue));
}

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

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

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

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

.section-heading span {
  display: block;
  margin-bottom: 8px;
  color: #22d3ee;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-heading a,
.text-link {
  color: #67e8f9;
}

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

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

.movie-card {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.95));
  box-shadow: 0 20px 50px rgba(2, 6, 23, 0.28);
  transition: 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: 0 24px 60px rgba(14, 165, 233, 0.18);
}

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

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: 0.45s ease;
}

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

.poster-glow {
  position: absolute;
  inset: auto 0 0 0;
  height: 55%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent);
}

.rating-badge,
.play-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.rating-badge {
  left: 12px;
  top: 12px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-weight: 900;
  font-size: 13px;
}

.play-badge {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 35px rgba(34, 211, 238, 0.3);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0;
  min-height: 2.7em;
  color: #f8fafc;
  font-size: 18px;
  line-height: 1.35;
}

.movie-info h3 a:hover {
  color: #67e8f9;
}

.movie-meta,
.movie-desc {
  color: var(--muted);
}

.movie-meta {
  margin: 9px 0 0;
  font-size: 13px;
}

.movie-desc {
  min-height: 4.8em;
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.6;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.compact-card .movie-info h3 {
  font-size: 16px;
}

.compact-card .movie-desc {
  min-height: 4.6em;
  font-size: 13px;
}

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

.category-card,
.category-overview-card {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  transition: 0.25s ease;
}

.category-card {
  padding: 24px;
}

.category-card:hover,
.category-overview-card:hover {
  border-color: rgba(34, 211, 238, 0.45);
  transform: translateY(-4px);
}

.category-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(59, 130, 246, 0.2));
  color: #67e8f9;
}

.category-card strong,
.category-overview-card h2 {
  display: block;
  margin: 0 0 10px;
  font-size: 21px;
}

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

.ranking-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.rank-item,
.ranking-row {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.78);
  transition: 0.25s ease;
}

.rank-item {
  padding: 12px;
}

.rank-item:hover,
.ranking-row:hover {
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(8, 145, 178, 0.13);
}

.rank-num,
.ranking-position {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  font-weight: 900;
}

.rank-item img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-text {
  min-width: 0;
}

.rank-text strong,
.ranking-main strong {
  display: block;
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-text small,
.ranking-main small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-main {
  padding-top: 112px;
  padding-bottom: 40px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 36px;
  padding: 70px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 34px;
  background:
    radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.22), transparent 28%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.76));
  box-shadow: var(--shadow);
}

.small-hero h1 {
  max-width: 840px;
  font-size: clamp(38px, 5vw, 62px);
}

.page-hero p {
  max-width: 760px;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.category-overview-card {
  display: grid;
  gap: 20px;
  padding: 18px;
}

.category-posters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  min-height: 170px;
}

.category-posters img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 14px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--muted);
}

.breadcrumb a:hover {
  color: #67e8f9;
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 36px;
  align-items: center;
  padding: 28px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 34px;
  background:
    radial-gradient(circle at 70% 20%, rgba(59, 130, 246, 0.22), transparent 28%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.72));
  box-shadow: var(--shadow);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
  border-radius: 26px;
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.5);
}

.detail-copy h1 {
  font-size: clamp(36px, 5vw, 64px);
}

.lead-text {
  max-width: 820px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: 19px;
  line-height: 1.8;
}

.large-tags .tag {
  min-height: 34px;
}

.compact-actions {
  margin-top: 24px;
}

.player-section {
  margin-top: 34px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 28px;
  background: black;
  box-shadow: 0 28px 80px rgba(2, 6, 23, 0.45);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.1), rgba(2, 6, 23, 0.55));
  cursor: pointer;
}

.player-overlay.hidden {
  display: none;
}

.play-ring {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 22px 55px rgba(14, 165, 233, 0.45);
  font-size: 34px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
  margin-top: 34px;
}

.detail-article,
.side-panel {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.72);
}

.detail-article {
  padding: 34px;
}

.detail-article h2,
.side-panel h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.detail-article p {
  margin: 0 0 28px;
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1.95;
}

.info-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.info-table div {
  padding: 16px;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.68);
}

.info-table span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

.info-table strong {
  color: white;
}

.prev-next {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.prev-next a {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(8, 145, 178, 0.14);
  color: #67e8f9;
}

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

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

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

.ranking-row {
  padding: 12px 16px;
}

.ranking-row img {
  width: 64px;
  height: 86px;
  object-fit: cover;
  border-radius: 14px;
}

.ranking-main {
  flex: 1;
  min-width: 0;
}

.ranking-score {
  min-width: 54px;
  color: #facc15;
  font-size: 24px;
  font-weight: 900;
  text-align: right;
}

.wide-search {
  max-width: 820px;
  margin-top: 28px;
}

.search-results .movie-card.hidden {
  display: none;
}

.site-footer {
  margin-top: 90px;
  border-top: 1px solid rgba(34, 211, 238, 0.16);
  background: rgba(2, 6, 23, 0.82);
}

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

.footer-brand p {
  max-width: 420px;
  color: var(--muted);
  line-height: 1.75;
}

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

.footer-links a {
  padding: 9px 12px;
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.56);
}

.footer-links a:hover {
  color: #67e8f9;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 34px;
  color: #64748b;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

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

  .detail-cover {
    max-width: 360px;
  }

  .side-panel {
    position: static;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .brand-text {
    font-size: 19px;
  }

  .hero-carousel {
    min-height: 860px;
  }

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

  .hero-content {
    top: 42%;
  }

  .hero-search-panel {
    bottom: 24px;
  }

  .hero-search,
  .search-panel {
    flex-direction: column;
  }

  .hero-search button,
  .search-panel button {
    min-height: 48px;
  }

  .hero-dots {
    right: 18px;
    top: 30%;
  }

  .section-heading {
    display: block;
  }

  .section-heading a {
    display: inline-block;
    margin-top: 12px;
  }

  .movie-grid,
  .compact-grid,
  .category-grid,
  .category-overview-grid,
  .ranking-grid,
  .info-table,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .detail-hero,
  .detail-article {
    padding: 24px;
    border-radius: 24px;
  }

  .detail-cover {
    max-width: 280px;
  }

  .ranking-row {
    align-items: flex-start;
  }

  .ranking-score {
    font-size: 18px;
  }

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