:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.76);
  --panel-strong: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --cyan: #22d3ee;
  --cyan-strong: #0891b2;
  --yellow: #facc15;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  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% 0%, rgba(34, 211, 238, 0.16), transparent 30%),
    radial-gradient(circle at 80% 20%, rgba(14, 165, 233, 0.12), transparent 32%),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

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

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

.brand-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #001014;
  background: linear-gradient(135deg, #67e8f9, #06b6d4);
  box-shadow: 0 0 28px rgba(34, 211, 238, 0.38);
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #cbd5e1;
}

.main-nav a,
.mobile-panel a {
  transition: color 0.2s ease;
}

.main-nav a:hover,
.mobile-panel a:hover {
  color: var(--cyan);
}

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

.header-search input,
.big-search input,
.filter-bar input,
.search-page-form input,
.filter-bar select {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(2, 6, 23, 0.66);
  outline: none;
}

.header-search input {
  width: 220px;
  padding: 10px 14px;
  border-radius: 999px;
}

.header-search button,
.big-search button,
.search-page-form button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  color: #001014;
  background: var(--cyan);
  cursor: pointer;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  border: 0;
  color: white;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
}

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

.mobile-panel.open {
  display: grid;
  gap: 14px;
}

.mobile-panel form {
  display: grid;
  gap: 10px;
}

.mobile-panel input,
.mobile-panel button {
  width: 100%;
  border-radius: 14px;
  padding: 12px;
}

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

.hero-carousel {
  position: relative;
  width: 100%;
  min-height: 690px;
  margin-top: 88px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease, transform 1s ease;
  transform: scale(1.02);
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.75) 42%, rgba(2, 6, 23, 0.15) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 52%);
}

.hero-content {
  position: absolute;
  left: clamp(24px, 7vw, 86px);
  bottom: clamp(34px, 8vw, 92px);
  width: min(720px, calc(100% - 48px));
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-content h1 {
  max-width: 820px;
  font-size: clamp(38px, 6vw, 76px);
}

.hero-desc {
  max-width: 660px;
  margin: 20px 0 0;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.75;
}

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

.hero-tags span,
.tag-row span {
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  padding: 6px 10px;
  color: #cffafe;
  background: rgba(8, 145, 178, 0.15);
  font-size: 12px;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

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

.primary-btn {
  padding: 13px 24px;
  color: #001014;
  background: linear-gradient(135deg, #67e8f9, #06b6d4);
  box-shadow: 0 16px 40px rgba(34, 211, 238, 0.24);
}

.ghost-btn {
  padding: 12px 20px;
  border: 1px solid var(--line);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.66);
}

.ghost-btn.hot {
  border-color: rgba(250, 204, 21, 0.38);
  color: #fef3c7;
}

.hero-dots {
  position: absolute;
  right: 34px;
  bottom: 34px;
  display: flex;
  gap: 10px;
  z-index: 3;
}

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

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

.quick-search-panel,
.section-block,
.page-hero,
.detail-hero,
.content-section,
.player-section,
.all-link-cloud {
  margin-top: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
}

.quick-search-panel {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  padding: 28px;
}

.quick-search-panel h2,
.section-head h2,
.content-section h2,
.all-link-cloud h2 {
  margin: 0;
}

.big-search {
  display: flex;
  align-items: center;
  gap: 10px;
}

.big-search input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  border-radius: 999px;
}

.category-chips {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-chips a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.72);
}

.section-block {
  padding: 28px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.text-link {
  color: var(--cyan);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.92);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.34);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #020617;
}

.movie-card.compact .poster-link {
  aspect-ratio: 16 / 10;
}

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.8));
}

.duration,
.rating {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(0, 0, 0, 0.68);
  font-size: 12px;
}

.duration {
  top: 10px;
  right: 10px;
}

.rating {
  left: 10px;
  bottom: 10px;
  color: var(--yellow);
}

.play-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  color: white;
  background: rgba(6, 182, 212, 0.88);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.card-body {
  padding: 15px;
}

.card-body h3 {
  min-height: 48px;
  margin: 0 0 10px;
  font-size: 16px;
  line-height: 1.45;
}

