:root {
  --bg: #07111f;
  --panel: #0d1b2e;
  --panel-soft: #10243d;
  --card: #ffffff;
  --ink: #101828;
  --muted: #667085;
  --light: #f8fafc;
  --line: rgba(255, 255, 255, 0.12);
  --teal: #0fbaa8;
  --cyan: #06b6d4;
  --blue: #2563eb;
  --gold: #f59e0b;
  --shadow: 0 24px 70px rgba(2, 12, 27, 0.24);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #07111f 0%, #0b1727 440px, #f2f6fb 441px, #eef4f8 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, rgba(13, 148, 136, 0.95), rgba(8, 145, 178, 0.95), rgba(37, 99, 235, 0.95));
  box-shadow: 0 18px 45px rgba(2, 12, 27, 0.22);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0f766e;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  font-size: 15px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.nav-link,
.mobile-nav-link {
  border-radius: 999px;
  padding: 10px 14px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: #fff;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
}

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

main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-section {
  margin: 28px 0 34px;
}

.hero-carousel {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border-radius: 34px;
  background: #07111f;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition: opacity 0.6s ease, transform 0.8s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.64;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(4, 12, 24, 0.96) 0%, rgba(5, 23, 40, 0.76) 46%, rgba(5, 23, 40, 0.2) 100%), radial-gradient(circle at 82% 20%, rgba(14, 165, 233, 0.4), transparent 34%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(720px, calc(100% - 44px));
  padding: 66px 0 66px 64px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 12px;
  color: #8cf4e8;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-content h1,
.sub-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.hero-content h2 {
  margin: 18px 0 12px;
  font-size: clamp(25px, 3vw, 42px);
  line-height: 1.12;
}

.hero-content p {
  max-width: 660px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.tag-row,
.detail-tags,
.detail-meta,
.hero-actions,
.sub-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-tags span,
.tag,
.detail-tag,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 11px;
  color: #075985;
  background: rgba(240, 253, 250, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.hero-actions,
.sub-actions {
  margin-top: 28px;
}

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

.primary-btn {
  color: #fff;
  background: linear-gradient(90deg, var(--teal), var(--cyan), var(--blue));
  box-shadow: 0 16px 34px rgba(8, 145, 178, 0.32);
}

.ghost-btn {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.primary-btn:hover,
.ghost-btn:hover,
.category-tile:hover,
.movie-card:hover,
.category-overview-card:hover {
  transform: translateY(-3px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
  font-size: 38px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.hero-dot.active {
  width: 34px;
  background: #fff;
}

.quick-section {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 34px;
}

.quick-section a {
  border-radius: 999px;
  padding: 12px 18px;
  color: #fff;
  background: rgba(15, 118, 110, 0.84);
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.18);
  font-weight: 800;
}

.section-block,
.search-panel,
.sub-hero,
.detail-hero,
.player-section,
.detail-content,
.category-overview-grid {
  margin: 34px 0;
}

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

.section-title p {
  margin: 0 0 6px;
  color: #0891b2;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.section-title h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(26px, 3.2vw, 42px);
  letter-spacing: -0.03em;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  box-shadow: 0 26px 58px rgba(15, 23, 42, 0.16);
}

.poster-wrap {
  position: relative;
  display: block;
  height: 285px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #164e63);
}

.poster-wrap img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.duration,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.duration {
  right: 12px;
  bottom: 12px;
  padding: 6px 9px;
  background: rgba(2, 6, 23, 0.74);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gold), #ef4444);
  box-shadow: 0 10px 22px rgba(245, 158, 11, 0.34);
}

.movie-body {
  padding: 16px;
}

.movie-body h3 {
  min-height: 48px;
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.35;
}

.movie-body h3 a:hover {
  color: #0891b2;
}

.meta-line,
.movie-desc,
.search-panel p,
.sub-hero p,
.content-card p,
.footer-grid p {
  color: var(--muted);
  line-height: 1.75;
}

.meta-line {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
}

.movie-desc {
  min-height: 76px;
  margin: 0 0 12px;
  font-size: 14px;
}

.tag-row {
  gap: 6px;
}

.tag {
  padding: 5px 8px;
  color: #0f766e;
  background: #ecfeff;
}

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

.category-tile,
.category-overview-card a {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 160px;
  border-radius: 24px;
  padding: 24px;
  color: #fff;
  background: linear-gradient(135deg, #0f766e, #0891b2 54%, #2563eb);
  box-shadow: 0 20px 45px rgba(8, 145, 178, 0.18);
  transition: transform 0.2s ease;
}

.category-tile strong,
.category-overview-card h2 {
  margin: 0;
  font-size: 24px;
}

.category-tile span,
.category-overview-card p,
.category-overview-card span {
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.65;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 20px;
  align-items: center;
  border-radius: 28px;
  padding: 24px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
}

.search-panel h2 {
  margin: 0 0 6px;
  font-size: 28px;
}

.search-panel p {
  margin: 0;
}

.search-controls {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 12px;
}

.site-search,
.filter-select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 0 16px;
  color: #0f172a;
  background: #f8fafc;
  outline: none;
}

.site-search:focus,
.filter-select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.16);
}

.empty-state {
  display: none;
  grid-column: 1 / -1;
  border-radius: 18px;
  padding: 14px 16px;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 800;
}

.empty-state.show {
  display: block;
}

.sub-hero,
.detail-hero {
  border-radius: 32px;
  padding: 54px;
  color: #fff;
  background: radial-gradient(circle at top right, rgba(45, 212, 191, 0.32), transparent 35%), linear-gradient(135deg, #07111f, #0f766e 58%, #2563eb);
  box-shadow: var(--shadow);
}

.sub-hero p {
  max-width: 820px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.35);
}

.detail-poster img {
  height: 470px;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fff;
}

.detail-one-line {
  margin: 18px 0 18px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
  line-height: 1.8;
}

.detail-meta span,
.detail-tag {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
}

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

.player-section {
  border-radius: 30px;
  padding: 18px;
  background: #07111f;
  box-shadow: var(--shadow);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
  cursor: pointer;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.24), rgba(0, 0, 0, 0.66));
  font-size: 18px;
  font-weight: 900;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #0f766e;
  background: #fff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.content-card {
  border-radius: 26px;
  padding: 28px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.content-card p {
  margin: 0;
  font-size: 17px;
}

.center-action {
  margin-top: 24px;
  text-align: center;
}

.site-footer {
  margin-top: 60px;
  color: rgba(255, 255, 255, 0.78);
  background: #07111f;
}

.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 42px;
  padding: 48px 0 34px;
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: #fff;
}

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

.footer-links a {
  border-radius: 999px;
  padding: 8px 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 18px 16px 24px;
  text-align: center;
}

[data-movie-card].hidden-by-filter {
  display: none;
}

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

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

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

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

  .search-panel,
  .detail-hero,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    max-width: 340px;
  }
}

