:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: #1e293b;
  --panel-soft: #253449;
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-deep: #0891b2;
  --blue: #2563eb;
  --orange: #f97316;
  --shadow: 0 24px 80px rgba(2, 8, 23, 0.38);
  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;
  color: var(--text);
  background: linear-gradient(180deg, #0f172a 0%, #111827 44%, #020617 100%);
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 38px rgba(2, 8, 23, 0.26);
}

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

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

.brand-icon,
.footer-logo span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 30px rgba(34, 211, 238, 0.22);
}

.brand-copy strong {
  display: block;
  font-size: 24px;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #60a5fa, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-copy small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a {
  color: #cbd5e1;
  font-weight: 600;
  transition: color 0.22s ease;
}

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

.header-search {
  position: relative;
  width: 260px;
}

.header-search input,
.search-page-form input {
  width: 100%;
  border: 1px solid rgba(103, 232, 249, 0.18);
  outline: none;
  color: #ffffff;
  background: rgba(51, 65, 85, 0.68);
  border-radius: 999px;
  padding: 11px 46px 11px 16px;
  transition: border 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.search-page-form input:focus {
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
  background: rgba(15, 23, 42, 0.82);
}

.header-search button {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #dbeafe;
  background: rgba(34, 211, 238, 0.16);
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

.hero-slider {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #020617;
}

.hero-slider h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-mask {
  background:
    radial-gradient(circle at 74% 30%, rgba(34, 211, 238, 0.18), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.08)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.8), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
  padding-top: 38px;
}

.hero-kicker,
.page-hero span,
.cover-chip,
.detail-category {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
}

.hero-kicker {
  padding: 8px 16px;
  font-size: 14px;
  margin-bottom: 18px;
}

.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 650px;
  margin: 0 0 30px;
  color: #e2e8f0;
  font-size: 20px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.primary-btn,
.ghost-btn,
.search-page-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.primary-btn,
.search-page-form button {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan-deep), var(--blue));
  box-shadow: 0 18px 38px rgba(14, 165, 233, 0.22);
}

.primary-btn:hover,
.ghost-btn:hover,
.search-page-form button:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  color: #e0f2fe;
  border: 1px solid rgba(224, 242, 254, 0.3);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.42);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.category-strip {
  padding: 54px 0 44px;
  background: linear-gradient(180deg, #020617, #0f172a);
}

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

.section-head h2,
.site-footer h2,
.detail-section h2,
.aside-card h2 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 26px;
  letter-spacing: -0.02em;
}

.section-head p,
.page-hero p,
.site-footer p,
.detail-section p {
  margin: 0;
  color: var(--muted);
  line-height: 1.78;
}

.section-head a {
  color: var(--cyan);
  font-weight: 800;
}

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

.category-tile,
.category-overview-card,
.detail-card,
.aside-card,
.poster-card,
.movie-card,
.player-panel,
.page-hero {
  border: 1px solid var(--line);
  background: rgba(30, 41, 59, 0.82);
  box-shadow: var(--shadow);
}

