:root {
  --bg: #f6fbff;
  --text: #172033;
  --muted: #65738a;
  --line: rgba(15, 23, 42, 0.1);
  --cyan: #06b6d4;
  --blue: #2563eb;
  --pink: #db2777;
  --yellow: #facc15;
  --dark: #0f172a;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(6, 182, 212, 0.18), transparent 30rem),
    linear-gradient(135deg, #f8fafc 0%, #ecfeff 52%, #fdf2f8 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
}

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(203, 213, 225, 0.7);
  backdrop-filter: blur(14px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--pink));
  box-shadow: 0 12px 25px rgba(6, 182, 212, 0.3);
}

.brand-text {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #0891b2, #db2777);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  font-weight: 700;
  color: #334155;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #0891b2;
}

.top-search {
  display: flex;
  align-items: center;
  width: min(320px, 28vw);
}

.top-search input,
.mobile-search input,
.search-page-form input,
.filter-bar input,
.filter-bar select,
.search-page-form select {
  border: 1px solid #cbd5e1;
  color: #1e293b;
  background: #fff;
  outline: none;
}

.top-search input {
  width: 100%;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px 0 0 999px;
}

.top-search button {
  height: 42px;
  padding: 0 16px;
  color: #fff;
  border: 0;
  border-radius: 0 999px 999px 0;
  background: var(--cyan);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #0f172a;
  background: transparent;
  font-size: 1.65rem;
}

.mobile-panel {
  display: none;
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto 18px;
  padding: 18px;
  border: 1px solid rgba(203, 213, 225, 0.7);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

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

.mobile-link {
  display: block;
  padding: 10px 0;
  font-weight: 800;
  color: #334155;
}

.mobile-link.is-active {
  color: #0891b2;
}

.mobile-search {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.mobile-search input {
  flex: 1;
  height: 42px;
  border-radius: 999px;
  padding: 0 16px;
}

.mobile-search button {
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  color: #fff;
  background: var(--cyan);
}

.hero {
  position: relative;
  min-height: clamp(480px, 64vw, 640px);
  overflow: hidden;
  background: #0f172a;
}

.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-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.18)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.82), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1220px, calc(100% - 32px));
  min-height: clamp(480px, 64vw, 640px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 1220px;
  color: #fff;
}

.hero-kicker,
.section-kicker,
.page-hero span {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin-bottom: 16px;
  color: var(--yellow);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 720px;
  margin: 0 0 24px;
  color: #e2e8f0;
  font-size: clamp(1rem, 1.9vw, 1.35rem);
  line-height: 1.8;
}