.card-body h3 a:hover {
  color: var(--cyan);
}

.meta-line,
.one-line,
.detail-line,
.detail-desc,
.content-section p,
.page-hero p,
.category-panel p,
.rank-item p,
.footer-grid p {
  color: var(--muted);
  line-height: 1.75;
}

.meta-line,
.one-line {
  margin: 0 0 10px;
  font-size: 13px;
}

.one-line {
  display: -webkit-box;
  min-height: 46px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-grid,
.rank-list-page {
  display: grid;
  gap: 16px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-cover {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 4 / 5;
}

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

.rank-cover span {
  position: absolute;
  top: 8px;
  left: 8px;
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  border-radius: 999px;
  color: #001014;
  background: var(--yellow);
  font-weight: 900;
}

.rank-item h3 {
  margin: 0 0 8px;
}

.rank-item strong {
  color: var(--cyan);
}

.page-main {
  padding-top: 88px;
}

.page-hero {
  padding: 34px;
}

.slim-hero h1,
.category-hero h1 {
  font-size: clamp(36px, 5vw, 60px);
}

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

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

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

.category-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: rgba(15, 23, 42, 0.76);
}

.category-count {
  display: inline-flex;
  margin-bottom: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #001014;
  background: var(--cyan);
  font-weight: 800;
}

.sample-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.sample-links a,
.all-link-cloud a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
  color: #dbeafe;
  background: rgba(2, 6, 23, 0.36);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.filter-bar input,
.filter-bar select {
  min-width: min(100%, 280px);
  border-radius: 14px;
  padding: 13px 14px;
}

.detail-main {
  width: min(1180px, calc(100% - 32px));
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: 30px;
  padding: 30px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 4 / 5;
  background: #020617;
  box-shadow: var(--shadow);
}

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

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

.big-tags span {
  font-size: 13px;
}

.player-section {
  padding: 16px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 16 / 9;
  background: black;
}

.player-shell video {
  width: 100%;
  height: 100%;
  background: black;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.8));
  cursor: pointer;
}

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

.player-overlay button {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(6, 182, 212, 0.9);
  font-size: 30px;
  cursor: pointer;
}

.player-overlay strong {
  font-size: clamp(20px, 4vw, 36px);
}

.content-section {
  padding: 30px;
}

.content-section p {
  white-space: pre-line;
}

.all-link-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 28px;
}

.all-link-cloud h2 {
  flex-basis: 100%;
}

.search-page-form {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.search-page-form input {
  flex: 1;
  border-radius: 999px;
  padding: 14px 16px;
}

.search-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.empty-tip {
  grid-column: 1 / -1;
  color: var(--muted);
}

.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.56);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 28px;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0;
}

.footer-logo {
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 900;
}

.footer-links {
  display: grid;
  gap: 9px;
  color: #cbd5e1;
}

.footer-links a:hover {
  color: var(--cyan);
}

.hidden-card {
  display: none !important;
}

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

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

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

  .menu-toggle {
    display: block;
  }

  .hero-carousel {
    min-height: 620px;
    border-radius: 24px;
  }

  .hero-shade {
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.22), rgba(2, 6, 23, 0.96));
  }

  .quick-search-panel,
  .detail-hero,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .detail-poster {
    max-width: 320px;
  }
}

@media (max-width: 620px) {
  main,
  .page-main,
  .detail-main {
    width: min(100% - 20px, 1240px);
  }

  .header-inner,
  .mobile-panel {
    width: min(100% - 20px, 1240px);
  }

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

  .hero-carousel {
    min-height: 560px;
    margin-top: 78px;
  }

  .hero-content {
    left: 20px;
    bottom: 56px;
    width: calc(100% - 40px);
  }

  .hero-dots {
    right: 20px;
    bottom: 20px;
  }

  .movie-grid,
  .small-grid,
  .search-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .section-block,
  .page-hero,
  .detail-hero,
  .content-section {
    padding: 18px;
  }

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

  .search-page-form,
  .big-search {
    flex-direction: column;
  }

  .search-page-form button,
  .big-search button {
    width: 100%;
  }
}
