:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --blue: #3b82f6;
  --cyan: #06b6d4;
  --violet: #8b5cf6;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 5%, rgba(59, 130, 246, 0.22), transparent 30rem),
    radial-gradient(circle at 88% 0%, rgba(139, 92, 246, 0.2), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 78%);
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(6, 182, 212, 0.25);
}

.brand-name {
  white-space: nowrap;
  font-size: 20px;
}

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

.nav-link,
.mobile-link {
  color: var(--soft);
  font-size: 15px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #ffffff;
}

.nav-link:hover {
  transform: translateY(-1px);
}

.header-search,
.mobile-search,
.search-panel {
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.78);
  border-radius: 14px;
}

.header-search input,
.mobile-search input,
.search-panel input {
  width: 230px;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 11px 13px;
}

.header-search button,
.mobile-search button,
.search-panel button {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  padding: 11px 15px;
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  padding: 12px 16px 18px;
  background: rgba(15, 23, 42, 0.95);
}

.mobile-nav.is-open {
  display: grid;
  gap: 12px;
}

.hero-carousel {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.1s ease;
  pointer-events: none;
}

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: saturate(1.15);
}

.hero-bg::after,
.detail-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 70% 30%, rgba(6, 182, 212, 0.2), transparent 26rem),
    linear-gradient(180deg, transparent 0%, #020617 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 680px;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 52px;
  padding: 94px 0 80px;
}

.eyebrow {
  margin: 0 0 14px;
  color: #67e8f9;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.03;
  letter-spacing: -0.06em;
}

.hero-summary,
.page-hero p,
.detail-one-line {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--soft);
  font-size: clamp(16px, 2vw, 21px);
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(125, 211, 252, 0.24);
  color: #dbeafe;
  background: rgba(14, 165, 233, 0.12);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 38px rgba(37, 99, 235, 0.28);
}

.ghost-button {
  border: 1px solid rgba(226, 232, 240, 0.2);
  color: var(--text);
  background: rgba(15, 23, 42, 0.54);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 48px rgba(6, 182, 212, 0.2);
}

.hero-poster {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.2);
  background: rgba(15, 23, 42, 0.55);
  border-radius: 30px;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 36px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

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

.hero-dot.is-active {
  width: 54px;
  background: #67e8f9;
}

.quick-panel {
  margin-top: -34px;
  position: relative;
  z-index: 5;
}

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

.quick-grid a,
.category-card,
.movie-card,
.player-card,
.detail-article,
.detail-side,
.search-panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.58));
  box-shadow: 0 18px 50px rgba(2, 6, 23, 0.25);
  backdrop-filter: blur(16px);
}

.quick-grid a {
  display: grid;
  gap: 4px;
  border-radius: 20px;
  padding: 20px;
}

.quick-grid span {
  color: var(--muted);
  font-size: 13px;
}

.quick-grid strong {
  font-size: 20px;
}

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

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.04em;
}

.section-heading a {
  color: #67e8f9;
  font-weight: 700;
}

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

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 160px;
  border-radius: var(--radius);
  padding: 22px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover,
.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(103, 232, 249, 0.38);
}

.category-glow {
  position: absolute;
  right: -48px;
  top: -48px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.38), transparent 68%);
}

.category-card strong {
  position: relative;
  display: block;
  font-size: 21px;
}

.category-card p {
  position: relative;
  margin: 12px 0 18px;
  color: var(--soft);
  font-size: 14px;
}

.category-action {
  position: relative;
  color: #67e8f9;
  font-weight: 800;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.card-link {
  display: block;
  min-height: 100%;
}

.cover-frame {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 18%, rgba(59, 130, 246, 0.35), transparent 35%),
    linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
}

.cover-frame img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

.cover-frame img.cover-hidden {
  opacity: 0;
}

.movie-card:hover .cover-frame img,
.hero-poster:hover img {
  transform: scale(1.05);
}

.cover-shine {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.86));
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  border-radius: 12px;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(239, 68, 68, 0.25);
}

.card-body {
  padding: 15px;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.45;
  letter-spacing: -0.02em;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.card-desc {
  display: -webkit-box;
  min-height: 44px;
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.compact-card .card-desc {
  display: none;
}

.page-hero,
.movie-detail-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.compact-hero {
  background:
    radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.2), transparent 28rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.96));
}

.page-hero-inner {
  padding: 92px 0 70px;
}

.page-hero h1 {
  max-width: 900px;
}

.search-panel {
  width: min(760px, 100%);
  margin-bottom: 26px;
  border-radius: 18px;
}

.search-panel input {
  width: 100%;
  padding: 16px 18px;
  font-size: 17px;
}

.search-panel button {
  padding: 16px 24px;
  font-weight: 800;
}

.search-result-heading {
  margin: 8px 0 20px;
  color: var(--soft);
  font-size: 18px;
  font-weight: 800;
}

.movie-detail-hero {
  min-height: 560px;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 80px 0 64px;
}

.breadcrumb {
  display: inline-flex;
  margin-bottom: 22px;
  color: #67e8f9;
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 36px;
  align-items: end;
}

.detail-poster {
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.detail-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-meta {
  margin: 18px 0 0;
  color: #bfdbfe;
  font-weight: 700;
}

.player-section {
  padding: 56px 0 22px;
}

.player-card {
  overflow: hidden;
  border-radius: 28px;
}

.player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
}

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.22), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  transition: opacity 0.2s ease;
}

.play-circle {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 22px 48px rgba(6, 182, 212, 0.28);
}

.player.is-playing .player-start {
  opacity: 0;
  pointer-events: none;
}

.player-message {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #fecaca;
  background: rgba(127, 29, 29, 0.78);
  border-radius: 14px;
  padding: 12px 16px;
  text-align: center;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
}

.detail-article,
.detail-side {
  border-radius: var(--radius);
  padding: 28px;
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-article p {
  margin: 0 0 24px;
  color: var(--soft);
  font-size: 17px;
}

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

.detail-side dt {
  color: var(--muted);
  font-size: 13px;
}

.detail-side dd {
  margin: -8px 0 0;
  color: var(--text);
  font-weight: 700;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 34px 0;
  background: rgba(2, 6, 23, 0.78);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

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

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

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

  .hero-poster {
    display: none;
  }

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

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

  .detail-poster {
    width: min(260px, 68vw);
  }
}

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

  .header-inner {
    min-height: 64px;
  }

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

  .hero-carousel,
  .hero-content {
    min-height: 590px;
  }

  .hero-content {
    padding: 80px 0 68px;
  }

  .hero-dots {
    left: 16px;
    right: auto;
  }

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

  .quick-grid a,
  .category-card,
  .card-body,
  .detail-article,
  .detail-side {
    padding: 16px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .content-section {
    padding: 42px 0;
  }

  .page-hero-inner,
  .detail-hero-inner {
    padding: 62px 0 48px;
  }

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

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  .card-body h3 {
    font-size: 14px;
  }

  .card-desc,
  .tag-row {
    display: none;
  }

  .hero-actions,
  .detail-actions {
    flex-direction: column;
  }

  .primary-button,
  .ghost-button {
    width: 100%;
  }
}
