:root {
  --bg-deep: #020617;
  --bg-panel: #0f172a;
  --bg-soft: #111827;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-soft: #cbd5e1;
  --line: rgba(148, 163, 184, 0.18);
  --teal: #2dd4bf;
  --teal-strong: #14b8a6;
  --amber: #f59e0b;
  --card: rgba(15, 23, 42, 0.72);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg-deep);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 10% 0%, rgba(20, 184, 166, 0.18), transparent 30%),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
}

body.is-nav-open {
  overflow: hidden;
}

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

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

button,
input {
  font: inherit;
}

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

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

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

.brand-mark,
.footer-brand span {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #001f1d;
  background: linear-gradient(135deg, var(--teal), #99f6e4);
  box-shadow: 0 0 28px rgba(45, 212, 191, 0.34);
}

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

.nav-link,
.mobile-link {
  color: var(--text-soft);
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--teal);
}

.quick-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.56);
}

.quick-search input,
.mobile-search input,
.large-search input,
.search-line input {
  border: 0;
  outline: 0;
  color: var(--text-main);
  background: transparent;
}

.quick-search input {
  width: 132px;
  padding: 7px 4px 7px 10px;
}

.quick-search button,
.mobile-search button,
.large-search button,
.clear-search {
  border: 0;
  cursor: pointer;
  color: #042f2e;
  background: var(--teal);
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease;
}

.quick-search button {
  padding: 7px 14px;
}

.quick-search button:hover,
.mobile-search button:hover,
.large-search button:hover,
.clear-search:hover,
.primary-button:hover {
  transform: translateY(-1px);
  background: #5eead4;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 12px;
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.88);
}

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

.mobile-link {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.mobile-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 14px;
}

.mobile-search input {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.62);
}

.mobile-search button {
  padding: 0 18px;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 98px 0 56px;
}

.home-page {
  width: 100%;
  padding-top: 68px;
}

.hero-slider {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
  background: var(--bg-deep);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 0.7s ease, transform 1.1s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  max-width: 680px;
  padding-top: 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--teal);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-content h1,
.inner-hero h1,
.detail-article h1 {
  margin: 0 0 18px;
  color: #ffffff;
  font-weight: 900;
  line-height: 1.05;
}

.hero-content h1 {
  max-width: 760px;
  font-size: clamp(42px, 7vw, 76px);
}

.hero-content p {
  max-width: 640px;
  margin: 0 0 24px;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.8;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 28px;
}

.hero-meta span,
.detail-meta span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border: 1px solid rgba(45, 212, 191, 0.28);
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(15, 23, 42, 0.58);
}

.hero-actions,
.section-heading,
.category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 850;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #042f2e;
  background: var(--teal);
}

.ghost-button {
  color: var(--text-main);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
}

.ghost-button:hover {
  border-color: rgba(45, 212, 191, 0.6);
  transform: translateY(-1px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 3;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
}

.hero-controls button {
  cursor: pointer;
  border: 1px solid var(--line);
  color: var(--text-main);
  background: rgba(2, 6, 23, 0.62);
  backdrop-filter: blur(12px);
}

.hero-controls > button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 28px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 32px;
  height: 8px;
  padding: 0;
  border-radius: 999px;
}

.hero-dots button.is-active {
  background: var(--teal);
}

.home-search-block,
.inner-hero,
.search-panel,
.category-overview-card,
.aside-card,
.detail-article,
.site-footer {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.72));
  box-shadow: var(--shadow);
}

.home-search-block {
  width: min(1180px, calc(100% - 32px));
  margin: -54px auto 0;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 540px);
  gap: 26px;
  padding: 28px;
}

.home-search-block h2,
.section-heading h2,
.category-overview-head h2,
.aside-card h2,
.detail-article h2 {
  margin: 0;
  color: #ffffff;
}

.large-search,
.search-line {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
}

.large-search input,
.search-line input {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.72);
}

.large-search button,
.clear-search {
  min-height: 52px;
  padding: 0 20px;
}

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

.page-shell > .section-block,
.page-shell > .search-panel,
.page-shell > .category-overview-list {
  width: 100%;
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading a {
  color: var(--teal);
  font-weight: 800;
}

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

.movie-card {
  display: block;
  min-width: 0;
  border-radius: var(--radius-md);
  color: var(--text-main);
  outline: 0;
}

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

.poster-frame {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(20, 184, 166, 0.18), rgba(15, 23, 42, 0.9));
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.28);
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.74));
  transition: opacity 0.28s ease;
}

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

.year-badge,
.play-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(12px);
}

.year-badge {
  top: 12px;
  right: 12px;
  color: #ffffff;
}

