:root {
  --site-teal: #0d9488;
  --site-teal-dark: #115e59;
  --site-ink: #1f2937;
  --site-muted: #6b7280;
  --site-line: #e5e7eb;
  --site-amber: #f59e0b;
}

body {
  background: #f9fafb;
  color: var(--site-ink);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #0f766e, #134e4a);
  box-shadow: 0 10px 30px rgba(15, 118, 110, 0.24);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  color: #0f766e;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.brand-text {
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

.nav-link,
.mobile-nav-link {
  font-weight: 650;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  color: #99f6e4;
}

.menu-toggle {
  display: inline-flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.7rem;
  border-radius: 0.75rem;
}

.menu-toggle span {
  display: block;
  width: 1.45rem;
  height: 0.13rem;
  border-radius: 999px;
  background: #ffffff;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 0.9rem;
  padding-top: 1rem;
}

.mobile-nav.is-open {
  display: flex;
}

.home-hero {
  position: relative;
  height: 500px;
  margin-bottom: 3rem;
  overflow: hidden;
  border-radius: 1rem;
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.24);
}

.hero-stage,
.hero-slide,
.hero-slide img,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

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

.hero-overlay {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.50), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 0;
  width: min(100%, 760px);
  transform: translateY(-50%);
  padding: 2rem;
  color: #ffffff;
}

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

.hero-badges span,
.hero-tags span,
.hero-tags a {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
}

.hero-badges span:first-child {
  background: var(--site-teal);
}

.hero-badges span:last-child {
  background: var(--site-amber);
}

.hero-content h1 {
  margin-top: 1rem;
  margin-bottom: 1rem;
  font-size: clamp(2.15rem, 5vw, 4rem);
  line-height: 1.05;
  font-weight: 900;
}

.hero-content p {
  max-width: 42rem;
  margin-bottom: 1.4rem;
  color: #e5e7eb;
  font-size: 1.125rem;
  line-height: 1.75;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  margin-top: 1.4rem;
  padding: 0.8rem 1.8rem;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.primary-btn {
  color: #ffffff;
  background: var(--site-teal);
}

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

.primary-btn:hover {
  background: var(--site-teal-dark);
}

.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #ffffff;
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.hero-dots {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  gap: 0.45rem;
  z-index: 5;
}

.hero-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 2rem;
  background: #ffffff;
}

.filter-panel {
  margin-bottom: 3rem;
  border-radius: 1rem;
  padding: 1rem;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.filter-panel label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  color: #4b5563;
  font-size: 0.85rem;
  font-weight: 700;
}

.filter-panel input,
.filter-select {
  min-height: 2.75rem;
  width: 100%;
  border: 1px solid var(--site-line);
  border-radius: 0.8rem;
  padding: 0 0.9rem;
  color: var(--site-ink);
  background: #f9fafb;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.filter-panel input:focus,
.filter-select:focus {
  border-color: var(--site-teal);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
}

.empty-state {
  display: none;
  margin-top: 1rem;
  border-radius: 0.8rem;
  padding: 1rem;
  text-align: center;
  color: #b45309;
  background: #fffbeb;
}

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

.content-section {
  margin-bottom: 4rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900;
  color: var(--site-ink);
}

.section-more {
  color: var(--site-teal);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.movie-card {
  min-width: 0;
}

.card-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: 0.9rem;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.10);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-link:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 42px rgba(15, 23, 42, 0.18);
}

.card-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #111827;
}

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

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

.card-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.08));
  transition: opacity 0.25s ease;
}

.card-link:hover .card-shade {
  opacity: 1;
}

.card-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  color: #ffffff;
  font-size: 2rem;
  transition: opacity 0.25s ease, transform 0.25s ease;
  transform: scale(0.78);
}

.card-link:hover .card-play {
  opacity: 1;
  transform: scale(1);
}

.card-year {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  background: var(--site-amber);
}

.card-body {
  padding: 1rem;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 3.2rem;
  margin-bottom: 0.55rem;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--site-ink);
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.45;
  transition: color 0.2s ease;
}

.card-link:hover h3 {
  color: var(--site-teal);
}

.card-body p {
  display: -webkit-box;
  min-height: 2.75rem;
  margin-bottom: 0.85rem;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: var(--site-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: #6b7280;
  font-size: 0.75rem;
}

.card-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-grid,
.category-large-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.category-tile,
.category-card-large a {
  display: block;
  overflow: hidden;
  border-radius: 1rem;
  background: linear-gradient(135deg, #f0fdfa, #eff6ff);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile {
  padding: 1.5rem;
}

.category-tile:hover,
.category-card-large a:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 42px rgba(15, 23, 42, 0.14);
}

.category-tile span,
.category-card-body h2 {
  display: block;
  margin-bottom: 0.55rem;
  color: #0f766e;
  font-size: 1.25rem;
  font-weight: 900;
}

.category-tile p,
.category-card-body p {
  color: #4b5563;
  line-height: 1.65;
}

.category-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 140px;
  gap: 0.15rem;
  background: #0f172a;
}

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

.category-card-body {
  padding: 1.2rem;
}

.category-card-body span {
  display: inline-flex;
  margin-top: 1rem;
  color: var(--site-teal);
  font-weight: 800;
}

.compact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.compact-card a {
  display: grid;
  grid-template-columns: auto 78px 1fr;
  align-items: center;
  gap: 0.85rem;
  border-radius: 0.9rem;
  padding: 0.7rem;
  background: #ffffff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.compact-card a:hover {
  transform: translateX(3px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
}

.rank-num {
  color: var(--site-amber);
  font-weight: 950;
}

.compact-card img {
  width: 78px;
  height: 52px;
  border-radius: 0.65rem;
  object-fit: cover;
}

.compact-card h3 {
  overflow: hidden;
  margin-bottom: 0.25rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 900;
}

.compact-card p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  color: var(--site-muted);
  font-size: 0.85rem;
}

