:root {
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #1e293b;
  --panel-hover: #26344a;
  --line: #1e293b;
  --text: #ffffff;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --faint: #64748b;
  --ocean: #0ea5e9;
  --ocean-dark: #0284c7;
  --ocean-soft: rgba(14, 165, 233, 0.16);
  --amber-soft: rgba(245, 158, 11, 0.12);
  --shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.45);
  --radius-sm: 0.5rem;
  --radius: 0.75rem;
  --radius-lg: 1rem;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(14, 165, 233, 0.14), transparent 32rem),
    radial-gradient(circle at 90% 16rem, rgba(56, 189, 248, 0.08), transparent 30rem),
    var(--bg);
  color: var(--text);
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(30, 41, 59, 0.9);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.header-inner {
  width: min(100%, 80rem);
  height: 4rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
}

.brand-icon {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 0.75rem;
  background: var(--ocean);
  box-shadow: 0 16px 34px rgba(14, 165, 233, 0.24);
}

.brand-icon svg {
  width: 1.45rem;
  height: 1.45rem;
  fill: none;
  stroke: white;
  stroke-width: 1.8;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  margin-top: 0.12rem;
  color: var(--subtle);
  font-size: 0.75rem;
}

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

.nav-link,
.mobile-link {
  color: #cbd5e1;
  border-radius: 0.55rem;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.nav-link {
  padding: 0.5rem 0.85rem;
  font-size: 0.92rem;
  font-weight: 650;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: white;
  background: var(--ocean-dark);
}

.header-search,
.mobile-search,
.search-page-form {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.header-search {
  flex: 0 1 18rem;
}

.header-search input,
.mobile-search input,
.search-page-form input,
.card-search {
  width: 100%;
  border: 1px solid #334155;
  outline: none;
  color: white;
  background: rgba(2, 6, 23, 0.55);
  border-radius: 0.65rem;
  padding: 0.6rem 0.8rem;
  transition: border 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.search-page-form input:focus,
.card-search:focus {
  border-color: var(--ocean);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
  background: rgba(2, 6, 23, 0.86);
}

.header-search button,
.mobile-search button,
.search-page-form button {
  border: 0;
  color: white;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 0.65rem;
  padding: 0.6rem 0.85rem;
  background: var(--ocean);
  transition: background 0.18s ease, transform 0.18s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.search-page-form button:hover {
  background: var(--ocean-dark);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 0.65rem;
  background: #1e293b;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.28rem;
}

.menu-toggle span {
  width: 1.2rem;
  height: 2px;
  border-radius: 999px;
  background: #e2e8f0;
}

.mobile-panel {
  display: none;
  border-top: 1px solid #1e293b;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.98);
}

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

.mobile-search {
  margin-bottom: 0.85rem;
}

.mobile-nav {
  display: grid;
  gap: 0.35rem;
}

.mobile-link {
  display: block;
  padding: 0.7rem 0.8rem;
  font-weight: 650;
}

.hero {
  position: relative;
  height: 60vh;
  min-height: 500px;
  overflow: hidden;
  background: #020617;
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.06));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100%, 80rem);
  height: 100%;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: center;
  flex-direction: column;
  max-width: 80rem;
}

.hero-content > * {
  max-width: 42rem;
}

.hero-kicker {
  display: inline-flex;
  width: max-content;
  margin-bottom: 1rem;
  color: white;
  background: var(--ocean-dark);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 750;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 1rem 0 0;
  color: #cbd5e1;
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  line-height: 1.75;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  color: var(--subtle);
  margin-top: 1rem;
  font-size: 0.93rem;
}

.hero-meta span:not(:last-child)::after,
.detail-meta span:not(:last-child)::after {
  content: "•";
  margin-left: 0.85rem;
  color: #475569;
}

.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.hero-tags {
  margin-top: 1rem;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.32rem 0.68rem;
  font-size: 0.78rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.button-primary,
.button-ghost,
.section-more,
.detail-rank-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 0.7rem;
  font-weight: 750;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border 0.18s ease;
}

.button-primary {
  padding: 0.9rem 1.65rem;
  color: white;
  background: var(--ocean);
}

.button-primary:hover,
.detail-rank-link:hover {
  background: var(--ocean-dark);
  transform: translateY(-1px) scale(1.02);
}

.button-primary svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: currentColor;
}

