:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.72);
  --border: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #fb923c;
  --accent-strong: #f97316;
  --gold: #fbbf24;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(249, 115, 22, 0.18), transparent 34rem),
    radial-gradient(circle at 90% 8%, rgba(59, 130, 246, 0.12), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

img {
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

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

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-strong), var(--gold));
  box-shadow: 0 0 26px rgba(249, 115, 22, 0.35);
  font-size: 13px;
}

.brand-name {
  white-space: nowrap;
  font-size: 20px;
  background: linear-gradient(90deg, #fb923c, #fde68a);
  -webkit-background-clip: text;
  color: transparent;
}

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

.nav-link {
  position: relative;
  color: var(--muted-strong);
  font-size: 14px;
  font-weight: 700;
  padding: 8px 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  transition: right 0.24s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
}

.nav-link:hover::after,
.nav-link.is-active::after {
  right: 0;
}

.nav-search {
  display: flex;
  align-items: center;
  width: 300px;
  max-width: 30vw;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  overflow: hidden;
}

.nav-search input,
.hero-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 11px 14px;
}

.nav-search input::placeholder,
.hero-search input::placeholder,
.filter-panel input::placeholder {
  color: #94a3b8;
}

.nav-search button,
.hero-search button,
.primary-button,
.secondary-button,
.filter-panel button,
.player-overlay,
.nav-toggle {
  border: 0;
  cursor: pointer;
  font-weight: 800;
}

.nav-search button {
  padding: 10px 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-strong), var(--gold));
}

.nav-toggle {
  display: none;
  margin-left: auto;
  color: #fff;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.16);
}

.hero-slider {
  position: relative;
  min-height: 74vh;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

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

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

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

.hero-slide img.image-hidden {
  visibility: hidden;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 38%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.06) 52%);
  z-index: 1;
}

.hero-content {
  position: absolute;
  z-index: 2;
  left: max(32px, calc((100vw - 1180px) / 2));
  bottom: 12%;
  width: min(760px, calc(100% - 64px));
}

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  text-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
}

.hero-content p {
  color: #e2e8f0;
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.8;
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-meta,
.detail-meta,
.movie-meta,
.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}

.hero-meta {
  margin-bottom: 18px;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-strong), var(--gold));
  box-shadow: 0 16px 42px rgba(249, 115, 22, 0.28);
}

.secondary-button {
  color: #fff;
  border: 1px solid rgba(248, 250, 252, 0.18);
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(14px);
}

.primary-button:hover,
.secondary-button:hover,
.movie-card:hover,
.category-card:hover,
.horizontal-card:hover,
.rank-row:hover {
  transform: translateY(-3px);
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 38px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

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

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

.main-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 72px;
}

.content-section {
  margin-top: 58px;
}

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

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

.section-head h2,
.page-hero h1,
.detail-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.section-more {
  color: var(--accent);
  font-weight: 900;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.76), rgba(15, 23, 42, 0.82));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  border-color: rgba(251, 146, 60, 0.68);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
}

.movie-card-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background:
    radial-gradient(circle at 24% 18%, rgba(251, 146, 60, 0.35), transparent 40%),
    linear-gradient(135deg, #111827, #020617);
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.36s ease, opacity 0.24s ease;
}

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

.cover-img.image-hidden {
  visibility: hidden;
}

.poster-shine {
  position: absolute;
  inset: auto 0 0;
  height: 58%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), transparent);
}

.card-badge,
.rank-num,
.score-pill {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  background: rgba(249, 115, 22, 0.88);
  backdrop-filter: blur(12px);
}

.card-badge {
  top: 12px;
  left: 12px;
  padding: 6px 10px;
}

.rank-num {
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent-strong), var(--gold));
}

.play-float {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(2, 6, 23, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.26);
  transform: translate(-50%, -50%) scale(0.84);
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.movie-card:hover .play-float {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

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

.movie-card h3,
.horizontal-card h3,
.rank-row h3,
.related-card h3 {
  margin: 0;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
}

.movie-one-line,
.horizontal-card p,
.rank-row p,
.detail-copy p,
.page-hero p,
.category-card p,
.result-card p {
  color: var(--muted);
  line-height: 1.75;
}

.movie-one-line {
  min-height: 50px;
  margin: 9px 0 12px;
  font-size: 14px;
}

.tag-row,
.info-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag-link,
.info-tags span,
.hero-tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(251, 146, 60, 0.22);
  font-size: 12px;
  font-weight: 800;
}

.hero-tag {
  margin-right: 8px;
  margin-bottom: 8px;
}

.horizontal-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 2px 2px 18px;
  scrollbar-width: thin;
}

.horizontal-card {
  flex: 0 0 320px;
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.66);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.horizontal-card:hover {
  border-color: rgba(251, 146, 60, 0.56);
}

.horizontal-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  background: linear-gradient(135deg, #111827, #020617);
}

