:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --soft: #e5e7eb;
  --accent: #059669;
  --accent-dark: #047857;
  --accent-soft: #d1fae5;
  --dark: #020617;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: #064e3b;
}

.logo-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 10px 24px rgba(5, 150, 105, 0.35);
}

.logo-text {
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

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

.nav-link,
.mobile-nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #374151;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}

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

.header-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--accent);
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(5, 150, 105, 0.28);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-toggle span {
  width: 20px;
  height: 2px;
  background: #111827;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

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

.hero {
  position: relative;
  min-height: 520px;
  height: 70vh;
  overflow: hidden;
  background: var(--dark);
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.55), rgba(2, 6, 23, 0.1));
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  right: 24px;
  bottom: 74px;
  max-width: 760px;
  color: #ffffff;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(5, 150, 105, 0.92);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-shadow: 0 18px 45px rgba(0, 0, 0, 0.48);
}

.hero-content p {
  max-width: 680px;
  margin: 18px 0 0;
  color: #e5e7eb;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.8;
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

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

.btn-primary {
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 14px 30px rgba(5, 150, 105, 0.34);
}

.btn-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px);
}

.btn-ghost {
  color: var(--accent-dark);
  background: var(--accent-soft);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 20;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.46);
  font-size: 1.6rem;
  line-height: 1;
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 24px;
  z-index: 22;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 32px;
  background: #34d399;
}

main,
.page-main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.home-main {
  padding: 56px 0 76px;
}

.page-main {
  padding: 44px 0 76px;
}

.section-block {
  margin-bottom: 72px;
}

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  line-height: 1.18;
  letter-spacing: -0.035em;
  font-weight: 950;
}

