:root {
  --cyan: #0891b2;
  --cyan-dark: #0e7490;
  --blue: #2563eb;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-50: #f8fafc;
  --gray-900: #111827;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-200: #e5e7eb;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

body {
  background: var(--white);
  color: var(--gray-900);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

.site-container {
  width: min(100% - 2rem, 80rem);
  margin: 0 auto;
}

.header-row {
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.25rem;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.logo-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 30px rgb(8 145 178 / 0.25);
}

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

.desktop-nav a,
.mobile-nav a {
  color: var(--gray-700);
  font-size: 0.875rem;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--cyan);
}

.search-form {
  position: relative;
  width: min(18rem, 30vw);
}

.search-form input,
.filter-input,
.filter-select {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 0.6rem 1rem;
  color: var(--gray-700);
  background: white;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-form input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: transparent;
  box-shadow: 0 0 0 2px rgb(6 182 212 / 0.65);
}

.mobile-button {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  color: var(--gray-700);
}

.mobile-button:hover {
  background: #f3f4f6;
}

.mobile-nav {
  display: none;
  padding: 0 0 1rem;
}

.mobile-nav.open {
  display: block;
}

.mobile-nav-inner {
  display: grid;
  gap: 0.25rem;
}

.mobile-nav a {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: 0.75rem;
}

.mobile-nav .search-form {
  width: 100%;
  margin-top: 0.5rem;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 32rem;
  overflow: hidden;
  background: linear-gradient(180deg, var(--slate-900), var(--slate-800));
}

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

.hero-slide {
  opacity: 0;
  transition: opacity 1s ease;
}

.hero-slide.active {
  opacity: 1;
}

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

.hero-shade {
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.05));
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 4rem;
}

.hero-copy {
  max-width: 42rem;
  color: white;
}

.hero-copy-item {
  display: none;
}

.hero-copy-item.active {
  display: block;
}

.hero-copy h1 {
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 1rem;
  text-shadow: 0 14px 34px rgb(0 0 0 / 0.45);
}

.hero-copy p {
  font-size: 1.125rem;
  color: #e5e7eb;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.hero-tags,
.meta-row,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.hero-tags {
  margin-bottom: 1.5rem;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  font-size: 0.875rem;
}

.button-primary,
.button-light,
.button-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.button-primary {
  background: var(--cyan);
  color: white;
  padding: 0.75rem 1.65rem;
  box-shadow: var(--shadow-lg);
}

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

.button-light {
  background: white;
  color: var(--gray-900);
  padding: 0.7rem 1.4rem;
  box-shadow: var(--shadow-sm);
}

.button-light:hover {
  color: var(--cyan);
  box-shadow: var(--shadow-lg);
}

.button-ghost {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  padding: 0.7rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.button-ghost:hover {
  background: rgba(255, 255, 255, 0.25);
}

.hero-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-nav:hover {
  background: rgba(255, 255, 255, 0.3);
}

.hero-prev {
  left: 1rem;
}

.hero-next {
  right: 1rem;
}

.hero-dots {
  position: absolute;
  z-index: 3;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

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

.hero-dot.active {
  width: 2rem;
  background: white;
}

.section {
  padding: 4rem 0;
}

.section-soft {
  background: linear-gradient(180deg, white, var(--slate-50));
}

.section-cyan {
  background: linear-gradient(135deg, var(--slate-50), #ecfeff);
}

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

.section-title h2,
.page-title h1 {
  font-size: clamp(1.8rem, 3vw, 2.25rem);
  line-height: 1.2;
  font-weight: 800;
  color: var(--gray-900);
}

.section-title p,
.page-title p {
  color: var(--gray-600);
  line-height: 1.8;
}

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

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

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

.movie-card,
.feature-card,
.list-card,
.category-card,
.rank-card,
.info-card {
  background: white;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.movie-card {
  border-radius: 1rem;
}

.movie-card:hover,
.list-card:hover,
.category-card:hover,
.rank-card:hover {
  transform: translateY(-0.25rem);
  box-shadow: var(--shadow-xl);
}

.poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: #f3f4f6;
}

.poster img,
.feature-card img,
.list-thumb img,
.rec-thumb img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .poster img,
.feature-card:hover img,
.list-card:hover .list-thumb img,
.rec-card:hover .rec-thumb img {
  transform: scale(1.06);
}

.year-badge,
.rank-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--cyan);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
}

.rank-badge {
  left: 0.5rem;
  right: auto;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-body {
  padding: 0.85rem;
}

.card-title {
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.card-summary {
  color: var(--gray-600);
  font-size: 0.875rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 0.45rem;
}

.movie-card:hover .card-title,
.list-card:hover .card-title,
.rec-card:hover .rec-title,
.category-card:hover h2,
.rank-card:hover .card-title {
  color: var(--cyan);
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--gray-500);
  font-size: 0.75rem;
  margin-top: 0.45rem;
}

.feature-card {
  position: relative;
  border-radius: 1.5rem;
  min-height: 28rem;
}

.feature-card .feature-poster {
  position: absolute;
  inset: 0;
}

.feature-card .feature-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0));
}

