* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #1e293b;
  --line: rgba(148, 163, 184, 0.2);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --emerald: #34d399;
  --cyan: #22d3ee;
  --amber: #fbbf24;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(16, 185, 129, 0.16), transparent 34%),
    radial-gradient(circle at 85% 12%, rgba(34, 211, 238, 0.14), transparent 32%),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid rgba(51, 65, 85, 0.9);
  box-shadow: 0 12px 40px rgba(2, 6, 23, 0.45);
  backdrop-filter: blur(16px);
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  color: #04111f;
  box-shadow: 0 0 30px rgba(52, 211, 153, 0.35);
}

.brand-name {
  font-size: 1.24rem;
  background: linear-gradient(90deg, var(--emerald), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  color: var(--muted-strong);
  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(--emerald);
}

.header-search {
  width: 270px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.header-search input,
.mobile-search input,
.quick-search-form input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
}

.search-icon {
  color: var(--muted);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(51, 65, 85, 0.9);
}

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

.mobile-panel {
  padding: 0 16px 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mobile-search {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(51, 65, 85, 0.8);
}

.mobile-search button,
.quick-search-form button {
  border: 0;
  border-radius: 12px;
  color: #04111f;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  font-weight: 700;
  padding: 8px 14px;
}

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

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.86) 32%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.48), rgba(2, 6, 23, 0.88));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(680px, 100%);
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.28));
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--emerald);
  font-size: 0.92rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero h1,
.hero h2 {
  margin: 18px 0;
  font-size: clamp(2.6rem, 7vw, 5.7rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 680px;
  color: #dbeafe;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.hero-tags span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 13px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

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

.primary-btn {
  color: #04111f;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  box-shadow: 0 18px 50px rgba(52, 211, 153, 0.28);
}

.ghost-btn {
  color: var(--text);
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.48);
  font-size: 2.1rem;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

.hero-dot.is-active {
  width: 34px;
  background: var(--emerald);
}

.quick-search-card,
.section-block,
.page-hero {
  margin-top: 56px;
}

.quick-search-card {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 470px);
  gap: 24px;
  align-items: center;
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(14, 165, 233, 0.1));
  box-shadow: var(--shadow);
}

.quick-search-card h2,
.section-head h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  letter-spacing: -0.03em;
}

.quick-search-card p,
.page-hero p,
.detail-copy p,
.footer-grid p,
.category-tile p,
.category-overview-card p {
  color: var(--muted-strong);
}

.quick-search-form {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.quick-search-form input {
  padding: 10px 12px;
}

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

.section-head a {
  color: var(--emerald);
  font-weight: 700;
}

.section-head h2,
.page-hero h1,
.detail-copy h1 {
  font-size: clamp(1.9rem, 4vw, 3rem);
}

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

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

.movie-card {
  min-width: 0;
}

.poster-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.86);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.poster-link:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(52, 211, 153, 0.35);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

.compact .poster-frame {
  aspect-ratio: 16 / 10;
}

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

.poster-link:hover img {
  transform: scale(1.08);
  filter: saturate(1.08) brightness(0.82);
}

.poster-type {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #04111f;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  font-size: 0.76rem;
  font-weight: 800;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.22s ease, transform 0.22s ease;
  backdrop-filter: blur(6px);
}

.poster-link:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-card-body {
  padding: 14px;
}

.movie-card h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.poster-link:hover h3 {
  color: var(--emerald);
}

.movie-card p {
  min-height: 42px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.87rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  color: var(--muted);
  font-size: 0.78rem;
  justify-content: space-between;
}

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

.category-tile,
.category-overview-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.category-tile:hover,
.category-overview-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.35);
  background: linear-gradient(135deg, rgba(6, 95, 70, 0.78), rgba(14, 116, 144, 0.62));
}

.category-tile strong,
.category-overview-card strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 10px;
  color: var(--text);
  font-size: 1.22rem;
}

.category-tile p,
.category-overview-card p {
  position: relative;
  z-index: 1;
  margin: 0;
}

.category-glow {
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 100px;
  height: 100px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.14);
  filter: blur(6px);
}

