:root {
  --bg: #07111f;
  --panel: #0f2037;
  --panel-soft: #142a46;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --white: #ffffff;
  --blue: #2563eb;
  --cyan: #22d3ee;
  --red: #ef4444;
  --green: #10b981;
  --gold: #f59e0b;
  --line: rgba(148, 163, 184, 0.22);
  --shadow: 0 24px 80px rgba(15, 23, 42, 0.18);
  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;
  color: var(--text);
  background: #f5f7fb;
  min-width: 320px;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 17, 31, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 12px 34px rgba(34, 211, 238, 0.28);
}

.logo-text {
  background: linear-gradient(90deg, #60a5fa, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
}

.main-nav a {
  color: rgba(255, 255, 255, 0.86);
  transition: color 0.2s ease;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.search-form input {
  width: 190px;
  padding: 8px 10px 8px 14px;
  border: 0;
  outline: 0;
  color: var(--white);
  background: transparent;
}

.search-form input::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

.search-form button,
.nav-toggle {
  border: 0;
  cursor: pointer;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 999px;
}

.search-form button {
  padding: 8px 14px;
  font-weight: 700;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  font-size: 22px;
}

.mobile-panel {
  display: none;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px 18px;
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel a {
  display: block;
  padding: 12px 0;
  color: rgba(255, 255, 255, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.page-main {
  min-height: 72vh;
}

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

.hero-carousel {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  color: var(--white);
  background: radial-gradient(circle at top left, rgba(34, 211, 238, 0.28), transparent 35%), linear-gradient(135deg, #06101f 0%, #0a2a55 55%, #0f172a 100%);
}

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

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

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

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  filter: saturate(1.1) contrast(1.08);
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 17, 31, 0.96) 0%, rgba(7, 17, 31, 0.75) 46%, rgba(7, 17, 31, 0.36) 100%), linear-gradient(0deg, #07111f 0%, transparent 35%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
  gap: 48px;
  align-items: center;
  padding: 82px 0 100px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
  color: #b7f6ff;
  background: rgba(34, 211, 238, 0.14);
  border: 1px solid rgba(103, 232, 249, 0.28);
}

.hero-title {
  margin: 22px 0 18px;
  max-width: 760px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  font-weight: 900;
}

.hero-title span {
  color: var(--cyan);
}

.hero-desc {
  max-width: 720px;
  color: #d8ecff;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.78;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-buttons,
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 14px;
  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: #06101f;
  background: linear-gradient(135deg, #ffffff, #b7f6ff);
  box-shadow: 0 18px 46px rgba(34, 211, 238, 0.28);
}

.btn-dark {
  color: var(--white);
  background: rgba(37, 99, 235, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.btn-soft {
  color: var(--blue);
  background: #eff6ff;
}

.hero-poster {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 35px 90px rgba(0, 0, 0, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.18);
  aspect-ratio: 3 / 4;
  background: rgba(255, 255, 255, 0.08);
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(7, 17, 31, 0.72), transparent 48%);
}

.hero-poster-badge {
  position: absolute;
  left: 20px;
  bottom: 20px;
  z-index: 2;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  font-weight: 800;
}

.hero-controls {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  width: min(1240px, calc(100% - 40px));
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.hero-dot {
  padding: 12px;
  min-height: 54px;
  cursor: pointer;
  border-radius: 18px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  overflow: hidden;
  text-align: left;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hero-dot.is-active {
  color: var(--white);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.8), rgba(34, 211, 238, 0.6));
  border-color: rgba(103, 232, 249, 0.45);
}

.section {
  padding: 72px 0;
}

.section-soft {
  background: linear-gradient(135deg, #f8fbff 0%, #eef6ff 100%);
}

.section-dark {
  color: var(--white);
  background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 34%), linear-gradient(135deg, #07111f, #0d2440);
}

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

.section-title {
  margin: 12px 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  max-width: 760px;
}

.section-dark .section-desc {
  color: #bad4ee;
}

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
}

.card-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

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

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

.card-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(7, 17, 31, 0.74), transparent 54%);
}

.card-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
  background: rgba(239, 68, 68, 0.94);
}

.card-play {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.card-body {
  padding: 18px;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.card-title {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

.card-title a:hover {
  color: var(--blue);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}

.card-text {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.tag {
  padding: 5px 9px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  padding: 26px;
  border-radius: 28px;
  color: var(--white);
  background: linear-gradient(135deg, #2563eb, #22d3ee);
  box-shadow: 0 20px 54px rgba(37, 99, 235, 0.2);
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #db2777, #fb7185);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #059669, #34d399);
}

.category-card:nth-child(4n) {
  background: linear-gradient(135deg, #7c3aed, #38bdf8);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.7;
}

.page-hero {
  color: var(--white);
  padding: 80px 0;
  background: radial-gradient(circle at 16% 20%, rgba(34, 211, 238, 0.25), transparent 28%), linear-gradient(135deg, #07111f 0%, #0d2e5c 100%);
}

.page-hero h1 {
  margin: 12px 0 16px;
  font-size: clamp(36px, 6vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #cfe7ff;
  font-size: 18px;
  line-height: 1.8;
}

.filter-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 18px;
  margin-bottom: 28px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.filter-panel input,
.filter-panel select {
  min-height: 46px;
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  padding: 0 14px;
  outline: 0;
  background: #f8fafc;
}

.filter-panel input {
  flex: 1 1 260px;
}

.filter-panel select {
  flex: 0 0 150px;
}

.empty-state {
  display: none;
  padding: 40px;
  text-align: center;
  color: var(--muted);
  border-radius: 24px;
  background: var(--white);
}

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

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

.rank-row {
  display: grid;
  grid-template-columns: 74px 160px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 22px;
  background: var(--white);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: var(--white);
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--red), var(--gold));
}

.rank-poster {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 16px;
}

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

.rank-info h2,
.rank-info h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 900;
}

.rank-info p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, #07111f, #123866);
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.25;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(4px) saturate(1.1);
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 17, 31, 0.98), rgba(7, 17, 31, 0.7));
}

.detail-wrap {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 58px 0;
}

.detail-cover {
  overflow: hidden;
  border-radius: 30px;
  aspect-ratio: 3 / 4;
  background: #0f172a;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #b9ddff;
  font-size: 14px;
}

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

.detail-title {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.05em;
  font-weight: 900;
}

.detail-desc {
  margin: 0;
  color: #d8ecff;
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 22px 0 0;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
  padding: 48px 0 72px;
}

.content-card {
  border-radius: 28px;
  background: var(--white);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  padding: 28px;
}

.content-card + .content-card {
  margin-top: 24px;
}

.content-card h2 {
  margin: 0 0 16px;
  font-size: 26px;
  font-weight: 900;
}

.content-card p {
  margin: 0;
  color: #334155;
  line-height: 1.86;
  font-size: 16px;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 28px 84px rgba(0, 0, 0, 0.22);
}

.video-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  cursor: pointer;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.24), rgba(0, 0, 0, 0.42));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-cover span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 50%;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.94);
  font-size: 36px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.36);
}