.compact-card span:last-child {
  color: #6b7280;
  font-size: 0.78rem;
}

.page-hero {
  margin-bottom: 2rem;
  border-radius: 1.2rem;
  padding: clamp(2rem, 5vw, 4rem);
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #134e4a);
  box-shadow: 0 18px 40px rgba(15, 118, 110, 0.20);
}

.page-hero h1 {
  margin: 0.5rem 0 0.75rem;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 950;
}

.page-hero p {
  max-width: 50rem;
  color: #ccfbf1;
  line-height: 1.75;
}

.soft-hero {
  background: linear-gradient(135deg, #0d9488, #2563eb);
}

.ranking-hero {
  background: linear-gradient(135deg, #b45309, #0f766e);
}

.search-hero {
  background: linear-gradient(135deg, #1d4ed8, #0f766e);
}

.eyebrow {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  color: #0f766e;
  background: #ffffff;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.2rem;
  color: #6b7280;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--site-teal);
  font-weight: 800;
}

.listing-grid {
  padding-bottom: 1rem;
}

.rank-list {
  display: grid;
  gap: 1rem;
}

.rank-row a {
  display: grid;
  grid-template-columns: auto 92px 1fr auto;
  align-items: center;
  gap: 1rem;
  border-radius: 1rem;
  padding: 0.85rem;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row a:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.14);
}

.rank-index {
  color: var(--site-amber);
  font-size: 1.2rem;
  font-weight: 950;
}

.rank-row img {
  width: 92px;
  height: 60px;
  border-radius: 0.75rem;
  object-fit: cover;
}

.rank-main h2 {
  margin-bottom: 0.35rem;
  font-size: 1.08rem;
  font-weight: 900;
}

.rank-main p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  color: var(--site-muted);
}

.rank-main div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.55rem;
  color: #6b7280;
  font-size: 0.8rem;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.player-card,
.detail-card,
.info-panel {
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.10);
}

.player-card {
  overflow: hidden;
  background: #000000;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.10));
  z-index: 2;
}

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

.play-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: 999px;
  padding-left: 0.2rem;
  background: var(--site-teal);
  box-shadow: 0 16px 36px rgba(13, 148, 136, 0.45);
  font-size: 1.8rem;
}

.play-title {
  font-size: 1.05rem;
  font-weight: 800;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.detail-card {
  margin-top: 1.5rem;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.detail-card h1 {
  margin-bottom: 1rem;
  color: var(--site-ink);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 950;
  line-height: 1.2;
}

.detail-badges {
  margin-bottom: 1.5rem;
}

.detail-badges a,
.detail-badges span {
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  color: #0f766e;
  background: #ccfbf1;
  font-weight: 800;
}

.detail-section {
  border-top: 1px solid var(--site-line);
  padding-top: 1.25rem;
  margin-top: 1.25rem;
}

.detail-section h2,
.info-panel h2 {
  margin-bottom: 0.85rem;
  color: var(--site-ink);
  font-size: 1.25rem;
  font-weight: 950;
}

.detail-section p {
  margin-bottom: 0.8rem;
  color: #4b5563;
  line-height: 1.85;
  white-space: pre-line;
}

.lead-text {
  color: #374151;
  font-size: 1.05rem;
  font-weight: 700;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.5rem;
}

.tag-list a {
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  color: #0f766e;
  background: #f0fdfa;
  font-weight: 750;
}

.info-panel {
  position: sticky;
  top: 6rem;
  padding: 1.5rem;
  color: #ffffff;
  background: linear-gradient(135deg, #0d9488, #115e59);
}

.info-panel h2 {
  color: #ffffff;
}

.info-panel dl {
  display: grid;
  gap: 1rem;
}

.info-panel dt {
  color: #ccfbf1;
  font-size: 0.86rem;
}

.info-panel dd {
  color: #ffffff;
  font-size: 1.06rem;
  font-weight: 850;
}

.related-section {
  margin-top: 3rem;
}

.site-footer {
  margin-top: 5rem;
  color: #d1d5db;
  background: #111827;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.footer-brand {
  margin-bottom: 1rem;
  color: #ffffff;
}

.footer-copy {
  max-width: 30rem;
  color: #9ca3af;
  line-height: 1.7;
}

.site-footer h3 {
  margin-bottom: 1rem;
  color: #ffffff;
  font-weight: 900;
}

.site-footer li + li {
  margin-top: 0.5rem;
}

.site-footer a:hover {
  color: #2dd4bf;
}

.footer-bottom {
  margin-top: 2rem;
  border-top: 1px solid #1f2937;
  padding-top: 1.4rem;
  color: #9ca3af;
  text-align: center;
}

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

@media (min-width: 640px) {
  .movie-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-grid {
    grid-template-columns: 1.6fr 0.8fr 0.8fr;
  }

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

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

@media (min-width: 768px) {
  .home-hero {
    height: 600px;
  }

  .desktop-nav {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .mobile-nav {
    display: none !important;
  }

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

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

@media (min-width: 1024px) {
  .movie-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

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

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

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

  .detail-layout {
    grid-template-columns: minmax(0, 2fr) minmax(260px, 0.8fr);
  }
}

@media (min-width: 1280px) {
  .listing-grid,
  .all-library {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .home-hero {
    height: 540px;
  }

  .hero-content {
    padding: 1.25rem;
  }

  .rank-row a {
    grid-template-columns: auto 74px 1fr;
  }

  .rank-row strong {
    display: none;
  }
}
