:root {
  --orange: #ea580c;
  --orange-dark: #c2410c;
  --red: #dc2626;
  --ink: #111827;
  --muted: #6b7280;
  --soft: #f8fafc;
  --line: #e5e7eb;
  --card: #ffffff;
  --shadow: 0 18px 50px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 42%, #fff7ed 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--orange), var(--red), var(--orange-dark));
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.22);
}

.header-inner {
  max-width: 1200px;
  height: 68px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.brand-name {
  font-size: 20px;
  white-space: nowrap;
}

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

.nav-link {
  color: rgba(255, 255, 255, 0.9);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 650;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.filter-bar input,
.filter-bar select,
.large-search input {
  border: 1px solid rgba(255, 255, 255, 0.35);
  outline: none;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
}

.header-search input {
  width: 180px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.header-search input::placeholder {
  color: rgba(255, 255, 255, 0.74);
}

.header-search button,
.large-search button {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  background: #ffffff;
  color: var(--orange);
  font-weight: 800;
  cursor: pointer;
}

.mobile-toggle {
  display: none;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  width: 42px;
  height: 42px;
  font-size: 20px;
}

.mobile-panel {
  display: none;
  padding: 10px 20px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(194, 65, 12, 0.95);
}

.mobile-panel a {
  display: block;
  color: #ffffff;
  padding: 11px 0;
  font-weight: 700;
}

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

.hero {
  position: relative;
  overflow: hidden;
  min-height: 540px;
  color: #ffffff;
  background: #991b1b;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.24), transparent 28%),
    radial-gradient(circle at 90% 18%, rgba(251, 146, 60, 0.34), transparent 32%),
    linear-gradient(135deg, #ea580c 0%, #dc2626 42%, #7f1d1d 100%);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000000, transparent 82%);
}

.hero-inner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 70px 20px 54px;
}

.hero-track {
  min-height: 420px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 420px);
  align-items: center;
  gap: 42px;
}

.hero-slide.active {
  display: grid;
  animation: fadeUp 0.48s ease both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.94);
  font-weight: 750;
  font-size: 14px;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 18px 0 16px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p,
.page-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 20px;
  line-height: 1.8;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 850;
  transition: 0.2s ease;
}

.primary-btn {
  color: var(--orange);
  background: #ffffff;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.16);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

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

.hero-poster {
  display: block;
  height: 420px;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
  transform: rotate(2deg);
}

.hero-cover,
.detail-cover,
.backdrop-cover,
.card-cover,
.wide-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-dots {
  display: flex;
  gap: 10px;
  margin-top: 26px;
}

.hero-dot {
  border: 0;
  width: 42px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
}

.hero-dot.active {
  background: #ffffff;
}

.content-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 58px 20px;
}

.soft-section {
  max-width: none;
  background: linear-gradient(135deg, #fff7ed, #fef2f2);
}

.soft-section > .section-heading,
.soft-section > .category-grid {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

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

.section-heading h2,
.rank-panel-head h2,
.detail-text h2,
.detail-side h2 {
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: -0.02em;
}

.section-heading p,
.rank-panel-head p {
  margin: 0;
  color: var(--muted);
}

.section-more,
.rank-panel-head a {
  color: var(--orange);
  font-weight: 800;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 8px 26px rgba(17, 24, 39, 0.08);
  transition: 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.card-image {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #fed7aa, #fecaca);
}

.movie-card.featured .card-image {
  aspect-ratio: 16 / 13;
}

.card-cover {
  transition: transform 0.3s ease;
}

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

.card-year,
.rank-number {
  position: absolute;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.72);
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
}

.card-year {
  left: 12px;
  top: 12px;
  padding: 5px 9px;
}

.rank-number {
  right: 12px;
  top: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--orange), var(--red));
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: var(--ink);
  font-weight: 850;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title:hover,
.wide-title:hover {
  color: var(--orange);
}

.card-meta,
.card-line {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.card-line {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--orange);
  background: #ffedd5;
  font-size: 12px;
  font-weight: 750;
}

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

.category-tile,
.category-card {
  min-height: 180px;
  padding: 22px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(17, 24, 39, 0.08);
  transition: 0.22s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-tile span,
.category-card-title {
  display: block;
  color: var(--orange);
  font-size: 18px;
  font-weight: 900;
}

.category-tile strong {
  display: block;
  margin: 14px 0 8px;
  font-size: 17px;
  line-height: 1.45;
}

.category-tile em,
.category-card p {
  color: var(--muted);
  font-style: normal;
  line-height: 1.7;
}

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

.category-samples {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.category-samples a {
  color: #374151;
  font-weight: 650;
}

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

.rank-panel {
  align-self: start;
  position: sticky;
  top: 90px;
  padding: 22px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.rank-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.wide-list,
.side-list {
  display: grid;
  gap: 14px;
}

.wide-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.wide-poster {
  position: relative;
  height: 76px;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #fed7aa, #fecaca);
}

.small-rank {
  position: absolute;
  left: 7px;
  top: 7px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.75);
  font-size: 12px;
  font-weight: 900;
}

.wide-title {
  display: -webkit-box;
  overflow: hidden;
  font-weight: 850;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.wide-card p,
.wide-card span {
  display: block;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.page-hero {
  padding: 72px 20px;
  color: #ffffff;
}

.page-hero > div {
  max-width: 1200px;
  margin: 0 auto;
}

.orange-hero {
  background: linear-gradient(135deg, var(--orange), var(--red));
}

.dark-hero {
  background: linear-gradient(135deg, #111827, #7f1d1d);
}

.filter-bar {
  display: flex;
  gap: 14px;
  margin-bottom: 24px;
}

.filter-bar input,
.filter-bar select,
.large-search input {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

.filter-bar input {
  flex: 1;
}

.detail-hero {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  color: #ffffff;
  background: #111827;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.32;
  filter: blur(2px);
  background: linear-gradient(135deg, #fb923c, #991b1b);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(17, 24, 39, 0.96), rgba(17, 24, 39, 0.56));
}

.detail-inner {
  position: relative;
  max-width: 1200px;
  min-height: 540px;
  margin: 0 auto;
  padding: 58px 20px;
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
}

.detail-poster {
  height: 430px;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, #fed7aa, #fecaca);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 700;
}

.detail-info h1 {
  max-width: 820px;
}

.detail-line {
  max-width: 840px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 20px;
  line-height: 1.8;
}

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

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 750;
}

.detail-tags {
  margin-bottom: 28px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
}

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

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(234, 88, 12, 0.55), rgba(0, 0, 0, 0.72));
}

.play-overlay span {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  font-size: 30px;
}

.play-overlay strong {
  font-size: 20px;
}

.play-overlay.is-hidden {
  display: none;
}

.detail-text,
.detail-side {
  margin-top: 24px;
  padding: 26px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 8px 26px rgba(17, 24, 39, 0.08);
}

.detail-text p {
  color: #374151;
  font-size: 17px;
  line-height: 2;
}

.search-section {
  min-height: 440px;
}

.large-search {
  display: flex;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto 32px;
}

.large-search input {
  flex: 1;
  padding: 14px 16px;
  font-size: 16px;
}

.large-search button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--orange), var(--red));
}

.empty-state {
  grid-column: 1 / -1;
  padding: 50px;
  border-radius: 24px;
  text-align: center;
  color: var(--muted);
  background: #ffffff;
  box-shadow: 0 8px 26px rgba(17, 24, 39, 0.08);
}

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

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 42px 20px;
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.footer-inner p {
  max-width: 560px;
  color: #9ca3af;
  line-height: 1.7;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-content: start;
}

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

.copyright {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 28px;
  color: #6b7280;
  font-size: 14px;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

  .rank-panel {
    position: static;
  }
}

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

  .mobile-toggle {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

  .hero-slide,
  .detail-inner {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    height: 320px;
    transform: none;
  }

  .detail-poster {
    height: 360px;
  }

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

  .footer-inner {
    flex-direction: column;
  }
}

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

  .hero-inner,
  .content-section,
  .detail-inner {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

  .hero p,
  .page-hero p,
  .detail-line {
    font-size: 16px;
  }

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

  .filter-bar,
  .large-search {
    flex-direction: column;
  }

  .wide-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }
}
