:root {
  --bg: #0a0e1a;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-strong: rgba(15, 20, 32, 0.82);
  --line: rgba(255, 255, 255, 0.12);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --soft: #6b7280;
  --cyan: #06b6d4;
  --blue: #2563eb;
  --teal: #14b8a6;
  --radius: 18px;
  --shadow: 0 25px 80px rgba(0, 0, 0, 0.36);
}

html {
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 10% -10%, rgba(6, 182, 212, 0.18), transparent 32rem),
    radial-gradient(circle at 90% 10%, rgba(37, 99, 235, 0.16), transparent 34rem),
    var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 14, 26, 0.78);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue), var(--teal));
  box-shadow: 0 15px 30px rgba(6, 182, 212, 0.26);
}

.brand-text {
  font-size: 20px;
  background: linear-gradient(90deg, #67e8f9, #60a5fa, #5eead4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.dropdown-panel a,
.mobile-panel a {
  color: var(--muted);
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.dropdown-panel a:hover,
.mobile-panel a:hover {
  color: #67e8f9;
}

.nav-dropdown {
  position: relative;
}

.dropdown-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.dropdown-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 12px);
  width: 190px;
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 20, 32, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
}

.dropdown-panel a:hover {
  background: rgba(255, 255, 255, 0.06);
}

.header-search,
.mobile-search,
.inline-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.inline-search input,
.filter-panel input {
  min-width: 0;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  outline: 0;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 220px;
  padding: 10px 12px;
}

.header-search button,
.mobile-search button {
  border: 0;
  color: white;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.header-search input:focus,
.mobile-search input:focus,
.inline-search input:focus,
.filter-panel input:focus {
  border-color: rgba(103, 232, 249, 0.72);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: var(--text);
}

.mobile-panel {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0 20px;
  border-top: 1px solid var(--line);
}

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

.mobile-panel nav {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.mobile-search input {
  flex: 1;
  padding: 12px;
}

.hero-slider {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #060914;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 14, 26, 0.92), rgba(10, 14, 26, 0.46), rgba(10, 14, 26, 0.16)),
    linear-gradient(0deg, #0a0e1a 0%, rgba(10, 14, 26, 0.1) 46%, rgba(10, 14, 26, 0.55) 100%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 12%;
  width: min(1280px, calc(100% - 32px));
  transform: translateX(-50%);
}

.hero-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  color: #67e8f9;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  max-width: 820px;
  margin: 16px 0 18px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.02;
  font-weight: 900;
  color: white;
  text-shadow: 0 18px 40px rgba(0, 0, 0, 0.46);
}

.hero-content p,
.page-hero p,
.detail-one-line {
  max-width: 720px;
  color: #d1d5db;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  color: #cffafe;
  border: 1px solid rgba(103, 232, 249, 0.22);
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.12);
}

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

.btn-primary,
.btn-ghost,
.section-more,
.text-link,
.rank-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border 0.2s ease, background 0.2s ease;
}

.btn-primary {
  color: white;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 40px rgba(6, 182, 212, 0.25);
}

.btn-primary:hover,
.btn-ghost:hover,
.section-more:hover,
.rank-action:hover {
  transform: translateY(-2px);
}

.btn-ghost,
.section-more,
.text-link,
.rank-action {
  color: #a5f3fc;
  border: 1px solid rgba(103, 232, 249, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100% - 1280px) / 2));
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 2;
}

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

.hero-dot.active {
  width: 36px;
  background: #67e8f9;
}

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

.top-space {
  padding-top: 42px;
}

.section-block {
  margin-top: 64px;
}

.section-block:first-child {
  margin-top: 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.2;
  font-weight: 900;
  color: white;
}

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

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

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

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

.glass-effect {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(14px);
}

.card-hover {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border 0.25s ease;
}

.card-hover:hover {
  transform: translateY(-6px);
  border-color: rgba(103, 232, 249, 0.42);
  box-shadow: 0 24px 70px rgba(6, 182, 212, 0.16);
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}

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

.movie-card:hover .card-cover img,
.category-card:hover img,
.small-card:hover img {
  transform: scale(1.06);
}

.card-year,
.card-type {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 5px 9px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  border-radius: 999px;
  background: rgba(10, 14, 26, 0.72);
  backdrop-filter: blur(10px);
}

.card-year {
  left: 12px;
}

.card-type {
  right: 12px;
}

.card-body {
  padding: 18px;
}

.card-title {
  margin: 0 0 10px;
  color: white;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 800;
}

.card-title a:hover,
.rank-info h3 a:hover,
.footer-links a:hover,
.breadcrumb a:hover {
  color: #67e8f9;
}

.card-desc {
  min-height: 3.2em;
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.card-meta span:last-child {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: stretch;
}

.split-copy,
.page-hero,
.detail-content {
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
}

.split-copy p,
.detail-content p {
  color: #d1d5db;
  line-height: 1.85;
}

.inline-search {
  margin-top: 24px;
}

.inline-search.wide {
  max-width: 760px;
}

.inline-search input {
  flex: 1;
  padding: 13px 14px;
}

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

.small-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  overflow: hidden;
  border-radius: 16px;
  padding: 10px;
}

