:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.84);
  --panel-solid: #111827;
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --blue: #3b82f6;
  --green: #10b981;
  --shadow: 0 24px 80px rgba(8, 47, 73, 0.28);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(34, 211, 238, 0.12), transparent 30rem),
    radial-gradient(circle at 85% 0%, rgba(59, 130, 246, 0.12), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.88);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(16px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.logo strong {
  font-size: 20px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 14px 36px rgba(6, 182, 212, 0.32);
}

.logo-icon span {
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid #ffffff;
  margin-left: 3px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link,
.mobile-link {
  color: #cbd5e1;
  padding: 10px 14px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #ffffff;
  background: rgba(34, 211, 238, 0.12);
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  width: min(360px, 32vw);
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
}

.header-search input,
.mobile-search input,
.hero-search input,
.search-page-form input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.header-search input,
.mobile-search input {
  padding: 8px 12px;
}

.header-search button,
.mobile-search button,
.hero-search button,
.search-page-form button {
  border: 0;
  border-radius: 999px;
  color: #001219;
  font-weight: 700;
  padding: 8px 16px;
  background: linear-gradient(135deg, var(--cyan), #67e8f9);
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.72);
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #ffffff;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

.mobile-search {
  display: flex;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  background-position: center;
  background-size: cover;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-slide::after,
.page-hero::after,
.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.92)),
    radial-gradient(circle at 75% 30%, rgba(34, 211, 238, 0.12), transparent 24rem);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: center;
  padding-top: 48px;
  padding-bottom: 120px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cyan);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p,
.detail-copy p {
  max-width: 720px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.detail-meta,
.detail-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags,
.detail-meta {
  margin-top: 24px;
}

.hero-tags span,
.detail-meta span,
.detail-tags a,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  color: #cffafe;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.14);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: #04111d;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
  box-shadow: 0 16px 40px rgba(6, 182, 212, 0.28);
}

.btn.ghost {
  color: #e0f2fe;
  border: 1px solid rgba(125, 211, 252, 0.32);
  background: rgba(15, 23, 42, 0.58);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: linear-gradient(135deg, #0f172a, #164e63);
}

.hero-poster span {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 999px;
  color: #001219;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.88);
}

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

.hero-dot {
  width: 36px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.34);
  cursor: pointer;
}

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

.hero-search {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  width: min(760px, calc(100% - 32px));
  display: flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.74);
  backdrop-filter: blur(14px);
}

.hero-search input,
.search-page-form input {
  padding: 12px 16px;
}

.section {
  padding: 72px 0;
}

.muted-section {
  background: rgba(15, 23, 42, 0.38);
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more,
.text-link,
.back-link {
  color: var(--cyan);
  font-weight: 700;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.64);
  box-shadow: 0 18px 60px rgba(2, 6, 23, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.34);
  box-shadow: 0 24px 70px rgba(6, 182, 212, 0.14);
}

.poster-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #0f172a, #164e63);
}

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

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

.quality-mark,
.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #001219;
  font-size: 12px;
  font-weight: 900;
  background: linear-gradient(135deg, #67e8f9, #60a5fa);
}

.rank-badge {
  left: auto;
  right: 12px;
  min-width: 30px;
  text-align: center;
}

.play-hover {
  position: absolute;
  inset: auto 12px 12px auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.88);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
  transform: translateY(0);
}

.card-body {
  padding: 14px;
}

.card-body h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

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

.card-meta {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  color: #7dd3fc;
  font-size: 12px;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 12px;
}

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

.category-tile {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 8px;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background-position: center;
  background-size: cover;
  box-shadow: 0 20px 70px rgba(2, 6, 23, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.category-tile strong {
  font-size: 22px;
}

.category-tile span {
  color: #cbd5e1;
  line-height: 1.55;
}

.home-split {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 36px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 38px 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.62);
}

.rank-row:hover {
  border-color: rgba(34, 211, 238, 0.34);
}

.rank-no {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 12px;
  color: #001219;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
}

.rank-row img {
  width: 56px;
  height: 74px;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(135deg, #0f172a, #164e63);
}

.rank-title {
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-meta {
  color: var(--muted);
  font-size: 13px;
}

.page-hero,
.detail-hero {
  position: relative;
  min-height: 360px;
  display: grid;
  align-items: center;
  background-position: center;
  background-size: cover;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.slim-hero {
  background:
    radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.18), transparent 24rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98));
}

.page-hero .container,
.detail-hero .container {
  position: relative;
  z-index: 2;
  padding: 72px 0;
}

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

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

.category-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.66);
}

.category-cover {
  min-height: 190px;
  display: flex;
  align-items: end;
  padding: 24px;
  background-position: center;
  background-size: cover;
}

.category-cover strong {
  font-size: 28px;
}

.category-card-body {
  padding: 22px;
}

.category-card-body h2 {
  margin: 0 0 10px;
}

.category-card-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.mini-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.mini-title-row span {
  color: #cffafe;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.1);
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 170px;
  gap: 12px;
  margin-bottom: 26px;
}

.filter-bar input,
.filter-bar select,
.search-page-form input {
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.72);
}

.search-page-form {
  display: flex;
  gap: 10px;
  width: min(760px, 100%);
  margin-top: 28px;
}

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

.empty-state {
  display: none;
  padding: 42px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(148, 163, 184, 0.24);
  border-radius: 24px;
}

.empty-state.is-visible {
  display: block;
}

.detail-hero {
  min-height: 540px;
}

.detail-hero-inner {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.back-link {
  grid-column: 1 / -1;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 28px;
  background: linear-gradient(135deg, #0f172a, #164e63);
  box-shadow: var(--shadow);
}

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

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

.detail-tags {
  margin-top: 16px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  text-align: center;
  background: radial-gradient(circle at center, rgba(34, 211, 238, 0.22), rgba(2, 6, 23, 0.82));
  cursor: pointer;
}

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

.play-mark {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
  box-shadow: 0 16px 50px rgba(34, 211, 238, 0.34);
}

.play-mark::before {
  content: "";
  width: 0;
  height: 0;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 22px solid #03111f;
  margin-left: 5px;
}

.player-cover strong {
  font-size: 26px;
}

.player-cover em {
  color: #bae6fd;
  font-style: normal;
}

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

.article-card {
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.64);
}

.article-card h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.article-card p {
  margin: 0;
  color: #dbeafe;
  line-height: 1.9;
  white-space: pre-line;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.92);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.6fr 1.2fr;
  gap: 32px;
  padding: 44px 0;
}

.footer-grid p {
  max-width: 520px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links,
.footer-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: start;
}

.footer-links a,
.footer-cats a {
  color: #cbd5e1;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.08);
}

.footer-bottom {
  padding: 18px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

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

  .home-split {
    grid-template-columns: 1fr;
  }
}

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

  .mobile-toggle {
    display: block;
    margin-left: auto;
  }

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

  .hero-content {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-top: 32px;
  }

  .hero-poster {
    width: min(230px, 70vw);
    transform: none;
  }

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: 38px;
  }

  .hero-search,
  .search-page-form {
    border-radius: 22px;
    flex-direction: column;
  }

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

  .filter-bar,
  .detail-hero-inner,
  .detail-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(240px, 70vw);
  }

  .rank-row {
    grid-template-columns: 34px 50px minmax(0, 1fr);
  }

  .rank-meta {
    display: none;
  }
}

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

  .section {
    padding: 52px 0;
  }

  .section-head {
    display: block;
  }

  .section-more {
    display: inline-flex;
    margin-top: 14px;
  }

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

  .card-line {
    min-height: auto;
  }
}
