:root {
  --site-bg: #f8fafc;
  --site-card: #ffffff;
  --site-text: #0f172a;
  --site-muted: #64748b;
  --site-soft: #e2e8f0;
  --site-dark: #020617;
  --site-emerald: #10b981;
  --site-emerald-dark: #059669;
  --site-teal: #14b8a6;
  --site-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

html {
  scroll-behavior: smooth;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, #1e293b 0%, #020617 52%, #1e293b 100%);
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.28);
}

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

.nav-shell {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.logo-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--site-emerald), var(--site-teal));
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(16, 185, 129, 0.34);
}

.logo-text {
  background: linear-gradient(90deg, #34d399, #2dd4bf);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-links a,
.mobile-panel a {
  border-radius: 12px;
  padding: 10px 14px;
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 650;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.mobile-panel a:hover {
  background: rgba(51, 65, 85, 0.8);
  color: #ffffff;
}

.nav-search {
  position: relative;
  min-width: 250px;
}

.nav-search input,
.filter-input,
.search-hero input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
  color: #ffffff;
  padding: 11px 14px 11px 40px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-search input:focus,
.filter-input:focus,
.search-hero input:focus {
  border-color: rgba(52, 211, 153, 0.8);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16);
  background: rgba(15, 23, 42, 0.92);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(51, 65, 85, 0.85);
  color: #ffffff;
  font-size: 22px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding: 10px 16px 16px;
  background: #020617;
}

.mobile-panel.is-open {
  display: grid;
  gap: 8px;
}

.hero-slider {
  position: relative;
  height: min(80vh, 780px);
  min-height: 580px;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 24%, rgba(16, 185, 129, 0.32), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.68) 48%, rgba(2, 6, 23, 0.12) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, transparent 40%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
  color: #ffffff;
  padding-top: 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.96);
  color: #ffffff;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.hero-copy h1 {
  margin: 20px 0 18px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.03;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 640px;
  color: #e2e8f0;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.8;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  padding: 7px 12px;
  font-size: 13px;
  backdrop-filter: blur(10px);
}

.hero-actions,
.section-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

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

.primary-btn {
  background: linear-gradient(135deg, var(--site-emerald), var(--site-teal));
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(16, 185, 129, 0.3);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.58);
  color: #ffffff;
  font-size: 32px;
  line-height: 1;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(2, 6, 23, 0.82);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 22px;
  transform: translateY(-50%);
}

.hero-next {
  right: 22px;
  transform: translateY(-50%);
}

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

.hero-dots button {
  width: 34px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  transition: background 0.2s ease, width 0.2s ease;
}

.hero-dots button.is-active {
  width: 48px;
  background: #34d399;
}

.main-section {
  padding: 64px 0;
}

.main-section.soft {
  background: linear-gradient(180deg, #f8fafc, #eef2f7);
}

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

.section-title h2,
.section-title h1,
.page-title h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-title p,
.page-title p,
.category-card p,
.movie-card p,
.detail-info p,
.content-card p {
  color: var(--site-muted);
  line-height: 1.75;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 22px;
  background: var(--site-card);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: var(--site-shadow);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #064e3b);
}

.poster-wrap.tall {
  aspect-ratio: 3 / 4;
}

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

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

.card-badge,
.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.94);
  color: #ffffff;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.card-year {
  position: absolute;
  right: 12px;
  bottom: 12px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  color: #ffffff;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 18px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--site-muted);
  font-size: 12px;
  font-weight: 750;
  margin-bottom: 10px;
}

.movie-card h3 {
  margin-bottom: 8px;
  color: #0f172a;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.movie-card:hover h3 {
  color: var(--site-emerald-dark);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.card-tags span {
  border-radius: 8px;
  background: #f1f5f9;
  color: #475569;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background:
    radial-gradient(circle at top right, rgba(20, 184, 166, 0.18), transparent 40%),
    #ffffff;
  padding: 22px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card h2,
.category-card h3 {
  font-size: 22px;
  font-weight: 900;
  margin-bottom: 10px;
}

.category-link {
  display: inline-flex;
  align-items: center;
  margin-top: 18px;
  color: var(--site-emerald-dark);
  font-weight: 850;
}

.ranking-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.rank-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 20px;
  background: #ffffff;
  padding: 12px 16px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(16, 185, 129, 0.42);
}

.rank-number {
  color: var(--site-emerald-dark);
  font-size: 28px;
  font-weight: 950;
}

.rank-title {
  font-weight: 850;
  color: #0f172a;
}

.rank-meta {
  color: var(--site-muted);
  font-size: 13px;
  margin-top: 3px;
}

.page-hero,
.search-hero,
.detail-hero {
  background:
    radial-gradient(circle at 15% 20%, rgba(16, 185, 129, 0.24), transparent 28%),
    linear-gradient(135deg, #020617, #1e293b 60%, #064e3b);
  color: #ffffff;
  padding: 72px 0;
}

.page-title {
  max-width: 800px;
}

.page-title p {
  color: #cbd5e1;
  margin-top: 16px;
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #a7f3d0;
  font-size: 14px;
  font-weight: 750;
  margin-bottom: 18px;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 22px;
  background: #ffffff;
  padding: 14px;
  margin-bottom: 28px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.catalog-toolbar .filter-input {
  background: #f8fafc;
  color: #0f172a;
  padding-left: 16px;
}

.filter-select {
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background: #f8fafc;
  color: #0f172a;
  padding: 0 14px;
  outline: none;
}

.no-results {
  display: none;
  border-radius: 18px;
  background: #ffffff;
  padding: 28px;
  color: var(--site-muted);
  text-align: center;
}

.no-results.is-visible {
  display: block;
}

.detail-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
  background: linear-gradient(135deg, #0f172a, #064e3b);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

.detail-info p {
  color: #dbeafe;
  font-size: 18px;
}

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

.detail-meta span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 8px 13px;
  font-weight: 750;
}

.video-section {
  padding: 58px 0 0;
}

.video-stage {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  background: #020617;
  box-shadow: 0 24px 64px rgba(2, 6, 23, 0.24);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #020617;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.26), rgba(2, 6, 23, 0.74));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
  width: 92px;
  height: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--site-emerald), var(--site-teal));
  color: #ffffff;
  font-size: 36px;
  box-shadow: 0 24px 52px rgba(16, 185, 129, 0.36);
  padding-left: 5px;
}

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

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 22px;
}

.content-card {
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #ffffff;
  padding: 26px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.content-card h2,
.content-card h3 {
  margin-bottom: 14px;
  font-size: 24px;
  font-weight: 900;
}

.content-card p + p {
  margin-top: 16px;
}

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

.info-list div {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  color: var(--site-muted);
}

.info-list strong {
  color: #0f172a;
}

.site-footer {
  margin-top: 64px;
  background: #020617;
  color: #94a3b8;
  padding: 34px 0;
}

.footer-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

.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: 1080px) {
  .movie-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .nav-search {
    display: none;
  }
}

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

  .mobile-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

  .hero-arrow {
    display: none;
  }

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

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

  .ranking-list,
  .content-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    max-width: 320px;
  }

  .catalog-toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .logo {
    font-size: 19px;
  }

  .hero-copy h1,
  .detail-info h1 {
    font-size: 38px;
  }

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

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

  .rank-item .primary-btn {
    grid-column: 1 / -1;
  }

  .play-overlay span {
    width: 74px;
    height: 74px;
    font-size: 30px;
  }
}
