:root {
  --dark: #0a0e1a;
  --dark-lighter: #131827;
  --panel: rgba(15, 23, 42, 0.58);
  --panel-strong: rgba(15, 23, 42, 0.86);
  --primary: #0284c7;
  --primary-light: #38bdf8;
  --primary-soft: rgba(56, 189, 248, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --border: rgba(14, 165, 233, 0.24);
  --shadow-glow: 0 0 20px rgba(56, 189, 248, 0.3);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 34rem),
    radial-gradient(circle at top right, rgba(2, 132, 199, 0.10), transparent 30rem),
    var(--dark);
  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;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

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

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(10, 14, 26, 0.94);
  border-bottom: 1px solid rgba(14, 165, 233, 0.22);
  backdrop-filter: blur(18px);
}

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #ffffff;
  box-shadow: var(--shadow-glow);
  font-size: 15px;
}

.brand-text strong,
.footer-brand {
  display: block;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.03em;
  font-weight: 800;
}

.brand-text small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  color: var(--muted-strong);
  font-weight: 600;
  transition: color 180ms ease, text-shadow 180ms ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--primary-light);
  text-shadow: 0 0 18px rgba(56, 189, 248, 0.45);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-form input {
  width: 220px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  color: var(--text);
  padding: 10px 14px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.search-form input:focus,
.filter-input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.search-form button,
.primary-button,
.secondary-button,
.hero-control,
.filter-chip,
.player-start {
  border: 0;
  cursor: pointer;
}

.search-form button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), #0369a1);
  color: #ffffff;
  padding: 10px 18px;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(2, 132, 199, 0.24);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.search-form button:hover,
.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted-strong);
  padding: 10px 18px;
  font-weight: 700;
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  color: var(--text);
}

.mobile-panel {
  display: none;
  padding: 16px;
  border-top: 1px solid var(--border);
  background: rgba(10, 14, 26, 0.98);
}

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

.mobile-panel nav {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.mobile-panel .nav-link {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.45);
}

main {
  padding-top: 72px;
}

.hero {
  position: relative;
  height: 80vh;
  min-height: 560px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms 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-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--dark) 0%, rgba(10, 14, 26, 0.72) 45%, rgba(10, 14, 26, 0.28) 100%),
    linear-gradient(to right, rgba(10, 14, 26, 0.78), transparent 68%);
}

.hero-content {
  position: absolute;
  inset: auto 0 0 0;
  padding-bottom: 82px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  color: var(--primary-light);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.hero h2 {
  margin: 14px 0 18px;
  max-width: 760px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-shadow: 0 8px 34px rgba(0, 0, 0, 0.65);
}

.hero p {
  max-width: 680px;
  color: var(--muted-strong);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-meta,
.meta-row,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta {
  margin: 24px 0;
}

.hero-meta span,
.meta-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--muted-strong);
  padding: 8px 12px;
  font-size: 14px;
}

.hero-meta span:first-child,
.tag-pill {
  background: rgba(2, 132, 199, 0.85);
  border-color: rgba(56, 189, 248, 0.35);
  color: #ffffff;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(10, 14, 26, 0.58);
  border: 1px solid var(--border);
  color: #ffffff;
  font-size: 28px;
  backdrop-filter: blur(10px);
}

.hero-control:hover {
  background: rgba(2, 132, 199, 0.8);
}

.hero-control.prev {
  left: 20px;
}

.hero-control.next {
  right: 20px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #64748b;
  cursor: pointer;
  transition: width 180ms ease, background 180ms ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--primary-light);
}

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

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-desc {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card,
.featured-card,
.category-card,
.rank-item,
.info-panel,
.player-shell,
.poster-panel {
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
}

.movie-link,
.featured-link,
.category-card {
  display: block;
  height: 100%;
}

.movie-card,
.category-card,
.rank-item,
.info-panel,
.player-shell,
.poster-panel {
  overflow: hidden;
  border-radius: 20px;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.movie-card:hover,
.category-card:hover,
.rank-item:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.52);
  box-shadow: var(--shadow-glow);
}

.poster-wrap,
.featured-cover {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(2, 132, 199, 0.18));
}

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

.featured-cover {
  min-height: 260px;
  flex: 0 0 40%;
}

.poster-wrap img,
.featured-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

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

.poster-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 14, 26, 0.88), rgba(10, 14, 26, 0.1), transparent);
}

.play-float {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.9);
  color: #ffffff;
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
}

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

