:root {
  --page-bg: #fafaf9;
  --surface: #ffffff;
  --surface-soft: #f5f5f4;
  --text-main: #1c1917;
  --text-muted: #78716c;
  --border-soft: #e7e5e4;
  --green: #15803d;
  --green-deep: #166534;
  --amber: #b45309;
  --amber-soft: #f59e0b;
  --shadow-soft: 0 18px 45px rgba(41, 37, 36, 0.12);
  --shadow-card: 0 12px 30px rgba(41, 37, 36, 0.10);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text-main);
  background:
    radial-gradient(circle at 12% 4%, rgba(245, 158, 11, 0.12), transparent 28rem),
    radial-gradient(circle at 88% 8%, rgba(22, 101, 52, 0.12), transparent 24rem),
    var(--page-bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(231, 229, 228, 0.78);
  background: rgba(255, 255, 255, 0.90);
  backdrop-filter: blur(18px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--amber), var(--green-deep));
  box-shadow: 0 10px 22px rgba(21, 128, 61, 0.22);
}

.logo-text {
  background: linear-gradient(90deg, #92400e, var(--green-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.desktop-nav a,
.mobile-nav a {
  color: #44403c;
  border-radius: 14px;
  padding: 10px 14px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--green-deep);
  background: #f0fdf4;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: #44403c;
  border: 0;
  border-radius: 14px;
  background: #f5f5f4;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 8px;
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.mobile-nav.is-open {
  display: grid;
  gap: 4px;
}

.page-main {
  min-height: 68vh;
}

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

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  background: #111827;
}

.hero-slide {
  display: none;
  min-height: 620px;
  position: relative;
  isolation: isolate;
}

.hero-slide.is-active {
  display: block;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
}

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 10, 9, 0.88) 0%, rgba(12, 10, 9, 0.62) 42%, rgba(12, 10, 9, 0.18) 100%),
    linear-gradient(0deg, rgba(12, 10, 9, 0.72) 0%, rgba(12, 10, 9, 0.06) 45%);
}

.hero-content {
  display: grid;
  align-content: center;
  min-height: 620px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0 76px;
}

.hero-panel {
  width: min(660px, 100%);
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.eyebrow strong,
.eyebrow span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 800;
}

.eyebrow strong {
  background: var(--green);
}

.eyebrow span {
  color: #fef3c7;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.hero p {
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.75;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 30px;
}

.tag-row span,
.tag-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  color: #44403c;
  background: #f5f5f4;
  font-size: 13px;
  font-weight: 700;
}

.hero .tag-row span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-actions,
.section-actions,
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(90deg, var(--green), var(--green-deep));
  box-shadow: 0 18px 34px rgba(21, 128, 61, 0.28);
}

.btn-amber {
  color: #1c1917;
  background: linear-gradient(90deg, #fcd34d, var(--amber-soft));
  box-shadow: 0 18px 34px rgba(180, 83, 9, 0.22);
}

.btn-ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.btn-light {
  color: #292524;
  border: 1px solid var(--border-soft);
  background: #ffffff;
}

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

.hero-dot {
  width: 36px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dot.is-active {
  background: #fbbf24;
}

.section {
  padding: 72px 0 0;
}

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

.section-kicker {
  margin: 0 0 8px;
  color: var(--green-deep);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
}

.section-title,
.page-title {
  margin: 0;
  color: var(--text-main);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.045em;
}

.section-desc,
.page-desc {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.8;
}

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

.category-tile {
  min-height: 164px;
  padding: 22px;
  border: 1px solid rgba(231, 229, 228, 0.86);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 245, 244, 0.92)),
    radial-gradient(circle at 100% 0%, rgba(21, 128, 61, 0.14), transparent 12rem);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(21, 128, 61, 0.32);
}

.category-tile h3 {
  margin: 0 0 10px;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.category-tile p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}

.filter-box {
  display: grid;
  grid-template-columns: 1.6fr 0.8fr 0.8fr;
  gap: 12px;
  margin: 28px 0 28px;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
}

.filter-box input,
.filter-box select {
  width: 100%;
  min-height: 48px;
  color: #292524;
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 0 14px;
  background: #ffffff;
  outline: none;
}

