@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Sans+SC:wght@400;500;700;900&display=swap');

:root {
  --bg: #080a12;
  --panel: rgba(16, 21, 34, 0.78);
  --panel-strong: #111827;
  --text: #f8fafc;
  --muted: #a5b4c7;
  --line: rgba(148, 163, 184, 0.16);
  --primary: #8b5cf6;
  --primary-dark: #6d28d9;
  --secondary: #f97316;
  --accent: #06b6d4;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(139, 92, 246, 0.26), transparent 32rem),
    radial-gradient(circle at 80% 10%, rgba(6, 182, 212, 0.18), transparent 28rem),
    linear-gradient(180deg, #090b14 0%, #0f172a 48%, #080a12 100%);
  color: var(--text);
  font-family: Inter, 'Noto Sans SC', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 10, 18, 0.76);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 74px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 12px 32px rgba(139, 92, 246, 0.35);
}

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

.main-nav,
.mobile-nav,
.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a,
.mobile-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
}

.main-nav a:hover,
.mobile-nav a:hover,
.main-nav a.active,
.mobile-nav a.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #ffffff;
}

.mobile-nav {
  display: none;
  padding: 0 24px 18px;
  justify-content: center;
  flex-wrap: wrap;
}

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

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #05060c;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 900ms ease, transform 900ms ease;
  transform: scale(1.02);
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 6, 12, 0.94) 0%, rgba(5, 6, 12, 0.66) 43%, rgba(5, 6, 12, 0.18) 100%),
    linear-gradient(0deg, #080a12 0%, transparent 42%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 84px;
  width: min(1280px, calc(100% - 48px));
  transform: translateX(-50%);
  max-width: 1280px;
}

.eyebrow,
.page-hero span,
.section-head span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.16);
  color: #fed7aa;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero-content h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(40px, 7vw, 82px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 720px;
  margin: 22px 0 0;
  color: #dbe4f0;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
}

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

.primary-button,
.ghost-button,
.quick-search button,
.search-page-form button,
.rank-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button,
.quick-search button,
.search-page-form button,
.rank-play {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 14px 36px rgba(139, 92, 246, 0.25);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-control {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.34);
  font-size: 38px;
  line-height: 0;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

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

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

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
}

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

.search-band,
.section-wrap,
.page-hero,
.detail-main,
.site-footer {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
}

.search-band {
  margin-top: -44px;
  position: relative;
  z-index: 3;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr minmax(280px, 520px);
  gap: 20px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 24, 39, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-band span {
  color: #c4b5fd;
  font-weight: 800;
}

.search-band h2 {
  margin: 8px 0 0;
  font-size: clamp(22px, 4vw, 34px);
}

.quick-search,
.search-page-form {
  display: flex;
  gap: 10px;
}

.quick-search input,
.search-page-form input,
.search-page-form select {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.search-page-form select {
  max-width: 180px;
}

.search-page-form option {
  color: #111827;
}

.section-wrap {
  padding: 72px 0 0;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-head a,
.text-link {
  color: #c4b5fd;
  font-weight: 800;
}

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

.category-tile {
  min-height: 170px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(139, 92, 246, 0.18), rgba(6, 182, 212, 0.08)),
    rgba(255, 255, 255, 0.05);
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.category-tile:hover,
.movie-card:hover,
.mini-card:hover,
.category-panel:hover,
.rank-row:hover {
  transform: translateY(-4px);
  border-color: rgba(196, 181, 253, 0.42);
}

.category-tile span,
.category-tile strong,
.category-tile small {
  display: block;
}

.category-tile span {
  font-size: 19px;
  font-weight: 900;
}

.category-tile strong {
  margin-top: 20px;
  font-size: 38px;
  color: #ffffff;
}

.category-tile small {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

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

.movie-card,
.mini-card,
.category-panel,
.rank-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  transition: transform 220ms ease, border-color 220ms ease;
}

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

.poster img,
.mini-card img,
.detail-poster img,
.rank-thumb img,
.category-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms ease;
}

.movie-card:hover .poster img,
.mini-card:hover img,
.category-panel:hover img,
.rank-row:hover img {
  transform: scale(1.06);
}

.poster-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.52);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

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

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.movie-card h2 {
  margin: 10px 0 7px;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.mini-card {
  padding: 10px;
  display: block;
}

.mini-card img {
  aspect-ratio: 2 / 3;
  border-radius: 18px;
  background: #111827;
}

.mini-card span,
.mini-card small {
  display: block;
}

.mini-card span {
  margin-top: 10px;
  font-weight: 900;
  line-height: 1.35;
}

.mini-card small {
  margin-top: 4px;
  color: var(--muted);
}

.page-main {
  padding: 50px 0 0;
}

.page-hero {
  min-height: 320px;
  padding: 58px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(139, 92, 246, 0.28), rgba(6, 182, 212, 0.10)),
    rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.page-hero p {
  max-width: 780px;
  margin: 18px 0 0;
  color: #dbe4f0;
  font-size: 18px;
  line-height: 1.8;
}

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

.category-panel {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  padding: 18px;
}

.category-cover {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  overflow: hidden;
  border-radius: 20px;
}

.category-cover img {
  aspect-ratio: 2 / 3;
}

.category-panel h2 {
  margin: 8px 0;
  font-size: 28px;
}

.category-panel p {
  color: var(--muted);
  line-height: 1.8;
}

.detail-main {
  padding: 36px 0 0;
}

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

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

.detail-hero {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 34px;
  align-items: center;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.22), transparent 24rem),
    rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  aspect-ratio: 2 / 3;
  background: #111827;
}