.category-tile {
  min-height: 138px;
  padding: 20px;
  border-radius: 20px;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

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

.category-tile strong,
.category-title-link {
  display: block;
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 20px;
  font-weight: 900;
}

.category-tile span,
.category-overview-card p {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.7;
}

.page-stack,
.page-shell,
.detail-shell {
  padding: 42px 0 70px;
}

.content-section {
  margin-bottom: 48px;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #0f172a);
}

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

.movie-card:hover img,
.poster-card:hover img {
  transform: scale(1.07);
  filter: saturate(1.05);
}

.cover-chip {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 5px 9px;
  font-size: 12px;
}

.cover-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  backdrop-filter: blur(10px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.movie-card-body {
  padding: 15px;
}

.movie-title {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  color: #ffffff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.32;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-title:hover {
  color: var(--cyan);
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 44px;
  overflow: hidden;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #64748b;
  font-size: 12px;
}

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

.movie-card-wide {
  display: grid;
  grid-template-columns: 148px 1fr;
}

.movie-card-wide .movie-cover {
  aspect-ratio: auto;
  height: 100%;
  min-height: 188px;
}

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

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

.tag-row span {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(8, 145, 178, 0.16);
  font-size: 12px;
}

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

.page-hero span {
  padding: 7px 13px;
  font-size: 13px;
  margin-bottom: 16px;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.06;
  letter-spacing: -0.05em;
}

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

.category-overview-card {
  padding: 24px;
  border-radius: 22px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.mini-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.mini-link-row a {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
  color: #94a3b8;
  font-size: 14px;
}

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

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

.detail-main {
  min-width: 0;
}

.player-panel {
  padding: 14px;
  border-radius: 24px;
  margin-bottom: 24px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.video-shell video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: #000000;
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
}

.player-cover img,
.player-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.player-cover img {
  object-fit: cover;
}

.player-shade {
  background: radial-gradient(circle at 50% 46%, rgba(34, 211, 238, 0.24), transparent 28%), rgba(2, 6, 23, 0.58);
}

.player-button {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan-deep), var(--blue));
  transform: translate(-50%, -50%);
  box-shadow: 0 24px 54px rgba(14, 165, 233, 0.34);
  font-size: 32px;
}

.detail-card,
.aside-card,
.poster-card {
  border-radius: 24px;
}

.detail-card {
  padding: 28px;
}

.detail-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.detail-title-row h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.detail-category {
  flex: 0 0 auto;
  padding: 7px 13px;
  font-size: 13px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  color: #cbd5e1;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.detail-tags {
  margin: 18px 0 24px;
}

.detail-section {
  margin-top: 24px;
}

.detail-section p {
  margin-top: 12px;
  font-size: 16px;
}

.detail-aside {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 20px;
}

.poster-card {
  overflow: hidden;
  padding: 14px;
}

.poster-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
  transition: transform 0.45s ease;
}

.full-btn {
  width: 100%;
  margin-top: 14px;
}

.aside-card {
  padding: 20px;
}

.aside-card a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: #e2e8f0;
  font-weight: 700;
}

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

.aside-card span {
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
}

.search-page-form {
  display: flex;
  gap: 12px;
  max-width: 680px;
  margin-top: 22px;
}

.search-page-form button {
  min-width: 120px;
  cursor: pointer;
}

.site-footer {
  background: linear-gradient(180deg, #0f172a, #020617);
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  padding: 46px 0;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: #ffffff;
  font-size: 22px;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li + li {
  margin-top: 10px;
}

.site-footer a {
  color: #cbd5e1;
}

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

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid var(--line);
  color: #64748b;
  text-align: center;
  font-size: 14px;
}

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

  .mobile-toggle {
    display: grid;
    place-items: center;
  }

  .header-search {
    margin-left: auto;
  }

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

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

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

  .detail-aside {
    position: static;
    grid-template-columns: 260px 1fr;
  }
}

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

  .header-inner {
    min-height: 68px;
    gap: 12px;
  }

  .brand {
    min-width: 0;
  }

  .brand-icon {
    width: 38px;
    height: 38px;
  }

  .brand-copy strong {
    font-size: 19px;
  }

  .brand-copy small {
    display: none;
  }

  .header-search {
    display: none;
  }

  .hero-slider {
    height: 540px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .hero-arrow {
    display: none;
  }

  .section-head,
  .detail-title-row,
  .search-page-form {
    align-items: flex-start;
    flex-direction: column;
  }

  .category-grid,
  .category-overview-grid,
  .rank-list,
  .footer-grid,
  .detail-aside {
    grid-template-columns: 1fr;
  }

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

  .movie-card-wide {
    grid-template-columns: 120px 1fr;
  }

  .movie-card-wide .movie-cover {
    min-height: 170px;
  }

  .page-hero,
  .detail-card {
    padding: 24px;
  }

  .poster-card img {
    max-height: 460px;
  }
}

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

  .movie-card-wide {
    grid-template-columns: 1fr;
  }
}
