:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-solid: #111827;
  --line: rgba(59, 130, 246, 0.24);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --dim: #94a3b8;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --blue: #2563eb;
  --gold: #facc15;
  --danger: #fb7185;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 10% 0%, rgba(34, 211, 238, 0.16), transparent 32rem),
    radial-gradient(circle at 90% 10%, rgba(37, 99, 235, 0.22), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #000000 100%);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

img,
video {
  display: block;
  max-width: 100%;
}

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 64, 175, 0.9), rgba(15, 23, 42, 0.96));
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.logo-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #00111a;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), #60a5fa);
  box-shadow: 0 0 26px rgba(34, 211, 238, 0.42);
}

.logo-text {
  font-size: 24px;
  background: linear-gradient(90deg, #67e8f9, #93c5fd);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav,
.mobile-nav {
  align-items: center;
  gap: 26px;
}

.desktop-nav {
  display: flex;
}

.nav-link {
  color: #dbeafe;
  font-weight: 650;
  transition: color 0.22s ease, transform 0.22s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--cyan);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.55);
  color: var(--text);
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 99px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  flex-direction: column;
  align-items: flex-start;
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0.72) 36%, rgba(2, 6, 23, 0.12) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.18));
}

.hero-content {
  position: absolute;
  left: max(32px, calc((100% - 1180px) / 2));
  right: max(32px, calc((100% - 1180px) / 2));
  bottom: clamp(56px, 10vw, 112px);
  max-width: 760px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  color: #67e8f9;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1,
.hero-content h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.045em;
  text-shadow: 0 12px 34px rgba(0, 0, 0, 0.52);
}

.hero-content p,
.page-hero p,
.detail-one-line {
  max-width: 720px;
  margin: 18px 0 0;
  color: #e2e8f0;
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.75;
}

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

.hero-tags,
.detail-tags {
  margin-top: 22px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  color: #cffafe;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  background: rgba(8, 47, 73, 0.42);
}

.tag-row span {
  min-height: 24px;
  padding: 3px 9px;
  color: #bae6fd;
  font-size: 12px;
}

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

.primary-button,
.secondary-button,
.ghost-button,
.hero-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.24s ease, background 0.24s ease, box-shadow 0.24s ease;
}

.primary-button,
.hero-search button {
  color: white;
  background: linear-gradient(135deg, var(--cyan-strong), var(--blue));
  box-shadow: 0 16px 36px rgba(6, 182, 212, 0.32);
}

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

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.hero-search button:hover {
  transform: translateY(-2px) scale(1.02);
}

.hero-dots {
  position: absolute;
  right: max(32px, calc((100% - 1180px) / 2));
  bottom: 38px;
  display: flex;
  gap: 10px;
}

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

.hero-dot.is-active {
  width: 40px;
  background: var(--cyan);
}

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

main > .hero-carousel {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}

.intro-search,
.page-hero,
.movie-detail-head,
.player-section,
.detail-block,
.filter-panel,
.category-card,
.movie-card,
.wide-card,
.ranking-item {
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.42));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.intro-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 26px;
  align-items: center;
  margin: -42px auto 70px;
  padding: clamp(22px, 4vw, 36px);
  border-radius: var(--radius);
  position: relative;
  z-index: 5;
}

.intro-search h2,
.section-head h2,
.detail-block h2,
.player-section h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.03em;
}

.intro-search p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.hero-search {
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.74);
}

.hero-search input,
.search-field input,
.filter-panel select {
  width: 100%;
  min-height: 46px;
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.18);
  outline: none;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.74);
}

.hero-search input {
  border: 0;
  padding: 0 16px;
}

.hero-search input::placeholder,
.search-field input::placeholder {
  color: #64748b;
}

.content-section {
  margin: 72px 0;
}

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

.section-head > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #082f49;
  border-radius: 14px;
  background: linear-gradient(135deg, #facc15, #22d3ee);
  font-weight: 900;
}

.section-more,
.category-enter {
  color: var(--cyan);
  font-weight: 800;
}

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

.featured-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover,
.wide-card:hover,
.ranking-item:hover,
.category-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.44);
  box-shadow: 0 28px 80px rgba(6, 182, 212, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
}

.poster-link img,
.wide-poster img,
.rank-thumb img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .poster-link img,
.wide-card:hover .wide-poster img,
.ranking-item:hover .rank-thumb img,
.detail-poster:hover img {
  transform: scale(1.08);
}

.movie-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  color: #06202a;
  border-radius: 999px;
  background: rgba(103, 232, 249, 0.92);
  font-size: 12px;
  font-weight: 900;
}

.movie-card-body {
  padding: 16px;
}

.movie-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--dim);
  font-size: 13px;
}

.movie-meta-line span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: #475569;
}