.detail-intro h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.detail-intro p {
  max-width: 840px;
  color: #dbe4f0;
  font-size: 19px;
  line-height: 1.9;
}

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

.detail-meta-grid span {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.detail-meta-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.large-tags span {
  font-size: 13px;
  padding: 8px 12px;
}

.player-section {
  padding-top: 54px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #000000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.62));
  cursor: pointer;
}

.play-overlay span {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  font-size: 32px;
  box-shadow: 0 20px 58px rgba(139, 92, 246, 0.32);
}

.video-frame.playing .play-overlay {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding-top: 54px;
}

.detail-content article {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.detail-content h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.detail-content p {
  margin: 0;
  color: #dbe4f0;
  font-size: 17px;
  line-height: 2;
}

.related-wrap {
  width: 100%;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 70px 96px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.rank-num {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  font-size: 22px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.08);
}

.rank-thumb {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 16px;
  background: #111827;
}

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-info p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.7;
}

.site-footer {
  margin-top: 80px;
  padding: 42px 0 32px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 30px;
}

.site-footer p,
.copyright {
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

.footer-links {
  flex-wrap: wrap;
  align-items: flex-start;
}

.footer-links a {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #dbe4f0;
  font-size: 13px;
  font-weight: 700;
}

.copyright {
  margin-top: 30px;
  font-size: 14px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--panel);
}

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

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

  .detail-hero {
    grid-template-columns: 300px 1fr;
  }
}

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

  .nav-toggle {
    display: block;
  }

  .hero-carousel {
    min-height: 580px;
  }

  .hero-content {
    bottom: 78px;
  }

  .search-band,
  .detail-hero,
  .detail-content,
  .footer-grid,
  .category-panel-grid {
    grid-template-columns: 1fr;
  }

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

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

  .detail-hero,
  .page-hero {
    padding: 22px;
  }

  .detail-poster {
    max-width: 280px;
  }

  .rank-row {
    grid-template-columns: 46px 78px 1fr;
  }

  .rank-play {
    grid-column: 2 / -1;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .search-band,
  .section-wrap,
  .page-hero,
  .detail-main,
  .site-footer {
    width: min(100% - 28px, 1280px);
  }

  .header-inner {
    padding: 0 14px;
  }

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

  .hero-control {
    display: none;
  }

  .hero-content {
    width: calc(100% - 28px);
  }

  .hero-actions,
  .quick-search,
  .search-page-form {
    flex-direction: column;
  }

  .search-page-form select {
    max-width: none;
  }

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

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

  .rank-row {
    grid-template-columns: 40px 72px 1fr;
    gap: 10px;
  }

  .rank-num {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}
