:root {
  color-scheme: dark;
  --bg: #0f172a;
  --panel: rgba(30, 41, 59, 0.82);
  --panel-solid: #1e293b;
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #06b6d4;
  --cyan-soft: rgba(6, 182, 212, 0.18);
  --amber: #f59e0b;
}

html {
  scroll-behavior: smooth;
}

body {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
  color: var(--text);
  min-height: 100vh;
}

img {
  background: #111827;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  color: #ffffff;
  font-size: 14px;
  box-shadow: 0 0 24px rgba(6, 182, 212, 0.38);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
}

.desktop-nav a,
.mobile-nav a {
  color: #cbd5e1;
  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: #67e8f9;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.8);
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: #ffffff;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px 18px;
}

.mobile-nav a {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.56);
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 560px;
  overflow: hidden;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 45%, rgba(6, 182, 212, 0.26), transparent 32%),
    linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.78) 42%, rgba(15, 23, 42, 0.42) 100%);
}

.hero-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(720px, 100%);
  padding-top: 48px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #67e8f9;
  background: rgba(8, 145, 178, 0.28);
  border: 1px solid rgba(34, 211, 238, 0.32);
  font-weight: 700;
}

.hero h1 {
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  font-weight: 900;
  margin-bottom: 18px;
  text-shadow: 0 18px 40px rgba(0, 0, 0, 0.38);
}

.hero p {
  font-size: clamp(17px, 2.2vw, 22px);
  color: #d1d5db;
  line-height: 1.75;
  margin-bottom: 22px;
  max-width: 760px;
}

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

.hero-meta span,
.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 10px;
  color: #cbd5e1;
  background: rgba(51, 65, 85, 0.78);
  font-size: 12px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 28px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  padding: 13px 22px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  color: #ffffff;
  box-shadow: 0 16px 36px rgba(6, 182, 212, 0.26);
}

.ghost-button {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.48);
  border: 1px solid rgba(148, 163, 184, 0.28);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 6;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.45);
  color: #ffffff;
  font-size: 36px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

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

.quick-search-panel,
.page-section,
.ranking-section,
.detail-layout {
  margin-top: 56px;
}

.quick-search-panel {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 28px;
  align-items: center;
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.32), rgba(22, 78, 99, 0.3));
  border: 1px solid rgba(34, 211, 238, 0.16);
}

.quick-search-panel h2,
.section-head h2,
.page-hero h1,
.detail-article h2,
.side-card h2 {
  font-weight: 900;
  color: #ffffff;
}

.quick-search-panel h2,
.section-head h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.quick-search-panel p,
.section-head p,
.page-hero-text,
.category-card p,
.detail-one-line,
.detail-article p,
.side-card dd,
.site-footer p {
  color: #cbd5e1;
  line-height: 1.75;
}

.search-form {
  display: flex;
  gap: 10px;
  width: 100%;
}

.search-form input {
  flex: 1;
  min-width: 0;
  height: 48px;
  border-radius: 14px;
  padding: 0 16px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #ffffff;
  outline: none;
}

.search-form input:focus {
  border-color: rgba(34, 211, 238, 0.72);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.16);
}

.search-form button {
  border-radius: 14px;
  padding: 0 18px;
  background: #0891b2;
  color: #ffffff;
  font-weight: 800;
}

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

.section-head a {
  color: #22d3ee;
  font-weight: 800;
}

.small-head h3 {
  color: #ffffff;
  font-size: 22px;
  font-weight: 850;
}

.movie-grid {
  display: grid;
  gap: 18px;
}

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

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

.movie-card {
  background: var(--panel);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.46);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
}

.movie-card a {
  display: block;
  height: 100%;
}

.card-poster {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #020617;
}

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

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

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

.card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.92);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.card-info {
  padding: 16px;
}

.card-info h3 {
  color: #ffffff;
  font-weight: 850;
  font-size: 18px;
  line-height: 1.35;
  margin-bottom: 8px;
}

.card-info p {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.6;
  min-height: 44px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card.compact .card-info p {
  display: none;
}

.card-meta {
  margin-top: 12px;
  font-size: 12px;
  color: #94a3b8;
}

.card-meta span:not(:last-child)::after {
  content: '·';
  margin-left: 10px;
  color: rgba(148, 163, 184, 0.5);
}

.category-panel {
  padding: 32px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.28), rgba(22, 78, 99, 0.24));
  border: 1px solid rgba(34, 211, 238, 0.12);
}

.category-list {
  display: grid;
  gap: 36px;
}

.inner-page {
  padding-bottom: 48px;
}

.page-hero {
  text-align: center;
  padding: 64px 0 20px;
}