.small-card img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.35s ease;
}

.small-card span {
  color: white;
  font-weight: 800;
  line-height: 1.4;
}

.small-card em {
  color: #67e8f9;
  font-style: normal;
  font-weight: 800;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border-radius: var(--radius);
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  opacity: 0.5;
  transition: transform 0.4s ease;
}

.category-card div {
  position: absolute;
  inset: auto 0 0 0;
  padding: 24px;
  background: linear-gradient(0deg, rgba(10, 14, 26, 0.95), transparent);
}

.category-card h3,
.category-overview h2 {
  margin: 0 0 10px;
  color: white;
  font-size: 24px;
  font-weight: 900;
}

.category-card p,
.category-overview p {
  margin: 0;
  color: #d1d5db;
  line-height: 1.7;
}

.category-overview {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 18px;
}

.category-mosaic {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.category-mosaic img {
  width: 100%;
  height: 94px;
  object-fit: cover;
  border-radius: 10px;
}

.text-link {
  margin-top: 18px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 64px 132px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 16px;
}

.rank-num {
  color: #67e8f9;
  font-size: 26px;
  font-weight: 900;
  text-align: center;
}

.rank-thumb img {
  width: 132px;
  height: 74px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-info h3 {
  margin: 0 0 8px;
  color: white;
  font-size: 18px;
  font-weight: 900;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--soft);
  font-size: 13px;
}

.page-hero {
  position: relative;
  overflow: hidden;
}

.page-hero:before,
.detail-hero:before {
  content: "";
  position: absolute;
  inset: -50% auto auto -10%;
  width: 420px;
  height: 420px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.18);
  filter: blur(30px);
  pointer-events: none;
}

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

.filter-panel {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.filter-panel input {
  width: min(640px, 100%);
  padding: 13px 14px;
}

.type-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-button {
  min-height: 36px;
  padding: 7px 14px;
  cursor: pointer;
  color: #cffafe;
  border: 1px solid rgba(103, 232, 249, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.filter-button.active {
  color: white;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.movie-card.hidden-card {
  display: none;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
}

.breadcrumb strong {
  color: white;
}

.detail-main {
  max-width: 1180px;
}

.detail-hero {
  position: relative;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 34px;
  overflow: hidden;
  border-radius: 24px;
  padding: 26px;
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
}

.detail-info {
  position: relative;
  z-index: 1;
  align-self: center;
}

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

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

.player-section {
  margin-top: 46px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #020617;
  box-shadow: var(--shadow);
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  color: white;
  cursor: pointer;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.16));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-wrap.is-playing .play-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-icon {
  width: 76px;
  height: 76px;
  display: block;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 50px rgba(6, 182, 212, 0.4);
  position: relative;
}

.play-icon:after {
  content: "";
  position: absolute;
  left: 31px;
  top: 23px;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 23px solid white;
}

.play-overlay strong {
  font-size: 20px;
}

.detail-content {
  margin-top: 40px;
}

.detail-content h2 {
  margin: 0 0 14px;
  color: white;
  font-size: 26px;
  font-weight: 900;
}

.detail-content h2:not(:first-child) {
  margin-top: 30px;
}

.search-summary {
  margin-bottom: 20px;
  color: var(--muted);
  font-size: 18px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(15, 20, 32, 0.76);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.7fr);
  gap: 30px;
}

.footer-inner p {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.75;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  justify-content: flex-end;
  gap: 12px 18px;
  color: var(--muted);
}

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

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

  .split-section,
  .detail-hero {
    grid-template-columns: 1fr;
  }

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

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

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

  .hero-slider {
    min-height: 74vh;
  }

  .hero-content {
    bottom: 10%;
  }

  .hero-content h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: clamp(32px, 11vw, 46px);
  }

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

  .hero-dots {
    left: 16px;
    right: auto;
    bottom: 22px;
  }

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

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

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

  .rank-action {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .rank-thumb img {
    width: 96px;
    height: 64px;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .page-main,
  .footer-inner,
  .mobile-panel {
    width: min(100% - 24px, 1280px);
  }

  .brand-text {
    font-size: 18px;
  }

  .hero-actions,
  .inline-search,
  .mobile-search {
    align-items: stretch;
    flex-direction: column;
  }

  .btn-primary,
  .btn-ghost,
  .section-more,
  .text-link,
  .rank-action,
  .inline-search button,
  .mobile-search button {
    width: 100%;
  }

  .split-copy,
  .page-hero,
  .detail-content,
  .detail-hero {
    padding: 22px;
  }

  .detail-poster {
    max-width: none;
  }

  .small-card {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .small-card em {
    grid-column: 2;
  }
}