.type-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.type-badge {
  top: 12px;
  right: 12px;
  background: rgba(10, 14, 26, 0.78);
  padding: 6px 10px;
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.movie-info {
  padding: 15px;
}

.movie-info h3,
.featured-content h3 {
  margin: 0;
  color: #ffffff;
  font-weight: 800;
  line-height: 1.35;
  transition: color 180ms ease;
}

.movie-info h3 {
  display: -webkit-box;
  min-height: 2.7em;
  overflow: hidden;
  font-size: 16px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card:hover h3,
.featured-card:hover h3,
.rank-item:hover h3 {
  color: var(--primary-light);
}

.card-meta {
  justify-content: space-between;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.movie-info p {
  display: -webkit-box;
  min-height: 2.6em;
  margin: 9px 0 0;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.featured-list {
  display: grid;
  gap: 22px;
}

.featured-link {
  display: flex;
}

.featured-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
}

.featured-content h3 {
  margin-top: 9px;
  font-size: 28px;
}

.featured-content p {
  display: -webkit-box;
  margin: 14px 0 22px;
  overflow: hidden;
  color: var(--muted-strong);
  line-height: 1.8;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

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

.category-card {
  padding: 24px;
  min-height: 190px;
  background:
    linear-gradient(145deg, rgba(2, 132, 199, 0.22), rgba(15, 23, 42, 0.65)),
    var(--panel);
}

.category-card span {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.18);
  color: var(--primary-light);
  font-size: 22px;
}

.category-card h3 {
  margin: 22px 0 10px;
  font-size: 24px;
}

.category-card p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.7;
}

.page-hero {
  padding: 130px 0 50px;
  background:
    radial-gradient(circle at 18% 20%, rgba(56, 189, 248, 0.18), transparent 28rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.58), transparent);
}

.page-hero h1 {
  margin: 10px 0 14px;
  font-size: clamp(38px, 7vw, 66px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.8;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 26px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.48);
  padding: 16px;
}

.filter-input {
  width: min(420px, 100%);
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(10, 14, 26, 0.72);
  color: var(--text);
  padding: 12px 16px;
  outline: none;
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  color: var(--muted-strong);
  padding: 10px 14px;
  border: 1px solid var(--border);
}

.filter-chip.is-active,
.filter-chip:hover {
  background: rgba(2, 132, 199, 0.78);
  color: #ffffff;
}

.empty-state {
  display: none;
  margin: 26px 0;
  border: 1px dashed var(--border);
  border-radius: 20px;
  color: var(--muted);
  padding: 28px;
  text-align: center;
}

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

.ranking-list {
  display: grid;
  gap: 16px;
}

.rank-item a {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
}

.rank-index {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(56, 189, 248, 0.16);
  color: var(--primary-light);
  font-weight: 900;
}

.rank-thumb {
  width: 72px;
  height: 96px;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
}

.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rank-main {
  min-width: 0;
}

.rank-main h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

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

.detail-page {
  padding-top: 112px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(290px, 0.8fr);
  gap: 28px;
  align-items: start;
}

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

.player-shell video {
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: contain;
}

.player-start {
  position: absolute;
  inset: 50% auto auto 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.92);
  color: #ffffff;
  padding: 15px 24px;
  font-weight: 900;
  transform: translate(-50%, -50%);
  box-shadow: var(--shadow-glow);
}

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

.player-note {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.poster-panel {
  padding: 18px;
}

.poster-panel img {
  width: 100%;
  border-radius: 16px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.8);
}

.detail-title {
  margin: 24px 0 12px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.detail-one-line {
  color: var(--muted-strong);
  font-size: 19px;
  line-height: 1.8;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.tag-pill {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.detail-sections {
  display: grid;
  gap: 22px;
  margin-top: 28px;
}

.info-panel {
  padding: 24px;
}

.info-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.info-panel p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.9;
}

.search-results-title {
  margin-top: 20px;
  color: var(--muted-strong);
}

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

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

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

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

  .hero {
    height: 68vh;
    min-height: 520px;
  }

  .hero-content {
    padding-bottom: 72px;
  }

  .hero-control {
    display: none;
  }

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

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

  .featured-link,
  .detail-layout {
    grid-template-columns: 1fr;
    display: grid;
  }

  .featured-cover {
    min-height: 320px;
  }
}

@media (max-width: 640px) {
  .site-container {
    width: min(100% - 24px, 1180px);
  }

  .header-inner {
    height: 64px;
  }

  main {
    padding-top: 64px;
  }

  .brand-text strong {
    font-size: 18px;
  }

  .brand-text small {
    display: none;
  }

  .hero {
    min-height: 540px;
  }

  .hero h1,
  .hero h2 {
    font-size: 40px;
  }

  .hero p {
    font-size: 16px;
  }

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

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

  .section-heading {
    display: block;
  }

  .featured-content {
    padding: 20px;
  }

  .featured-content h3 {
    font-size: 22px;
  }

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

  .rank-thumb {
    display: none;
  }

  .page-hero {
    padding-top: 100px;
  }
}