.compact-hero p:first-child {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--cyan-soft);
  color: #67e8f9;
  border: 1px solid rgba(34, 211, 238, 0.22);
  font-weight: 800;
}

.page-hero h1 {
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.1;
  margin-bottom: 16px;
}

.page-hero-text {
  width: min(720px, 100%);
  margin: 0 auto 22px;
}

.center-actions,
.center-search {
  justify-content: center;
  width: min(620px, 100%);
  margin-left: auto;
  margin-right: auto;
}

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

.category-card {
  overflow: hidden;
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.14);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.42);
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: 150px;
  overflow: hidden;
}

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

.category-card-body {
  padding: 22px;
}

.category-card h2 {
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 8px;
}

.category-card span {
  display: inline-flex;
  margin-top: 16px;
  color: #22d3ee;
  font-weight: 800;
}

.ranking-section {
  display: grid;
  gap: 14px;
}

.ranking-row {
  border-radius: 18px;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.ranking-row a {
  display: grid;
  grid-template-columns: 64px 130px 1fr;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.rank-number {
  display: inline-flex;
  justify-content: center;
  font-size: 28px;
  color: #22d3ee;
  font-weight: 900;
}

.ranking-row img {
  width: 130px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
}

.ranking-row h2 {
  color: #ffffff;
  font-weight: 900;
  font-size: 22px;
  margin-bottom: 6px;
}

.ranking-row p {
  color: #cbd5e1;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-detail-hero {
  position: relative;
  min-height: 560px;
  overflow: hidden;
}

.detail-bg,
.detail-mask {
  position: absolute;
  inset: 0;
}

.detail-mask {
  background:
    radial-gradient(circle at 28% 50%, rgba(6, 182, 212, 0.2), transparent 34%),
    linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.84) 42%, rgba(15, 23, 42, 0.56) 100%);
}

.detail-hero-grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 36px;
  align-items: end;
  padding-top: 96px;
  padding-bottom: 56px;
}

.detail-poster {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb a {
  color: #67e8f9;
}

.detail-intro h1 {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
  font-weight: 950;
  margin-bottom: 16px;
}

.detail-one-line {
  font-size: 20px;
  max-width: 820px;
  margin-bottom: 18px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  border: 1px solid rgba(34, 211, 238, 0.16);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.32);
}

.player-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

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

.player-cover-shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.46);
}

.player-play-icon {
  position: relative;
  z-index: 2;
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding-left: 5px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  color: #ffffff;
  font-size: 32px;
  box-shadow: 0 0 35px rgba(6, 182, 212, 0.45);
}

.detail-article,
.side-card {
  margin-top: 24px;
  border-radius: 24px;
  background: rgba(30, 41, 59, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.14);
  padding: 26px;
}

.detail-article h2 {
  font-size: 26px;
  margin: 12px 0 14px;
}

.detail-article p + p {
  margin-top: 14px;
}

.detail-side {
  position: relative;
}

.side-card {
  position: sticky;
  top: 88px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 12px;
  margin-top: 16px;
}

.side-card dt {
  color: #94a3b8;
}

.side-card dd {
  color: #ffffff;
}

.side-tags {
  margin-top: 22px;
}

.empty-result {
  display: none;
  margin-top: 24px;
  padding: 32px;
  text-align: center;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.72);
  color: #cbd5e1;
}

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

.site-footer {
  margin-top: 72px;
  background: rgba(15, 23, 42, 0.96);
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding: 42px 0;
}

.site-footer h2 {
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 14px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

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

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  padding: 18px 0;
  text-align: center;
  color: #94a3b8;
}

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

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

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

  .side-card {
    position: static;
  }
}

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

  .menu-toggle {
    display: flex;
  }

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

  .hero {
    min-height: 620px;
    height: 78vh;
  }

  .hero-arrow {
    display: none;
  }

  .quick-search-panel {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

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

  .detail-hero-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .detail-poster {
    width: min(260px, 72vw);
  }

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

  .ranking-row a {
    grid-template-columns: 42px 96px 1fr;
    gap: 12px;
  }

  .ranking-row img {
    width: 96px;
  }
}

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

  .hero h1,
  .detail-intro h1,
  .page-hero h1 {
    font-size: 34px;
  }

  .hero p,
  .detail-one-line {
    font-size: 16px;
  }

  .hero-actions,
  .search-form {
    flex-direction: column;
    align-items: stretch;
  }

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

  .category-panel {
    padding: 22px;
  }

  .ranking-row a {
    grid-template-columns: 34px 1fr;
  }

  .ranking-row img {
    display: none;
  }
}