@media (max-width: 720px) {
  body {
    background: linear-gradient(180deg, #07111f 0%, #0b1727 360px, #f2f6fb 361px, #eef4f8 100%);
  }

  .header-inner {
    width: min(100% - 22px, 1280px);
    height: 64px;
  }

  main {
    width: min(100% - 22px, 1280px);
  }

  .logo {
    font-size: 19px;
  }

  .hero-carousel {
    min-height: 560px;
    border-radius: 24px;
  }

  .hero-content {
    width: calc(100% - 34px);
    padding: 56px 0 70px 20px;
  }

  .hero-content p,
  .sub-hero p,
  .detail-one-line {
    font-size: 16px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-section a {
    flex: 1 1 calc(50% - 8px);
    text-align: center;
  }

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

  .poster-wrap {
    height: 238px;
  }

  .movie-body {
    padding: 13px;
  }

  .movie-body h3 {
    font-size: 16px;
  }

  .movie-desc {
    min-height: auto;
  }

  .search-panel,
  .sub-hero,
  .detail-hero,
  .content-card {
    border-radius: 22px;
    padding: 22px;
  }

  .search-controls {
    grid-template-columns: 1fr;
  }

  .detail-poster img {
    height: 380px;
  }

  .footer-grid {
    width: min(100% - 22px, 1280px);
  }
}

@media (max-width: 430px) {
  .movie-grid,
  .library-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .poster-wrap {
    height: 360px;
  }
}
