:root {
  --page: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #fff7ed;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --brand: #f97316;
  --brand-strong: #ef4444;
  --brand-soft: rgba(249, 115, 22, 0.12);
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.11);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--page);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 10% 8%, rgba(249, 115, 22, 0.16), transparent 28%),
    radial-gradient(circle at 90% 12%, rgba(239, 68, 68, 0.14), transparent 26%),
    linear-gradient(180deg, #fff7ed 0%, #f8fafc 34%, #f8fafc 100%);
}

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(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.78);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 900;
  color: var(--text);
}

.brand-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 13px;
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 12px 22px rgba(249, 115, 22, 0.28);
}

.brand-name {
  font-size: 1.45rem;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link,
.dropdown-panel a,
.mobile-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: #374151;
  font-weight: 700;
  transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.active,
.dropdown-panel a:hover,
.mobile-nav a:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.nav-dropdown {
  position: relative;
}

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

.dropdown-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  width: 190px;
  padding: 10px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown-panel a {
  display: flex;
  border-radius: 12px;
}

.header-search {
  margin-left: auto;
  min-width: min(320px, 32vw);
}

.site-search {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: 0.22s ease;
}

.site-search:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.15);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 14px;
  color: #374151;
  background: #f3f4f6;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.mobile-nav.open {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

main {
  overflow: hidden;
}

.hero-carousel {
  position: relative;
  min-height: 680px;
  color: #fff;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 38%, rgba(249, 115, 22, 0.35), transparent 26%),
    linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.72) 50%, rgba(17, 24, 39, 0.36)),
    linear-gradient(0deg, rgba(17, 24, 39, 0.92), rgba(17, 24, 39, 0.08) 45%);
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 110px 0 120px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.3rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.hero-summary {
  max-width: 680px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
  line-height: 1.9;
}

.hero-tags,
.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.movie-tags span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #9a3412;
  background: #ffedd5;
}

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

.primary-button,
.ghost-button,
.section-link,
.quick-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: 0.22s ease;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 16px 26px rgba(249, 115, 22, 0.32);
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 34px rgba(249, 115, 22, 0.38);
}