.hero-tags,
.detail-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.12);
  color: #0891b2;
  padding: 6px 11px;
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-tags span {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

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

.primary-btn {
  color: #fff;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 36px rgba(6, 182, 212, 0.32);
}

.ghost-btn {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

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

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

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

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

.category-strip {
  position: relative;
  z-index: 3;
  margin-top: -28px;
}

.strip-inner {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.strip-inner a {
  padding: 9px 16px;
  border-radius: 999px;
  color: #0f766e;
  background: #ecfeff;
  font-weight: 900;
  transition: background 0.2s ease, color 0.2s ease;
}

.strip-inner a:hover {
  color: #fff;
  background: var(--cyan);
}

.section-block,
.category-grid-wrap,
.search-panel,
.detail-content {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

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

.section-heading.compact {
  align-items: center;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-heading a {
  color: #0891b2;
  font-weight: 900;
}

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

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
}

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

.movie-card.large .poster-wrap {
  aspect-ratio: 16 / 9;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 44%, rgba(15, 23, 42, 0.72));
}

.type-badge,
.duration-badge,
.rank-num {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 900;
}

.type-badge {
  top: 12px;
  left: 12px;
  padding: 6px 10px;
  background: rgba(6, 182, 212, 0.92);
}

.duration-badge {
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
  background: rgba(15, 23, 42, 0.72);
}

.rank-num {
  top: 12px;
  right: 12px;
  min-width: 42px;
  padding: 8px 10px;
  text-align: center;
  background: linear-gradient(135deg, var(--yellow), #f97316);
}

.card-body {
  padding: 18px;
}

.card-title {
  display: block;
  margin-bottom: 9px;
  color: #111827;
  font-size: 1.05rem;
  font-weight: 950;
  line-height: 1.35;
}

.card-title:hover {
  color: #0891b2;
}

.card-desc {
  min-height: 3.2em;
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: #64748b;
  font-size: 0.84rem;
}

.card-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

.tag-row span {
  font-size: 0.76rem;
  padding: 4px 8px;
}

.split-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
  align-items: start;
}

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(145deg, #0f172a, #164e63);
  color: #fff;
  box-shadow: var(--shadow);
}

.rank-title {
  margin-bottom: 18px;
  font-size: 1.5rem;
  font-weight: 950;
}

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

.rank-link {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease;
}

.rank-link:hover {
  background: rgba(255, 255, 255, 0.16);
}

.rank-link span {
  color: var(--yellow);
  font-weight: 950;
}

.rank-link strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-link em {
  color: #a5f3fc;
  font-style: normal;
  font-weight: 900;
}

.cta-band {
  width: min(1220px, calc(100% - 32px));
  margin: 20px auto 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: clamp(28px, 5vw, 56px);
  border-radius: 30px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 26px 55px rgba(37, 99, 235, 0.25);
}

.cta-band h2 {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 950;
  letter-spacing: -0.05em;
}

.cta-band p {
  margin: 0;
  color: #e0f2fe;
  font-size: 1.05rem;
}

.white-btn {
  color: #0891b2;
  background: #fff;
  flex-shrink: 0;
}

.page-hero {
  padding: 78px 16px 64px;
  color: #fff;
  text-align: center;
  background: linear-gradient(135deg, #0891b2, #2563eb 58%, #db2777);
}

.page-hero.slim {
  padding: 58px 16px 50px;
}

.page-hero > div {
  width: min(880px, 100%);
  margin: 0 auto;
}

.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2.3rem, 5vw, 4rem);
  line-height: 1;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.page-hero p {
  margin: 0;
  color: #e0f2fe;
  font-size: 1.08rem;
  line-height: 1.8;
}

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

.category-card {
  padding: 24px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.category-card a:first-child {
  display: block;
}

.category-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 18px;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 950;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
}

.category-card h2 {
  margin: 0 0 10px;
  font-size: 1.45rem;
  font-weight: 950;
}

.category-card p {
  min-height: 3.6em;
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.7;
}

.category-card strong {
  color: #0891b2;
}

.category-samples {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.category-samples a {
  overflow: hidden;
  color: #334155;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.category-samples a:hover {
  color: #0891b2;
}

.filter-bar,
.search-page-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 14px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.filter-bar input,
.filter-bar select,
.search-page-form input,
.search-page-form select {
  min-height: 46px;
  border-radius: 999px;
  padding: 0 16px;
}

.search-page-form {
  grid-template-columns: minmax(220px, 1fr) 180px 120px;
}

.search-page-form button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 900;
  background: var(--cyan);
}

.search-summary {
  margin-bottom: 20px;
  color: #475569;
  font-weight: 900;
}

.movie-detail-hero {
  padding: 34px 0 60px;
  background:
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.18), transparent 30rem),
    linear-gradient(180deg, #f8fafc, #ecfeff);
}

.breadcrumb {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 0.95rem;
}

.breadcrumb a {
  color: #0891b2;
  font-weight: 800;
}

.detail-layout {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(320px, 0.58fr);
  gap: 30px;
  align-items: stretch;
}

.player-shell,
.detail-copy,
.detail-content article {
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.player-shell {
  padding: 16px;
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 22px;
  background: #020617;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.62));
}

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

.player-overlay span {
  width: clamp(68px, 9vw, 96px);
  height: clamp(68px, 9vw, 96px);
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-size: clamp(2rem, 4vw, 3.2rem);
  box-shadow: 0 18px 42px rgba(6, 182, 212, 0.42);
}

.detail-copy {
  padding: clamp(24px, 3.5vw, 38px);
}

.detail-category {
  display: inline-flex;
  margin-bottom: 16px;
  color: #0891b2;
  font-weight: 950;
}

.detail-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.05em;
}

.detail-line {
  margin: 0 0 22px;
  color: #475569;
  line-height: 1.85;
  font-size: 1.05rem;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 22px;
}

.detail-meta div {
  padding: 12px;
  border-radius: 16px;
  background: #f8fafc;
}

.detail-meta dt {
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 900;
}

.detail-meta dd {
  margin: 4px 0 0;
  color: #0f172a;
  font-weight: 900;
}

.detail-content {
  display: grid;
  gap: 24px;
}

.detail-content article {
  padding: clamp(24px, 4vw, 40px);
}

.detail-content h2 {
  margin: 0 0 16px;
  font-size: clamp(1.45rem, 3vw, 2rem);
  font-weight: 950;
}

.detail-content p {
  margin: 0;
  color: #334155;
  font-size: 1.05rem;
  line-height: 1.95;
}

.related-section {
  padding-top: 16px;
}

.site-footer {
  margin-top: 44px;
  color: #e2e8f0;
  background: linear-gradient(135deg, #0f172a, #0c4a6e 55%, #111827);
}

.footer-grid {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 30px;
}

.footer-brand {
  margin-bottom: 12px;
  font-size: 1.35rem;
  font-weight: 950;
  color: #fff;
}

.site-footer p {
  max-width: 480px;
  margin: 0;
  color: #cbd5e1;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 1.05rem;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.site-footer a {
  color: #cbd5e1;
}

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

.footer-bottom {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  color: #94a3b8;
  text-align: center;
}

[data-card].is-hidden {
  display: none;
}

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

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

  .rank-panel {
    position: static;
  }

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

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

  .menu-toggle {
    display: block;
  }

  .header-inner {
    min-height: 64px;
  }

  .hero,
  .hero-content {
    min-height: 560px;
  }

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

  .section-heading,
  .cta-band,
  .footer-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-grid {
    display: grid;
  }

  .filter-bar,
  .search-page-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .brand-text {
    font-size: 1.08rem;
  }

  .hero,
  .hero-content {
    min-height: 520px;
  }

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

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

  .card-desc {
    min-height: auto;
  }
}