.horizontal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.horizontal-thumb span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(2, 6, 23, 0.28);
}

.feature-band,
.filter-panel,
.info-panel,
.player-panel,
.detail-copy,
.related-block,
.rank-board {
  border: 1px solid var(--border);
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(30, 41, 59, 0.58));
  box-shadow: var(--shadow);
}

.feature-band {
  padding: 30px;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
}

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

.page-hero {
  padding: 52px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background:
    radial-gradient(circle at 14% 16%, rgba(249, 115, 22, 0.25), transparent 36%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.86));
  box-shadow: var(--shadow);
}

.hero-search {
  display: grid;
  grid-template-columns: 1fr auto;
  width: min(620px, 100%);
  margin-top: 26px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.52);
  overflow: hidden;
}

.hero-search button {
  padding: 0 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-strong), var(--gold));
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 170px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 22px;
  border: 1px solid var(--border);
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.26)),
    var(--cover),
    linear-gradient(135deg, #111827, #020617);
  background-size: cover;
  background-position: center;
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
  border-color: rgba(251, 146, 60, 0.56);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 900;
}

.filter-panel {
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(140px, 0.5fr)) auto;
  gap: 12px;
  margin: 30px 0;
}

.filter-panel input,
.filter-panel select {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.38);
}

.filter-panel button {
  padding: 0 18px;
  border-radius: 14px;
  color: #fff;
  background: rgba(249, 115, 22, 0.18);
}

.empty-state {
  display: none;
  padding: 26px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(148, 163, 184, 0.25);
  border-radius: 18px;
}

.empty-state.is-visible {
  display: block;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 30px;
  align-items: start;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a {
  color: #fed7aa;
}

.player-panel {
  overflow: hidden;
  margin-bottom: 28px;
}

.player-stage {
  position: relative;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(2, 6, 23, 0.34);
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-overlay img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.54;
}

.player-overlay::after {
  content: "▶";
  z-index: 2;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-strong), var(--gold));
  box-shadow: 0 18px 50px rgba(249, 115, 22, 0.42);
  font-size: 28px;
}

.player-caption {
  padding: 18px 22px;
  color: var(--muted-strong);
}

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

.detail-copy h2,
.info-panel h2,
.related-block h2 {
  margin: 0 0 16px;
  font-size: 26px;
  font-weight: 900;
}

.detail-copy p {
  margin: 0 0 16px;
  font-size: 16px;
}

.detail-side {
  position: sticky;
  top: 92px;
}

.info-panel {
  overflow: hidden;
}

.detail-cover {
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, #111827, #020617);
}

.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.info-body {
  padding: 22px;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--muted);
}

.info-list strong {
  color: #fff;
}

.related-block {
  padding: 26px;
  margin-top: 30px;
}

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

.rank-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.rank-board {
  padding: 22px;
}

.rank-board h2 {
  margin: 0 0 18px;
  font-size: 24px;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px 82px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  transition: transform 0.24s ease, background 0.24s ease;
}

.rank-row:hover {
  background: rgba(148, 163, 184, 0.08);
}

.rank-index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(249, 115, 22, 0.2);
  font-weight: 900;
}

.rank-thumb {
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #020617);
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.score-text {
  color: #facc15;
  font-weight: 900;
}

.pagination-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.pagination-links a {
  padding: 11px 15px;
  border-radius: 999px;
  color: #fed7aa;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(251, 146, 60, 0.2);
  font-weight: 800;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.82);
}

.footer-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0;
  color: var(--muted);
  text-align: center;
}

.footer-brand {
  justify-content: center;
  color: #fff;
  font-size: 20px;
  margin-bottom: 14px;
}

.footer-shell p {
  max-width: 760px;
  margin: 0 auto 16px;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin: 20px 0;
}

.footer-links a {
  color: #fed7aa;
  font-weight: 800;
}

.copyright {
  color: #64748b;
  font-size: 13px;
}

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

  .filter-panel,
  .feature-grid,
  .detail-layout,
  .rank-layout {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }
}

@media (max-width: 820px) {
  .nav-shell {
    flex-wrap: wrap;
    padding: 12px 0;
  }

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

  .nav-links {
    order: 3;
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 10px 0;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-search {
    order: 4;
    width: 100%;
    max-width: none;
  }

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

  .hero-content {
    left: 18px;
    bottom: 88px;
    width: calc(100% - 36px);
  }

  .hero-dots {
    left: 18px;
    right: auto;
  }

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

  .page-hero {
    padding: 32px 22px;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .brand-name {
    font-size: 17px;
  }

  .main-shell {
    width: min(100% - 22px, 1180px);
    padding-top: 32px;
  }

  .hero-actions,
  .detail-actions,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }

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

  .horizontal-card {
    flex-basis: 280px;
    grid-template-columns: 1fr;
  }

  .hero-search {
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

  .hero-search button {
    min-height: 44px;
  }
}