.ghost-button {
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.hero-controls {
  position: absolute;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-control,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-control {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: white;
  font-size: 1.8rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.36);
  transition: 0.22s ease;
}

.hero-dot.active {
  width: 30px;
  background: var(--brand);
}

.home-search-panel,
.content-section,
.category-overview,
.split-section,
.detail-content,
.player-section {
  width: min(1180px, calc(100% - 32px));
  margin: 38px auto;
}

.home-search-panel {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 22px;
  align-items: center;
  padding: 28px;
  border: 1px solid rgba(249, 115, 22, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.home-search-panel h2,
.section-heading h2,
.overview-heading h2,
.player-section h2,
.detail-content h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.home-search-panel p,
.section-heading p,
.overview-heading p,
.page-hero p,
.detail-content p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.85;
}

.quick-links,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-links a {
  color: #9a3412;
  background: #ffedd5;
}

.quick-links a:hover {
  color: white;
  background: var(--brand);
}

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

.section-heading.tight {
  align-items: start;
}

.section-link {
  min-height: 38px;
  color: var(--brand);
  background: var(--brand-soft);
}

.section-link:hover {
  color: white;
  background: var(--brand);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
  transition: 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: rgba(249, 115, 22, 0.3);
}

.movie-card.hidden-by-search,
.movie-card.hidden-by-filter {
  display: none;
}

.movie-cover,
.detail-poster,
.movie-player {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 25% 10%, rgba(249, 115, 22, 0.42), transparent 30%),
    linear-gradient(135deg, #111827, #431407 55%, #7f1d1d);
}

.movie-cover {
  display: block;
  aspect-ratio: 3 / 4.15;
}

.movie-cover img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .movie-cover img {
  transform: scale(1.05);
}

.movie-year,
.movie-score {
  position: absolute;
  top: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: white;
  font-size: 0.76rem;
  font-weight: 900;
  background: rgba(17, 24, 39, 0.72);
  backdrop-filter: blur(10px);
}

.movie-year {
  left: 12px;
}

.movie-score {
  right: 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
}

.movie-body {
  padding: 16px;
}

.movie-title {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.movie-title a:hover {
  color: var(--brand);
}

.movie-meta,
.movie-text {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.65;
}

.movie-text {
  min-height: 3.2em;
}

.movie-tags {
  margin-top: 12px;
}

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

.category-tile {
  min-height: 150px;
  padding: 22px;
  border: 1px solid rgba(249, 115, 22, 0.14);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 88% 12%, rgba(249, 115, 22, 0.18), transparent 34%),
    rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
  transition: 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(249, 115, 22, 0.36);
  box-shadow: var(--shadow);
}

.category-tile span {
  display: block;
  margin-bottom: 10px;
  font-size: 1.22rem;
  font-weight: 900;
}

.category-tile p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
}

.compact-section,
.ranking-panel,
.category-overview,
.player-section,
.detail-content {
  padding: 24px;
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

.ranking-panel {
  align-self: start;
}

.sticky-panel {
  position: sticky;
  top: 88px;
}

.ranking-list {
  display: grid;
  gap: 10px;
}

.compact-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: #f9fafb;
  transition: 0.22s ease;
}

.compact-card:hover {
  color: var(--brand);
  background: #fff7ed;
}

.rank-number {
  grid-row: span 2;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 10px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
}

.compact-title {
  overflow: hidden;
  font-weight: 900;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.compact-meta {
  color: var(--muted);
  font-size: 0.84rem;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 34px;
  padding: clamp(36px, 7vw, 72px);
  border-radius: 32px;
  color: white;
  background:
    radial-gradient(circle at 84% 18%, rgba(255, 255, 255, 0.18), transparent 28%),
    linear-gradient(135deg, #111827, #7c2d12 52%, #991b1b);
  box-shadow: var(--shadow);
}

.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.78);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.filter-chip {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: #9a3412;
  font-weight: 900;
  background: #ffedd5;
  cursor: pointer;
  transition: 0.2s ease;
}

.filter-chip.active,
.filter-chip:hover {
  color: white;
  background: var(--brand);
}

.detail-hero {
  color: white;
  background:
    radial-gradient(circle at 80% 14%, rgba(249, 115, 22, 0.26), transparent 30%),
    linear-gradient(135deg, #111827, #431407 60%, #7f1d1d);
}

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

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 22px 0 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.92rem;
}

.breadcrumbs a:hover {
  color: white;
}

.detail-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
  padding: 38px 0 68px;
}

.detail-poster {
  aspect-ratio: 3 / 4.15;
  border-radius: 28px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.detail-one-line {
  max-width: 760px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
  line-height: 1.88;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 0;
}

.wide-tags {
  margin: 22px 0 28px;
}

.player-section h2,
.detail-content h2 {
  margin-bottom: 16px;
}

.movie-player {
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), var(--shadow);
}

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

.player-start {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: white;
  background: radial-gradient(circle at 50% 42%, rgba(249, 115, 22, 0.25), rgba(2, 6, 23, 0.58));
  cursor: pointer;
}

.player-start span {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 50%;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 18px 34px rgba(249, 115, 22, 0.35);
}

.player-start strong {
  font-size: 1.06rem;
  letter-spacing: 0.05em;
}

.movie-player.is-playing .player-start {
  display: none;
}

.detail-content {
  font-size: 1.02rem;
}

.detail-content p {
  color: #374151;
}

.detail-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.detail-links a {
  padding: 9px 13px;
  border-radius: 999px;
  color: #9a3412;
  background: #ffedd5;
  font-weight: 800;
}

.detail-links a:hover {
  color: white;
  background: var(--brand);
}

.site-footer {
  margin-top: 60px;
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 26px;
}

.footer-brand {
  margin-bottom: 10px;
  color: white;
  font-size: 1.3rem;
}

.site-footer p {
  max-width: 620px;
  margin: 0;
  color: #9ca3af;
  line-height: 1.85;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: #d1d5db;
  background: rgba(255, 255, 255, 0.06);
}

.footer-links a:hover {
  color: white;
  background: rgba(249, 115, 22, 0.8);
}

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

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

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

  .sticky-panel {
    position: static;
  }
}

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

  .menu-button {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

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

  .hero-content {
    padding: 90px 0 120px;
  }

  .home-search-panel,
  .footer-inner,
  .detail-grid {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 640px) {
  .header-inner {
    height: 62px;
  }

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

  .mobile-nav.open,
  .movie-grid,
  .small-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .home-search-panel,
  .compact-section,
  .ranking-panel,
  .category-overview,
  .player-section,
  .detail-content {
    padding: 18px;
  }

  .hero-controls {
    left: 16px;
    right: auto;
  }

  .movie-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .movie-cover {
    height: 100%;
    min-height: 168px;
  }

  .movie-text {
    min-height: 0;
  }

  .detail-grid {
    padding-bottom: 42px;
  }
}
