* {
  box-sizing: border-box;
}

:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111c33;
  --panel-light: #1e293b;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --yellow: #facc15;
  --danger: #ef4444;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(2, 6, 23, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.header-inner {
  width: min(1280px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

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

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cyan), #2563eb);
  color: #fff;
  box-shadow: 0 0 30px rgba(34, 211, 238, 0.35);
  font-size: 14px;
}

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

.desktop-nav a,
.mobile-nav a {
  color: #cbd5e1;
  transition: color 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #fff;
}

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

.header-search input,
.mobile-search input,
.big-search input,
.search-page-form input,
.filter-panel input,
.filter-panel select {
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.96);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.header-search input:focus,
.mobile-search input:focus,
.big-search input:focus,
.search-page-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(34, 211, 238, 0.9);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.header-search button,
.mobile-search button,
.big-search button,
.search-page-form button,
.filter-reset,
.primary-btn,
.ghost-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.header-search button,
.mobile-search button,
.big-search button,
.search-page-form button,
.primary-btn {
  background: linear-gradient(135deg, var(--cyan), #2563eb);
  color: #fff;
  font-weight: 700;
}

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

.nav-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
}

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

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

.mobile-search {
  display: flex;
  gap: 8px;
}

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

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 2;
}

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 24% 36%, rgba(34, 211, 238, 0.28), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.56) 45%, rgba(2, 6, 23, 0.25)),
    linear-gradient(0deg, #020617 0%, transparent 45%);
}

.hero-content {
  position: absolute;
  z-index: 3;
  left: max(24px, calc((100vw - 1280px) / 2));
  bottom: 80px;
  width: min(760px, calc(100% - 48px));
}

.hero-label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(34, 211, 238, 0.16);
  color: #a5f3fc;
  border: 1px solid rgba(34, 211, 238, 0.35);
  font-weight: 700;
}

.hero-content h1 {
  margin: 0 0 16px;
  font-size: clamp(40px, 6vw, 82px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-content p {
  margin: 0 0 20px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 22px);
  max-width: 720px;
}

.hero-meta,
.detail-meta,
.movie-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: #cbd5e1;
}

.hero-meta span,
.detail-meta span,
.movie-meta span,
.movie-meta a {
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

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

.hero-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.55);
  font-size: 34px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(2, 6, 23, 0.78);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 34px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

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

.main-shell,
.page-shell,
.footer-grid,
.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.main-shell {
  padding: 48px 0 20px;
}

.page-shell {
  padding: 104px 0 30px;
}

.quick-search-panel,
.search-page-panel,
.filter-panel,
.side-card,
.detail-content,
.category-overview-card,
.ranking-panel,
.page-hero {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.58));
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.quick-search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 24px;
  align-items: center;
  padding: 28px;
  margin-bottom: 56px;
}

.quick-search-panel h2,
.content-section h2,
.page-hero h1,
.detail-content h1 {
  margin: 0;
  color: #fff;
  letter-spacing: -0.03em;
}

.quick-search-panel h2,
.content-section h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.quick-search-panel p,
.section-title-row p,
.page-hero p,
.detail-content p,
.footer-grid p,
.category-overview-body p {
  color: var(--muted);
}

.big-search,
.search-page-form,
.filter-panel {
  display: flex;
  gap: 12px;
}

.big-search input,
.search-page-form input {
  min-width: 0;
  flex: 1;
  border-radius: 999px;
  padding: 15px 18px;
}

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

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

.section-title-row p {
  margin: 8px 0 0;
}

.section-more {
  flex: none;
  color: var(--cyan);
  font-weight: 700;
}

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

.category-page-grid {
  align-items: start;
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.86);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

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

.poster-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #0f172a;
}

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

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

.poster-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.76), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-frame::after {
  opacity: 1;
}

.duration,
.rating,
.play-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(2, 6, 23, 0.72);
  color: #fff;
  font-size: 12px;
}

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

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

.play-badge {
  left: 50%;
  top: 50%;
  display: inline-flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%) scale(0.78);
  background: rgba(34, 211, 238, 0.9);
  opacity: 0;
  font-size: 22px;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  min-height: 3.1em;
  margin: 0 0 10px;
  font-size: 17px;
  line-height: 1.45;
}

.movie-info h3 a:hover {
  color: var(--cyan);
}

.movie-info p {
  min-height: 3.2em;
  margin: 12px 0;
  color: #94a3b8;
  font-size: 14px;
}