.play-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.sidebar {
  position: sticky;
  top: 92px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.related-thumb {
  overflow: hidden;
  border-radius: 14px;
  aspect-ratio: 16 / 10;
  background: #0f172a;
}

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

.related-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 900;
}

.related-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.site-footer {
  color: #c4d5e7;
  background: #07111f;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 34px 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
}

.footer-title {
  margin: 0 0 8px;
  color: var(--white);
  font-size: 20px;
  font-weight: 900;
}

.footer-desc,
.footer-links {
  margin: 0;
  color: #94a3b8;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  gap: 16px;
}

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

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

  .hero-content {
    grid-template-columns: minmax(0, 1fr) 340px;
  }

  .content-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: static;
  }
}

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

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

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

  .hero-content {
    grid-template-columns: 1fr;
    padding: 64px 0 120px;
  }

  .hero-poster {
    max-width: 360px;
  }

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

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

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

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

  .rank-row .btn {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .container {
    width: min(100% - 28px, 1240px);
  }

  .header-inner {
    padding: 12px 14px;
  }

  .logo {
    font-size: 18px;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .section {
    padding: 50px 0;
  }

  .section-head {
    display: block;
  }

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

  .hero-title,
  .page-hero h1,
  .detail-title {
    letter-spacing: -0.04em;
  }

  .hero-controls {
    grid-template-columns: 1fr 1fr;
    bottom: 18px;
  }

  .hero-dot {
    min-height: 46px;
    padding: 10px;
    font-size: 13px;
  }

  .filter-panel {
    display: grid;
  }

  .filter-panel input,
  .filter-panel select {
    width: 100%;
  }

  .content-card {
    padding: 22px;
    border-radius: 22px;
  }

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

  .rank-poster {
    grid-column: 1 / -1;
    order: -1;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}