.movie-card h3,
.wide-card h3,
.ranking-item h3 {
  margin: 8px 0 8px;
  color: white;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover,
.wide-card h3 a:hover,
.ranking-item h3 a:hover {
  color: var(--cyan);
}

.movie-card p,
.wide-card p,
.ranking-item p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.6;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-card {
  position: relative;
  min-height: 178px;
  overflow: hidden;
  padding: 24px;
  border-radius: 24px;
}

.category-card.large {
  min-height: 220px;
}

.category-glow {
  position: absolute;
  right: -40px;
  top: -40px;
  width: 132px;
  height: 132px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.35), transparent 70%);
}

.category-card strong {
  position: relative;
  display: block;
  margin-bottom: 12px;
  font-size: 24px;
}

.category-card p {
  position: relative;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.category-enter {
  position: absolute;
  left: 24px;
  bottom: 22px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 28px;
  align-items: start;
}

.ranking-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-item {
  display: grid;
  grid-template-columns: 56px 74px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.rank-num {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  color: #020617;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--gold), var(--cyan));
  font-weight: 900;
}

.rank-thumb {
  width: 74px;
  height: 98px;
  overflow: hidden;
  border-radius: 14px;
  background: #0f172a;
}

.rank-info h3 {
  margin-top: 0;
}

.rank-info p {
  -webkit-line-clamp: 2;
}

.full-ranking .ranking-item {
  grid-template-columns: 72px 94px minmax(0, 1fr);
}

.full-ranking .rank-thumb {
  width: 94px;
  height: 124px;
}

.wide-stack {
  display: grid;
  gap: 16px;
}

.wide-card {
  display: grid;
  grid-template-columns: 35% minmax(0, 1fr);
  overflow: hidden;
  border-radius: 22px;
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.wide-poster {
  min-height: 210px;
  overflow: hidden;
  background: #0f172a;
}

.wide-body {
  padding: 22px;
}

.page-main {
  padding: 34px 0 80px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 8px 0 22px;
  color: var(--dim);
}

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

.page-hero {
  padding: clamp(28px, 5vw, 54px);
  border-radius: 28px;
}

.compact-hero h1 {
  font-size: clamp(34px, 6vw, 58px);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin: 28px 0;
  padding: 18px;
  border-radius: 24px;
}

.search-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.search-field input,
.filter-panel select {
  padding: 0 16px;
}

.select-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-panel select {
  width: auto;
  min-width: 138px;
}

.empty-state {
  display: none;
  margin: 30px 0 0;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 20px;
}

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

.movie-detail-head {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  gap: clamp(22px, 5vw, 44px);
  align-items: center;
  padding: clamp(22px, 4vw, 38px);
  border-radius: 30px;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.detail-info h1 {
  font-size: clamp(38px, 6vw, 70px);
}

.player-section {
  margin: 38px 0;
  padding: clamp(18px, 4vw, 28px);
  border-radius: 28px;
}

.player-section h2 {
  margin-bottom: 18px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 28px 80px rgba(0, 0, 0, 0.4);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  display: grid;
  width: clamp(72px, 12vw, 104px);
  height: clamp(72px, 12vw, 104px);
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.96), rgba(37, 99, 235, 0.96));
  box-shadow: 0 20px 60px rgba(6, 182, 212, 0.38);
  transform: translate(-50%, -50%);
  transition: transform 0.24s ease, opacity 0.24s ease;
}

.play-button span {
  margin-left: 5px;
  font-size: clamp(30px, 5vw, 42px);
}

.play-button:hover {
  transform: translate(-50%, -50%) scale(1.07);
}

.play-button.is-hidden {
  opacity: 0;
  pointer-events: none;
}

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

.detail-block {
  padding: clamp(22px, 4vw, 34px);
  border-radius: 26px;
}

.detail-block p {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.9;
}

.related-grid {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.68);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  color: var(--dim);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a:hover,
.footer-logo:hover {
  color: var(--cyan);
}

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

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

  .menu-button {
    display: block;
  }

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

  .intro-search,
  .split-layout,
  .filter-panel,
  .movie-detail-head,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }

  .hero-search,
  .select-row {
    width: 100%;
  }

  .filter-panel select,
  .ghost-button {
    flex: 1 1 150px;
  }
}

@media (max-width: 640px) {
  .nav-wrap {
    height: 62px;
  }

  .logo-text {
    font-size: 20px;
  }

  .hero-carousel {
    height: 72vh;
    min-height: 560px;
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 78px;
  }

  .hero-dots {
    left: 20px;
    right: auto;
    bottom: 30px;
  }

  .intro-search {
    margin-top: -28px;
  }

  .hero-search {
    flex-direction: column;
    border-radius: 24px;
  }

  .hero-search button {
    width: 100%;
  }

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

  .movie-card-body {
    padding: 12px;
  }

  .movie-card h3 {
    font-size: 16px;
  }

  .movie-card p,
  .tag-row {
    display: none;
  }

  .wide-card,
  .ranking-item,
  .full-ranking .ranking-item {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .wide-poster,
  .rank-thumb,
  .full-ranking .rank-thumb {
    display: none;
  }

  .rank-info p {
    -webkit-line-clamp: 1;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