.movie-meta {
  gap: 6px;
  font-size: 12px;
}

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

.tag-row span {
  border-radius: 999px;
  padding: 4px 8px;
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.1);
  border: 1px solid rgba(34, 211, 238, 0.18);
  font-size: 12px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 156px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  isolation: isolate;
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.24));
}

.category-card span {
  font-size: 22px;
  font-weight: 800;
}

.category-card strong {
  color: #a5f3fc;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.rank-list a {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: rgba(15, 23, 42, 0.78);
}

.rank-index,
.rank-number {
  color: var(--cyan);
  font-weight: 900;
}

.rank-score {
  color: var(--yellow);
  font-weight: 800;
}

.compact-hero {
  margin-bottom: 28px;
  padding: 34px;
}

.compact-hero h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  color: #cbd5e1;
}

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

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

.category-overview-card {
  overflow: hidden;
}

.category-overview-card a {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 190px;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  background: #0f172a;
}

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

.category-overview-body {
  padding: 24px;
}

.category-overview-body h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.category-overview-body span {
  color: var(--cyan);
  font-weight: 800;
}

.filter-panel {
  align-items: center;
  padding: 18px;
  margin-bottom: 24px;
}

.filter-panel input {
  min-width: 220px;
  flex: 1;
  border-radius: 999px;
  padding: 12px 14px;
}

.filter-panel select {
  border-radius: 999px;
  padding: 12px 14px;
}

.filter-reset {
  background: rgba(148, 163, 184, 0.14);
  color: #fff;
}

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

.rank-card a {
  display: grid;
  grid-template-columns: 70px 96px 1fr;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.8);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-card a:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.35);
}

.rank-card img {
  width: 96px;
  height: 120px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-card-body {
  display: grid;
  gap: 6px;
}

.rank-card-body strong {
  font-size: 20px;
}

.rank-card-body em,
.rank-card-body small {
  color: var(--muted);
  font-style: normal;
}

.search-page-panel {
  padding: 22px;
  margin-bottom: 26px;
}

.search-count {
  margin-top: 14px;
  color: var(--muted);
}

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

.player-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  box-shadow: var(--shadow);
}

.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  padding: 0;
  background: #000;
  cursor: pointer;
  overflow: hidden;
}

.player-cover.is-hidden {
  display: none;
}

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.76;
}

.big-play {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.92);
  color: #fff;
  font-size: 32px;
  box-shadow: 0 0 38px rgba(34, 211, 238, 0.36);
}

.detail-content {
  margin-top: 22px;
  padding: 26px;
}

.detail-content h1 {
  font-size: clamp(30px, 4vw, 52px);
  margin-bottom: 14px;
}

.detail-content h2 {
  margin: 28px 0 10px;
  font-size: 24px;
}

.detail-content p {
  font-size: 17px;
}

.one-line {
  color: #e2e8f0 !important;
  font-size: 20px !important;
}

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

.detail-side {
  display: grid;
  gap: 20px;
}

.side-card {
  padding: 20px;
}

.side-card h2 {
  margin: 0 0 16px;
}

.side-rank {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.side-rank a {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  color: #cbd5e1;
}

.side-rank span {
  color: var(--cyan);
  font-weight: 900;
}

.poster-side img {
  width: 100%;
  border-radius: 14px;
  margin-bottom: 14px;
}

.poster-side a {
  display: block;
  border-radius: 999px;
  padding: 11px 16px;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), #2563eb);
  font-weight: 800;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 28px;
  padding: 46px 0 30px;
}

.footer-logo {
  margin-bottom: 14px;
  font-size: 20px;
}

.footer-grid h3 {
  margin: 0 0 14px;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

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

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

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 0 28px;
  color: var(--muted);
  text-align: center;
}

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

  .nav-toggle {
    display: block;
  }

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

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

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

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

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

@media (max-width: 760px) {
  .brand {
    font-size: 20px;
  }

  .hero-slider {
    min-height: 620px;
  }

  .hero-content {
    bottom: 72px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-search-panel,
  .big-search,
  .search-page-form,
  .filter-panel,
  .section-title-row {
    display: grid;
    grid-template-columns: 1fr;
  }

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

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

  .category-covers {
    min-height: 180px;
  }

  .rank-card a {
    grid-template-columns: 48px 74px 1fr;
  }

  .rank-card img {
    width: 74px;
    height: 96px;
  }

  .compact-hero {
    padding: 24px;
  }
}