.section-heading p,
.page-lead {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-link {
  color: var(--accent-dark);
  font-weight: 900;
  white-space: nowrap;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(5, 150, 105, 0.34);
  box-shadow: var(--shadow);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

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

.movie-card:hover .movie-poster img {
  transform: scale(1.06);
  opacity: 0.84;
}

.movie-badge,
.movie-rating {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.movie-badge {
  left: 12px;
  background: rgba(5, 150, 105, 0.92);
}

.movie-rating {
  right: 12px;
  background: rgba(15, 23, 42, 0.78);
}

.movie-play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(5, 150, 105, 0.88);
  transform: translate(-50%, -50%) scale(0.84);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

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

.movie-card-body h3 {
  margin: 0;
  color: #111827;
  font-size: 1.06rem;
  font-weight: 900;
  line-height: 1.35;
}

.movie-card-body h3 a:hover {
  color: var(--accent-dark);
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 9px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: #64748b;
  font-size: 0.86rem;
}

.movie-meta span {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

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

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  font-size: 0.78rem;
  font-weight: 800;
}

.wide-scroll {
  display: grid;
  grid-auto-columns: minmax(230px, 280px);
  grid-auto-flow: column;
  gap: 18px;
  padding-bottom: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.wide-card {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  border-radius: 24px;
  color: #ffffff;
  background: #0f172a;
  box-shadow: var(--shadow-soft);
  scroll-snap-align: start;
}

.wide-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transition: transform 0.3s ease;
}

.wide-card:hover img {
  transform: scale(1.06);
}

.wide-card span,
.wide-card strong,
.wide-card em {
  position: relative;
  z-index: 2;
}

.wide-card span {
  display: inline-flex;
  margin: 16px 16px 0;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
}

.wide-card strong {
  display: block;
  margin: 46px 16px 0;
  font-size: 1.15rem;
  font-weight: 950;
}

.wide-card em {
  display: -webkit-box;
  margin: 8px 16px 16px;
  overflow: hidden;
  color: #e5e7eb;
  font-style: normal;
  font-size: 0.9rem;
  line-height: 1.5;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-card {
  display: flex;
  min-height: 180px;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 26px;
  color: #ffffff;
  background: linear-gradient(135deg, #064e3b, #059669);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease;
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #0f172a, #047857);
}

.category-card:hover {
  transform: translateY(-5px);
}

.category-card strong {
  font-size: 1.35rem;
  font-weight: 950;
}

.category-card span {
  color: #d1fae5;
  line-height: 1.7;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px 88px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.rank-num {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  background: var(--accent);
  font-weight: 950;
}

.rank-item img {
  width: 88px;
  height: 116px;
  border-radius: 16px;
  object-fit: cover;
  background: #0f172a;
}

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 950;
}

.rank-info p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-score {
  display: grid;
  min-width: 72px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  color: #065f46;
  background: #d1fae5;
  font-weight: 950;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 160px;
  gap: 12px;
  margin: 22px 0 28px;
  padding: 14px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  color: #111827;
  background: #f8fafc;
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.13);
}

.hidden-by-filter {
  display: none !important;
}

.empty-state {
  display: none;
  margin-top: 18px;
  padding: 24px;
  border-radius: 22px;
  color: var(--muted);
  background: #ffffff;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: #64748b;
  font-size: 0.92rem;
}

.breadcrumb a {
  color: var(--accent-dark);
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  margin: 34px 0 36px;
  padding: 28px;
  border-radius: 32px;
  background: linear-gradient(135deg, #ffffff, #ecfdf5);
  box-shadow: var(--shadow-soft);
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.detail-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-info h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
  font-weight: 950;
}

.detail-info .intro {
  margin: 18px 0 0;
  color: #475569;
  font-size: 1.08rem;
  line-height: 1.85;
}

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

.detail-meta span {
  padding: 7px 11px;
  border-radius: 999px;
  color: #065f46;
  background: #d1fae5;
  font-weight: 900;
}

.player-section {
  margin: 40px 0;
}

.player-shell {
  overflow: hidden;
  border-radius: 32px;
  background: #020617;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.28);
}

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

.player-box video {
  width: 100%;
  height: 100%;
  background: #000000;
  cursor: pointer;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.36));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-cover-inner {
  display: grid;
  place-items: center;
  gap: 14px;
  text-align: center;
}

.player-cover-icon {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 18px 40px rgba(5, 150, 105, 0.38);
  font-size: 2rem;
}

.player-cover-title {
  font-size: 1.15rem;
  font-weight: 950;
}

.player-caption {
  padding: 22px;
  color: #e5e7eb;
}

.player-caption h2 {
  margin: 0 0 8px;
  font-size: 1.35rem;
  font-weight: 950;
}

.player-caption p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.8;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  margin: 38px 0;
}

.content-panel {
  padding: 26px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.content-panel h2 {
  margin: 0 0 14px;
  font-size: 1.55rem;
  font-weight: 950;
}

.content-panel p {
  margin: 0 0 16px;
  color: #475569;
  line-height: 1.9;
}

.info-table {
  display: grid;
  gap: 12px;
}

.info-row {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.info-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.info-row span:first-child {
  color: #64748b;
  font-weight: 800;
}

.info-row span:last-child {
  color: #0f172a;
  font-weight: 800;
}

.site-footer {
  margin-top: 50px;
  padding: 34px 0;
  color: #cbd5e1;
  background: #020617;
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}

.footer-logo {
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 1.1rem;
}

.footer-inner p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.footer-links a {
  padding: 7px 10px;
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(5, 150, 105, 0.16);
}

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

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

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

  .mobile-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .hero {
    min-height: 580px;
    height: 76vh;
  }

  .hero-content {
    left: 20px;
    bottom: 66px;
  }

  .hero-arrow {
    display: none;
  }

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

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

  .rank-item {
    grid-template-columns: 44px 70px 1fr;
  }

  .rank-score {
    grid-column: 3;
    justify-self: start;
  }

  .rank-item img {
    width: 70px;
    height: 96px;
  }

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

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .header-inner {
    width: min(100% - 22px, 1280px);
  }

  main,
  .page-main {
    width: min(100% - 22px, 1280px);
  }

  .hero-content h1,
  .hero-content h2 {
    font-size: 2.55rem;
  }

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

  .section-heading {
    display: block;
  }

  .detail-hero {
    padding: 18px;
  }
}