.feature-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  color: white;
  padding: 1.5rem;
  transform: translateY(0.5rem);
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-info {
  transform: translateY(0);
}

.feature-info h3 {
  font-size: 1.35rem;
  line-height: 1.3;
  font-weight: 800;
  margin: 0.4rem 0;
}

.feature-info p {
  color: #e5e7eb;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.list-card {
  display: flex;
  border: 1px solid #f3f4f6;
  border-radius: 1rem;
}

.list-thumb {
  width: 9.5rem;
  flex: 0 0 auto;
  overflow: hidden;
}

.list-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.55rem;
  border-radius: 0.45rem;
  background: #f3f4f6;
  color: var(--gray-500);
  font-size: 0.75rem;
}

.category-card {
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid #f3f4f6;
}

.category-card h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
  transition: color 0.2s ease;
}

.category-card p {
  color: var(--gray-600);
  line-height: 1.75;
}

.filter-panel {
  background: white;
  border: 1px solid #f3f4f6;
  border-radius: 1.25rem;
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0;
}

.page-title {
  padding: 3rem 0 1rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  color: var(--gray-500);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(18rem, 1fr);
  gap: 2rem;
  padding: 2rem 0 4rem;
}

.detail-main {
  display: grid;
  gap: 1.5rem;
}

.player-card {
  background: #000;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
}

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

.player-box video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.08));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-start {
  width: 5rem;
  height: 5rem;
  border-radius: 999px;
  background: var(--cyan);
  color: white;
  font-size: 2rem;
  box-shadow: var(--shadow-2xl);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.player-overlay:hover .player-start {
  transform: scale(1.08);
  background: var(--cyan-dark);
}

.info-card {
  border-radius: 1rem;
  padding: 1.5rem;
}

.info-card h1,
.info-card h2 {
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 1rem;
}

.info-card h1 {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
}

.info-card h2 {
  font-size: 1.5rem;
}

.info-card p {
  color: var(--gray-700);
  line-height: 1.9;
  margin-bottom: 1rem;
}

.info-card .lead {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  color: #0e7490;
  background: #ecfeff;
  font-size: 0.875rem;
}

.detail-side {
  display: grid;
  gap: 1.5rem;
  align-content: start;
}

.detail-poster {
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 2 / 3;
}

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

.rec-card {
  display: flex;
  gap: 0.75rem;
}

.rec-thumb {
  width: 6rem;
  height: 8rem;
  flex: 0 0 auto;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #f3f4f6;
}

.rec-title {
  font-weight: 800;
  line-height: 1.45;
  color: var(--gray-900);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.rec-summary {
  color: var(--gray-600);
  font-size: 0.8rem;
  line-height: 1.6;
  margin: 0.25rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.site-footer {
  background: linear-gradient(135deg, var(--slate-900), var(--slate-800));
  color: #d1d5db;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 2rem;
  padding: 3rem 0;
}

.footer-grid h3 {
  color: white;
  font-weight: 800;
  margin-bottom: 1rem;
}

.footer-grid p,
.footer-grid a {
  color: #9ca3af;
  line-height: 1.8;
  font-size: 0.9rem;
}

.footer-grid a:hover {
  color: #67e8f9;
}

.footer-links {
  display: grid;
  gap: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid #334155;
  padding: 1.25rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: #9ca3af;
  font-size: 0.875rem;
}

.empty-state {
  display: none;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--gray-500);
}

.empty-state.show {
  display: block;
}

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

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

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

  .detail-side {
    grid-template-columns: 14rem 1fr;
  }
}

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

  .mobile-button {
    display: inline-flex;
  }

  .hero {
    height: 68vh;
    min-height: 30rem;
  }

  .hero-content {
    padding-bottom: 3rem;
  }

  .hero-copy p {
    font-size: 1rem;
  }

  .section {
    padding: 3rem 0;
  }

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

  .feature-grid,
  .list-grid,
  .category-grid,
  .footer-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

  .list-thumb {
    width: 7.5rem;
  }

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

  .detail-poster {
    max-width: 16rem;
  }
}

@media (max-width: 520px) {
  .site-container {
    width: min(100% - 1rem, 80rem);
  }

  .logo {
    font-size: 1.05rem;
  }

  .hero-nav {
    display: none;
  }

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

  .card-body {
    padding: 0.7rem;
  }

  .list-card {
    align-items: stretch;
  }
}