.region-section,
.spotlight-section {
  padding: 28px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.58), rgba(15, 23, 42, 0.58));
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.region-grid {
  display: grid;
  gap: 28px;
}

.region-block h3 {
  margin: 0 0 14px;
  color: var(--emerald);
}

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

.page-shell {
  padding-bottom: 72px;
}

.page-hero {
  padding: 44px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 80% 10%, rgba(34, 211, 238, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.72));
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: var(--shadow);
}

.compact-hero {
  max-width: 980px;
}

.page-hero h1 {
  margin-top: 8px;
}

.small-actions {
  margin-top: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 190px 190px;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.filter-panel input,
.filter-panel select {
  min-height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.86);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.filter-panel select option {
  color: #0f172a;
}

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

.rank-card a {
  display: grid;
  grid-template-columns: auto 88px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.78);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.rank-card a:hover {
  transform: translateX(4px);
  border-color: rgba(52, 211, 153, 0.34);
  background: rgba(30, 41, 59, 0.92);
}

.rank-num {
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #04111f;
  background: linear-gradient(135deg, var(--amber), var(--emerald));
  font-weight: 900;
}

.rank-card img {
  width: 88px;
  height: 118px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.rank-card p {
  margin: 0 0 10px;
  color: var(--muted-strong);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-meta {
  color: var(--muted);
  font-size: 0.86rem;
}

.category-overview-card {
  display: grid;
  gap: 16px;
}

.category-overview-main {
  display: block;
}

.category-overview-links {
  display: grid;
  gap: 8px;
}

.category-overview-links a {
  color: var(--muted-strong);
  font-size: 0.92rem;
}

.category-overview-links a:hover {
  color: var(--emerald);
}

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

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.player-card,
.detail-copy,
.side-poster-card {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.84);
  box-shadow: var(--shadow);
}

.player-card {
  padding: 14px;
}

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

.movie-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--text);
  background: radial-gradient(circle, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.62));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  color: #04111f;
  font-size: 2rem;
  box-shadow: 0 20px 70px rgba(52, 211, 153, 0.38);
}

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

.detail-copy {
  margin-top: 22px;
  padding: 28px;
}

.detail-copy h1 {
  margin-bottom: 14px;
}

.detail-copy h2 {
  margin: 28px 0 10px;
  font-size: 1.35rem;
}

.detail-copy p {
  margin: 0;
  font-size: 1.03rem;
}

.tag-row {
  margin-top: 16px;
}

.side-poster-card {
  position: sticky;
  top: 90px;
  padding: 18px;
}

.side-poster-card img {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.side-poster-card h2 {
  margin: 18px 0 8px;
  font-size: 1.2rem;
}

.side-poster-card p {
  color: var(--muted-strong);
}

.full {
  width: 100%;
}

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

.site-footer {
  margin-top: 72px;
  padding: 46px 0 22px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), #020617);
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
}

.footer-grid h2 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 1rem;
}

.footer-grid a {
  display: block;
  margin: 8px 0;
  color: var(--muted-strong);
}

.footer-grid a:hover {
  color: var(--emerald);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--muted);
  font-size: 0.92rem;
}

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

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

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

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

  .side-poster-card {
    position: static;
  }
}

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

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

  .hero {
    min-height: 76vh;
  }

  .hero-copy {
    padding: 22px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-search-card,
  .footer-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

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

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

  .section-head,
  .footer-bottom {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .hero-content {
    align-items: end;
    padding-bottom: 54px;
  }

  .hero-copy {
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.72);
  }

  .hero-tags span,
  .detail-meta span,
  .tag-row span {
    font-size: 0.82rem;
  }

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

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

  .page-hero,
  .quick-search-card,
  .region-section,
  .spotlight-section,
  .detail-copy {
    padding: 22px;
    border-radius: 22px;
  }

  .rank-card a {
    grid-template-columns: auto 68px 1fr;
    gap: 10px;
  }

  .rank-card img {
    width: 68px;
    height: 92px;
  }

  .rank-num {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 0.86rem;
  }
}