.filter-box input:focus,
.filter-box select:focus {
  border-color: rgba(21, 128, 61, 0.46);
  box-shadow: 0 0 0 4px rgba(21, 128, 61, 0.10);
}

.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 rgba(231, 229, 228, 0.88);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(21, 128, 61, 0.35);
  box-shadow: var(--shadow-soft);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #292524, #0f172a);
}

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

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #ffffff;
  background: rgba(22, 101, 52, 0.92);
  font-size: 12px;
  font-weight: 900;
}

.poster-year {
  position: absolute;
  right: 12px;
  top: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: #1c1917;
  background: rgba(253, 230, 138, 0.94);
  font-size: 12px;
  font-weight: 900;
}

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

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

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

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #57534e;
  font-size: 13px;
  font-weight: 700;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 72px 92px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: #ffffff;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--amber), var(--green));
  font-size: 18px;
  font-weight: 950;
}

.rank-cover {
  width: 92px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 16px;
  background: #292524;
}

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

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-info p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.page-hero {
  padding: 72px 0 24px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) 360px;
  gap: 28px;
  align-items: start;
  padding: 28px 0 0;
}

.player-card,
.info-card,
.side-card {
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #0c0a09;
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0c0a09;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(90deg, rgba(12, 10, 9, 0.84), rgba(12, 10, 9, 0.42));
  transition: opacity 0.24s ease, visibility 0.24s ease;
  z-index: 3;
}

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

.play-button {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  color: #ffffff;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green), var(--amber));
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.36);
}

.play-button svg {
  margin-left: 5px;
}

.player-title-bar {
  padding: 18px 22px 22px;
}

.player-title-bar h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.045em;
}

.player-title-bar p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.75;
}

.info-card {
  padding: 26px;
  margin-top: 24px;
}

.info-card h2,
.side-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.info-card p {
  margin: 0 0 16px;
  color: #44403c;
  font-size: 16px;
  line-height: 1.9;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 22px;
}

.info-grid div {
  padding: 14px;
  border-radius: 16px;
  background: #f5f5f4;
}

.info-grid span {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.info-grid strong {
  display: block;
  margin-top: 4px;
  color: #292524;
}

.side-card {
  padding: 20px;
}

.side-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border-radius: 22px;
  background: #292524;
}

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

.related-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.related-link {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  background: #f8faf9;
  transition: background 0.2s ease, transform 0.2s ease;
}

.related-link:hover {
  transform: translateX(3px);
  background: #f0fdf4;
}

.related-link img {
  width: 58px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 12px;
  background: #292524;
}

.related-link strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
}

.related-link span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.site-footer {
  margin-top: 84px;
  color: #d6d3d1;
  background: linear-gradient(90deg, #1c1917, #292524);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 28px;
  padding: 48px 0 34px;
}

.site-footer h3,
.site-footer h4 {
  margin: 0 0 14px;
  color: #ffffff;
}

.site-footer p,
.site-footer li {
  margin: 0;
  color: #d6d3d1;
  font-size: 14px;
  line-height: 1.8;
}

.site-footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a:hover {
  color: #86efac;
}

.footer-bottom {
  border-top: 1px solid rgba(214, 211, 209, 0.18);
  padding: 18px 0;
  color: #a8a29e;
  text-align: center;
  font-size: 13px;
}

.empty-state {
  display: none;
  padding: 26px;
  color: var(--text-muted);
  border: 1px dashed var(--border-soft);
  border-radius: 22px;
  background: #ffffff;
  text-align: center;
}

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

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

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

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

  .side-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 20px;
  }

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

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

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

  .logo {
    font-size: 18px;
  }

  .hero,
  .hero-slide,
  .hero-content {
    min-height: 560px;
  }

  .section-head {
    display: block;
  }

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

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

  .rank-item {
    grid-template-columns: 48px 72px 1fr;
  }

  .rank-item .btn {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .rank-num {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    font-size: 14px;
  }

  .rank-cover {
    width: 72px;
  }

  .side-card {
    display: block;
  }

  .side-poster {
    max-width: 240px;
    margin: 0 auto 18px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .container,
  .nav-shell,
  .mobile-nav,
  .hero-content {
    width: min(100% - 24px, 1180px);
  }

  .hero h1 {
    font-size: 42px;
  }

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

  .btn {
    width: 100%;
  }

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