.button-ghost {
  padding: 0.86rem 1.35rem;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.button-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background 0.18s ease, transform 0.18s ease;
  backdrop-filter: blur(10px);
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.04);
}

.hero-prev {
  left: 1rem;
}

.hero-next {
  right: 1rem;
}

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

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

.hero-dot.is-active {
  width: 2rem;
  background: white;
}

.hero-category-bar {
  position: absolute;
  z-index: 4;
  right: max(1rem, calc((100vw - 80rem) / 2 + 1rem));
  bottom: 1.45rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.hero-category-bar a {
  color: #e2e8f0;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.84rem;
  transition: background 0.18s ease, color 0.18s ease;
}

.hero-category-bar a:hover {
  color: white;
  background: var(--ocean-dark);
}

.page-shell {
  width: min(100%, 80rem);
  margin: 0 auto;
  padding: 3rem 1rem 4rem;
}

.home-shell {
  display: grid;
  gap: 4rem;
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 23rem;
  gap: 2rem;
}

.home-main {
  display: grid;
  gap: 4rem;
}

.home-sidebar,
.detail-side {
  min-width: 0;
}

.content-section {
  display: grid;
  gap: 1.5rem;
}

.section-heading,
.side-heading,
.toolbar-panel,
.detail-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.section-heading h2,
.side-heading h2,
.toolbar-panel h2 {
  margin: 0;
  color: white;
  font-size: clamp(1.55rem, 2.4vw, 2rem);
}

.section-heading p,
.toolbar-panel p {
  margin: 0.35rem 0 0;
  color: var(--subtle);
  line-height: 1.7;
}

.section-more,
.detail-rank-link {
  color: white;
  background: rgba(14, 165, 233, 0.16);
  border: 1px solid rgba(14, 165, 233, 0.28);
  padding: 0.65rem 0.9rem;
  white-space: nowrap;
}

.section-more:hover {
  color: white;
  background: var(--ocean-dark);
  border-color: var(--ocean-dark);
}

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

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

.movie-card,
.movie-card-large,
.movie-card-horizontal,
.rank-item {
  min-width: 0;
}

.card-link,
.horizontal-link,
.rank-link {
  color: inherit;
  height: 100%;
}

.card-link {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
  border-radius: var(--radius);
  background: var(--panel-soft);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.movie-card-large .card-link {
  border-radius: var(--radius-lg);
}

.card-link:hover {
  background: var(--panel-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.poster-wrap,
.horizontal-poster,
.rank-poster {
  position: relative;
  display: block;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(15, 23, 42, 0.4)),
    #0f172a;
}

.poster-wrap {
  aspect-ratio: 16 / 9;
}

.poster-wrap img,
.horizontal-poster img,
.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease, opacity 0.18s ease;
}

.card-link:hover img,
.horizontal-link:hover img,
.rank-link:hover img {
  transform: scale(1.08);
}

img.is-missing {
  opacity: 0;
}

.poster-mask,
.poster-gradient {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
  transition: background 0.18s ease;
}

.poster-gradient {
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.04));
}

.card-link:hover .poster-mask {
  background: rgba(0, 0, 0, 0.22);
}

.card-type {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  display: inline-flex;
  align-items: center;
  color: white;
  background: rgba(15, 23, 42, 0.82);
  border-radius: 0.35rem;
  padding: 0.3rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.play-badge,
.horizontal-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.9);
  transform: translate(-50%, -50%);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.play-badge {
  width: 3.5rem;
  height: 3.5rem;
}

.movie-card-large .play-badge {
  opacity: 0;
  width: 4rem;
  height: 4rem;
}

.card-link:hover .play-badge,
.horizontal-link:hover .horizontal-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.08);
}

.play-badge svg,
.horizontal-play svg {
  width: 46%;
  height: 46%;
  fill: white;
  margin-left: 0.12rem;
}