.play-badge {
  left: 12px;
  bottom: 12px;
  color: #042f2e;
  background: rgba(45, 212, 191, 0.92);
  transform: translateY(8px);
  opacity: 0;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

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

.movie-card-body {
  display: block;
  padding: 13px 2px 0;
}

.movie-card-body strong {
  display: block;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.42;
  transition: color 0.22s ease;
}

.movie-card:hover .movie-card-body strong {
  color: var(--teal);
}

.movie-card-body small,
.movie-card-body em {
  display: block;
  margin-top: 5px;
  color: var(--text-muted);
  font-style: normal;
  line-height: 1.55;
}

.movie-card-body em {
  font-size: 13px;
}

.horizontal-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 220px);
  gap: 18px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(45, 212, 191, 0.75) rgba(15, 23, 42, 0.6);
}

.movie-card-compact .movie-card-body strong {
  font-size: 15px;
}

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

.category-tile {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at 100% 0%, rgba(45, 212, 191, 0.18), transparent 38%),
    rgba(15, 23, 42, 0.72);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  border-color: rgba(45, 212, 191, 0.48);
  transform: translateY(-3px);
}

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

.category-tile p,
.category-overview-head p,
.inner-hero p,
.aside-card p,
.detail-article p,
.site-footer p {
  color: var(--text-muted);
  line-height: 1.8;
}

.category-tile div,
.inline-links,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-tile span,
.inline-links a,
.footer-links a {
  color: var(--text-soft);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.5);
}

.inner-hero {
  padding: 42px;
  margin-bottom: 28px;
}

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

.search-panel {
  padding: 20px;
  margin-bottom: 32px;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.filter-chips button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(2, 6, 23, 0.5);
  cursor: pointer;
}

.filter-chips button.is-active,
.filter-chips button:hover {
  color: #042f2e;
  border-color: transparent;
  background: var(--teal);
}

.category-overview-list {
  display: grid;
  gap: 24px;
}

.category-overview-card {
  padding: 26px;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.small-rail {
  grid-auto-columns: minmax(150px, 170px);
  margin-top: 18px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 68px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.7);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.rank-row:hover {
  transform: translateY(-2px);
  border-color: rgba(45, 212, 191, 0.48);
}

.rank-number {
  color: var(--teal);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  width: 68px;
  height: 90px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.72);
}

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info strong {
  color: #ffffff;
  font-size: 17px;
}

.rank-info em {
  margin-top: 6px;
  color: var(--text-muted);
  font-style: normal;
}

.rank-score {
  color: #042f2e;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 850;
  background: var(--teal);
}

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

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

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

.player {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(45, 212, 191, 0.26);
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.player-button {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.14), rgba(2, 6, 23, 0.68));
  cursor: pointer;
  transition: opacity 0.25s ease;
}

.player-button span {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #042f2e;
  font-size: 30px;
  background: var(--teal);
  box-shadow: 0 0 42px rgba(45, 212, 191, 0.48);
}

.player.is-playing .player-button {
  opacity: 0;
  pointer-events: none;
}

.detail-article {
  margin-top: 26px;
  padding: 30px;
}

.detail-article h1 {
  font-size: clamp(32px, 5vw, 52px);
}

.detail-one-line {
  font-size: 18px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 28px;
}

.detail-article h2 {
  margin-top: 28px;
  margin-bottom: 12px;
  font-size: 24px;
}

.detail-aside {
  position: sticky;
  top: 90px;
  display: grid;
  gap: 18px;
}

.detail-poster {
  width: 100%;
  border-radius: 22px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.aside-card {
  padding: 22px;
}

.full-button {
  width: 100%;
}

.aside-nav {
  display: grid;
  gap: 10px;
}

.aside-nav a {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text-soft);
  background: rgba(15, 23, 42, 0.72);
}

.empty-state {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text-muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.72);
}

.site-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 70px auto 32px;
  padding: 34px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-bottom {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 1024px) {
  .quick-search {
    display: none;
  }

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

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

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

  .detail-aside {
    position: static;
    grid-template-columns: 220px 1fr;
  }
}

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

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

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

  .page-shell {
    width: min(100% - 24px, 1180px);
    padding-top: 88px;
  }

  .home-page {
    width: 100%;
    padding-top: 68px;
  }

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

  .hero-content {
    padding-top: 0;
  }

  .home-search-block,
  .large-search,
  .search-line,
  .footer-grid,
  .detail-aside {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .section-heading,
  .category-overview-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

  .rank-row {
    grid-template-columns: 42px 58px 1fr;
  }

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

  .inner-hero,
  .detail-article,
  .site-footer {
    padding: 24px;
  }
}

@media (max-width: 460px) {
  .brand-text {
    max-width: 9em;
    overflow: hidden;
    text-overflow: ellipsis;
  }

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

  .horizontal-rail {
    grid-auto-columns: minmax(160px, 76vw);
  }
}
