:root {
  --brand: #16a34a;
  --brand-dark: #15803d;
  --brand-soft: #dcfce7;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --page: #f9fafb;
  --card: #ffffff;
}

body {
  min-height: 100vh;
  background: var(--page);
  color: var(--ink);
}

img {
  background: linear-gradient(135deg, #111827, #374151);
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: #111827;
  white-space: nowrap;
}

.logo-mark {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: white;
  box-shadow: 0 10px 22px rgba(22, 163, 74, 0.24);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 0.7rem;
  color: #374151;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
  border-radius: 0.7rem;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: white;
}

.mobile-menu.is-open {
  display: block;
}

.mobile-menu .nav-link {
  width: 100%;
  justify-content: flex-start;
  border-radius: 0;
  min-height: 3rem;
}

.search-wrap {
  position: relative;
}

.search-input,
.filter-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.65rem 1rem;
  background: #f9fafb;
  color: #111827;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-input:focus,
.filter-input:focus {
  border-color: #86efac;
  background: white;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12);
}

.search-panel {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: min(26rem, calc(100vw - 2rem));
  max-height: 70vh;
  overflow: auto;
  border: 1px solid var(--line);
  background: white;
  border-radius: 1rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
  padding: 0.5rem;
}

.search-panel.is-open {
  display: block;
}

.search-result {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 0.75rem;
  padding: 0.6rem;
  border-radius: 0.8rem;
  transition: background 0.2s ease;
}

.search-result:hover {
  background: #f0fdf4;
}

.search-result img {
  width: 4rem;
  height: 3rem;
  object-fit: cover;
  border-radius: 0.5rem;
}

.hero-section {
  position: relative;
  min-height: 520px;
  height: 70vh;
  overflow: hidden;
  background: #111827;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.42);
  transform: scale(1.02);
}

.hero-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 40%, rgba(34, 197, 94, 0.28), transparent 32rem),
    linear-gradient(to top, #000000 0%, rgba(0, 0, 0, 0.34) 46%, rgba(0, 0, 0, 0.45) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-title {
  font-size: clamp(2.6rem, 7vw, 5.5rem);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.85rem;
  padding: 0 1.35rem;
  border-radius: 0.85rem;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--brand);
  color: white;
  box-shadow: 0 16px 35px rgba(22, 163, 74, 0.28);
}

.btn-primary:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.section-title {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #111827;
}

.section-subtitle {
  margin-top: 0.45rem;
  color: var(--muted);
}

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 0.9rem;
  background: white;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-0.25rem);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.14);
}

.movie-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #374151);
}

.movie-cover img,
.featured-cover img,
.compact-cover img,
.ranking-cover img,
.related-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover img,
.featured-card:hover img,
.compact-card:hover img,
.ranking-item:hover img,
.related-card:hover img {
  transform: scale(1.08);
}

.badge-top,
.badge-year {
  position: absolute;
  top: 0.65rem;
  padding: 0.25rem 0.55rem;
  border-radius: 0.45rem;
  font-size: 0.75rem;
  font-weight: 800;
  color: white;
}

.badge-top {
  left: 0.65rem;
  background: var(--brand);
}

.badge-year {
  right: 0.65rem;
  background: rgba(0, 0, 0, 0.72);
}

.movie-card-body {
  padding: 1rem;
}

.movie-title {
  min-height: 3rem;
  font-weight: 900;
  color: #111827;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-title,
.featured-card:hover .movie-title,
.compact-card:hover .movie-title,
.related-card:hover .movie-title,
.ranking-item:hover .movie-title {
  color: var(--brand-dark);
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--brand-soft);
  color: #15803d;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
}

.featured-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.featured-card:hover {
  transform: scale(1.015);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.featured-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #111827, #374151);
}

.featured-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.35), transparent);
}

.featured-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 1.35rem;
  color: white;
}

.compact-card,
.related-card {
  display: flex;
  gap: 0.9rem;
  padding: 0.75rem;
  border-radius: 0.85rem;
  transition: background 0.2s ease;
}

.compact-card:hover,
.related-card:hover {
  background: #f9fafb;
}

.compact-cover,
.related-cover {
  flex: 0 0 auto;
  width: 8rem;
  height: 5rem;
  overflow: hidden;
  border-radius: 0.6rem;
  background: linear-gradient(135deg, #111827, #374151);
}

.category-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: white;
  padding: 1.2rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
  transform: translateY(-0.2rem);
  border-color: #86efac;
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.12);
}

.ranking-item {
  display: grid;
  grid-template-columns: auto 8.5rem 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border-radius: 1rem;
  background: white;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.ranking-item:hover {
  transform: translateY(-0.15rem);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.12);
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.8rem;
  background: #111827;
  color: white;
  font-weight: 900;
}

.ranking-cover {
  width: 8.5rem;
  height: 5.2rem;
  overflow: hidden;
  border-radius: 0.7rem;
  background: linear-gradient(135deg, #111827, #374151);
}

.player-shell {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 0.9rem;
  background: #000000;
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: white;
  background: radial-gradient(circle at center, rgba(22, 163, 74, 0.18), rgba(0, 0, 0, 0.34));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  font-size: 2rem;
  box-shadow: 0 18px 42px rgba(22, 163, 74, 0.3);
}

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

.filter-button {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: white;
  padding: 0.55rem 1rem;
  color: #374151;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-button:hover,
.filter-button.is-active {
  border-color: #86efac;
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.line-clamp-1,
.line-clamp-2,
.line-clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-1 {
  -webkit-line-clamp: 1;
}

.line-clamp-2 {
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  -webkit-line-clamp: 3;
}

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

  .hero-section {
    height: auto;
    min-height: 560px;
  }

  .ranking-item {
    grid-template-columns: auto 1fr;
  }

  .ranking-cover,
  .ranking-action {
    display: none;
  }
}

@media (min-width: 901px) {
  .mobile-menu-toggle {
    display: none;
  }
}

@media (max-width: 640px) {
  .compact-cover,
  .related-cover {
    width: 6.5rem;
    height: 4.25rem;
  }

  .movie-title {
    min-height: auto;
  }
}