.poster-title {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  color: white;
  font-size: 1.1rem;
  line-height: 1.35;
  font-weight: 800;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-body {
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem;
  flex: 1;
}

.movie-card-large .card-body {
  padding: 1rem;
}

.card-body strong,
.horizontal-body strong,
.rank-body strong {
  color: white;
  line-height: 1.45;
  transition: color 0.18s ease;
}

.card-body strong {
  min-height: 2.8em;
  font-size: 0.95rem;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.movie-card-large .card-body strong {
  min-height: 0;
  font-size: 1rem;
}

.card-link:hover strong,
.horizontal-link:hover strong,
.rank-link:hover strong {
  color: #38bdf8;
}

.card-desc {
  color: var(--subtle);
  font-size: 0.9rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.card-tags span {
  padding: 0.2rem 0.48rem;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
  font-size: 0.72rem;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--faint);
  font-size: 0.78rem;
}

.card-meta em {
  font-style: normal;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side-panel,
.toolbar-panel,
.detail-card,
.search-panel {
  border: 1px solid rgba(30, 41, 59, 0.85);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
}

.side-panel {
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.side-heading h2 {
  font-size: 1.35rem;
}

.side-heading a {
  color: #38bdf8;
  font-size: 0.9rem;
}

.side-list {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
}

.horizontal-link {
  display: flex;
  gap: 0.9rem;
  overflow: hidden;
  border-radius: 0.7rem;
  background: #1e293b;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.horizontal-link:hover {
  background: var(--panel-hover);
  box-shadow: var(--shadow);
}

.horizontal-poster {
  width: 9.5rem;
  flex: 0 0 9.5rem;
  aspect-ratio: 16 / 9;
}

.horizontal-play {
  width: 2.7rem;
  height: 2.7rem;
}

.horizontal-body {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 0.3rem;
  padding: 0.75rem 0.75rem 0.75rem 0;
}

.horizontal-body strong,
.horizontal-body span,
.horizontal-body em {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

.horizontal-body strong {
  font-size: 0.92rem;
  -webkit-line-clamp: 1;
}

.horizontal-body span {
  color: var(--subtle);
  font-size: 0.78rem;
  line-height: 1.5;
  -webkit-line-clamp: 2;
}

.horizontal-body em {
  color: var(--faint);
  font-size: 0.75rem;
  font-style: normal;
  -webkit-line-clamp: 1;
}

.year-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.year-cloud a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.2rem;
  color: #e2e8f0;
  background: #1e293b;
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.year-cloud a:hover {
  color: white;
  background: var(--ocean-dark);
  transform: translateY(-1px);
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
  border-radius: 1.25rem;
  border: 1px solid rgba(14, 165, 233, 0.18);
  background:
    linear-gradient(120deg, rgba(14, 165, 233, 0.16), rgba(15, 23, 42, 0.88)),
    #0f172a;
  padding: clamp(2rem, 5vw, 4rem);
  box-shadow: var(--shadow);
}

.page-hero span {
  display: inline-flex;
  color: #7dd3fc;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.18);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-weight: 750;
  font-size: 0.9rem;
}

.page-hero h1 {
  margin: 1rem 0 0;
  color: white;
  font-size: clamp(2.1rem, 6vw, 3.8rem);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 44rem;
  margin: 0.75rem 0 0;
  color: #cbd5e1;
  line-height: 1.8;
  font-size: 1.05rem;
}

.toolbar-panel {
  margin-bottom: 1.5rem;
  padding: 1.2rem;
}

.card-search {
  max-width: 21rem;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2.4rem;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  min-width: 2.35rem;
  height: 2.35rem;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  border: 1px solid #334155;
  border-radius: 0.6rem;
  background: #0f172a;
  padding: 0 0.75rem;
}

.pagination a:hover,
.pagination a.is-current {
  color: white;
  border-color: var(--ocean-dark);
  background: var(--ocean-dark);
}

.pagination span {
  opacity: 0.45;
}

.page-numbers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}

.rank-list {
  display: grid;
  gap: 0.75rem;
}

.rank-link {
  display: grid;
  grid-template-columns: 3.2rem 10rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: 6.3rem;
  border: 1px solid rgba(30, 41, 59, 0.9);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.86);
  overflow: hidden;
  padding: 0.75rem;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.rank-link:hover {
  background: var(--panel-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  color: white;
  border-radius: 999px;
  background: var(--ocean-dark);
  font-size: 1rem;
  font-weight: 850;
}

.rank-poster {
  width: 10rem;
  aspect-ratio: 16 / 9;
  border-radius: 0.55rem;
}

.rank-body {
  min-width: 0;
  display: grid;
  gap: 0.3rem;
}

.rank-body strong {
  font-size: 1.05rem;
}

.rank-body em,
.rank-body span {
  color: var(--subtle);
  font-size: 0.9rem;
  font-style: normal;
  line-height: 1.55;
}

.rank-body span {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.rank-action {
  color: white;
  border-radius: 0.6rem;
  background: rgba(14, 165, 233, 0.16);
  padding: 0.55rem 0.8rem;
  font-weight: 750;
}

.search-panel {
  padding: 1.25rem;
}

.search-page-form {
  align-items: stretch;
}

.search-page-form input {
  min-height: 3rem;
}

.search-page-form button {
  padding-inline: 1.35rem;
}

.search-results {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

.search-empty {
  margin: 0;
  color: var(--subtle);
}

.detail-shell {
  padding-top: 2rem;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 23rem;
  gap: 2rem;
}

.detail-main {
  min-width: 0;
  display: grid;
  gap: 1.5rem;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: black;
  box-shadow: var(--shadow);
}

.video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: black;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.42);
  transition: opacity 0.18s ease, visibility 0.18s ease, background 0.18s ease;
}

.player-overlay:hover {
  background: rgba(0, 0, 0, 0.32);
}

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

.player-overlay span {
  display: grid;
  place-items: center;
  width: 5rem;
  height: 5rem;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.9);
  box-shadow: 0 18px 50px rgba(14, 165, 233, 0.32);
  transition: transform 0.18s ease;
}

.player-overlay:hover span {
  transform: scale(1.06);
}

.player-overlay svg {
  width: 2.2rem;
  height: 2.2rem;
  fill: white;
  margin-left: 0.2rem;
}

.player-message {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: none;
  color: #fecaca;
  background: rgba(127, 29, 29, 0.75);
  border-radius: 0.55rem;
  padding: 0.65rem 0.8rem;
}

.player-message.is-visible {
  display: block;
}

.detail-card {
  padding: clamp(1.2rem, 3vw, 2rem);
}

.detail-title-row {
  align-items: flex-start;
}

.detail-title-row h1 {
  margin: 0;
  color: white;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.22;
  letter-spacing: -0.03em;
}

.detail-tags {
  margin-top: 1.1rem;
}

.text-block {
  margin-top: 1.6rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.text-block h2 {
  margin: 0 0 0.7rem;
  font-size: 1.25rem;
}

.text-block p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
  white-space: pre-line;
}

.sticky-panel {
  position: sticky;
  top: 5.5rem;
}

.site-footer {
  border-top: 1px solid #1e293b;
  background: rgba(15, 23, 42, 0.72);
}

.footer-inner {
  width: min(100%, 80rem);
  margin: 0 auto;
  padding: 2rem 1rem;
  display: grid;
  gap: 1rem;
  justify-items: center;
  text-align: center;
}

.footer-brand {
  color: white;
  font-size: 1.15rem;
  font-weight: 850;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
}

.footer-links a {
  color: #cbd5e1;
  transition: color 0.18s ease;
}

.footer-links a:hover {
  color: #38bdf8;
}

.footer-inner p {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
}

.is-hidden-card {
  display: none !important;
}

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

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

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

  .home-sidebar,
  .detail-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .side-panel {
    margin-bottom: 0;
  }

  .sticky-panel {
    position: static;
  }
}

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

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

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

  .hero-category-bar {
    display: none;
  }

  .rank-link {
    grid-template-columns: 2.8rem 8rem minmax(0, 1fr);
  }

  .rank-action {
    display: none;
  }
}

@media (max-width: 680px) {
  .brand-title {
    font-size: 1rem;
  }

  .brand-subtitle {
    display: none;
  }

  .hero {
    height: auto;
    min-height: 520px;
  }

  .hero-content {
    padding: 5rem 1rem 6rem;
  }

  .hero-arrow {
    display: none;
  }

  .hero-dots {
    bottom: 1.15rem;
  }

  .section-heading,
  .toolbar-panel,
  .detail-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .card-search {
    max-width: none;
  }

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

  .home-sidebar,
  .detail-side {
    grid-template-columns: 1fr;
  }

  .horizontal-poster {
    width: 8rem;
    flex-basis: 8rem;
  }

  .rank-link {
    grid-template-columns: 2.6rem minmax(0, 1fr);
  }

  .rank-poster {
    display: none;
  }
}

@media (max-width: 460px) {
  .header-inner {
    padding: 0 0.75rem;
  }

  .brand-icon {
    width: 2.2rem;
    height: 2.2rem;
  }

  .page-shell {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

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

  .horizontal-poster {
    width: 7rem;
    flex-basis: 7rem;
  }

  .player-overlay span {
    width: 4rem;
    height: 4rem;
  }
}
