:root {
  --bg: #0a0d24;
  --bg-2: #1a1a3e;
  --panel: rgba(255, 255, 255, 0.1);
  --panel-strong: rgba(255, 255, 255, 0.16);
  --line: rgba(255, 255, 255, 0.16);
  --text: #f3f4f6;
  --muted: #aeb6d7;
  --soft: #7d86ad;
  --blueberry: #7d60f5;
  --blueberry-light: #9d8df9;
  --night: #5d77ff;
  --gold: #facc15;
  --danger: #fb7185;
  --shadow: 0 25px 60px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(93, 119, 255, 0.6) rgba(10, 13, 36, 0.7);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #0a0d24 0%, #1a1a3e 46%, #0a0d24 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 12%, rgba(125, 96, 245, 0.32), transparent 30%),
    radial-gradient(circle at 80% 4%, rgba(93, 119, 255, 0.26), transparent 28%),
    radial-gradient(circle at 50% 95%, rgba(157, 141, 249, 0.16), transparent 34%);
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.glass-effect {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.text-glow {
  text-shadow: 0 0 14px rgba(93, 119, 255, 0.8);
}

.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: var(--shadow);
  border-color: rgba(157, 141, 249, 0.45);
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 13, 36, 0.74);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.nav-wrap {
  width: min(1280px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark,
.footer-logo span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, var(--blueberry-light), var(--night));
  box-shadow: 0 0 24px rgba(125, 96, 245, 0.55);
}

.brand-name {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, var(--blueberry-light), #cbd5ff, var(--night));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link {
  font-size: 15px;
  color: #d6dcfb;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--blueberry-light);
  text-shadow: 0 0 10px rgba(93, 119, 255, 0.65);
}

.top-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.quick-search input,
.filter-search input {
  width: 100%;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  outline: none;
  background: rgba(255, 255, 255, 0.1);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.top-search input {
  width: 220px;
  padding: 10px 14px;
}

.top-search input:focus,
.mobile-search input:focus,
.quick-search input:focus,
.filter-search input:focus {
  border-color: var(--blueberry-light);
  background: rgba(255, 255, 255, 0.14);
}

.top-search button,
.mobile-search button,
.quick-search button {
  border: 0;
  border-radius: 999px;
  color: white;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--blueberry), var(--night));
  box-shadow: 0 12px 24px rgba(93, 119, 255, 0.28);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-toggle span {
  width: 18px;
  height: 2px;
  display: block;
  margin: 4px auto;
  border-radius: 2px;
  background: var(--text);
}

.mobile-menu {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(10, 13, 36, 0.92);
}

.mobile-menu.open {
  display: block;
}

.mobile-link {
  display: block;
  padding: 10px 2px;
  color: #d8def8;
}

.mobile-search {
  margin-top: 10px;
}

.mobile-search input {
  padding: 11px 14px;
}

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

.home-page {
  padding-top: 92px;
}

.inner-page {
  padding-top: 104px;
  padding-bottom: 64px;
}

.hero-carousel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  min-height: 610px;
  margin-bottom: 30px;
}

.hero-stage {
  position: relative;
  min-height: 610px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 8, 24, 0.95) 0%, rgba(5, 8, 24, 0.78) 45%, rgba(5, 8, 24, 0.2) 100%),
    linear-gradient(0deg, rgba(5, 8, 24, 0.88), transparent 58%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(720px, 92%);
  padding: 54px;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--blueberry-light);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 72px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.04em;
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 22px;
  color: #d9def8;
  font-size: 18px;
  line-height: 1.85;
}

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

.hero-tags span,
.tag-row span,
.tag-cloud a {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(157, 141, 249, 0.28);
  border-radius: 999px;
  color: #dfe4ff;
  background: rgba(125, 96, 245, 0.18);
}

.hero-tags span {
  padding: 8px 12px;
}

.tag-row span,
.tag-cloud a {
  padding: 6px 10px;
  font-size: 12px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: white;
  background: linear-gradient(135deg, var(--blueberry), var(--night));
  box-shadow: 0 16px 34px rgba(93, 119, 255, 0.34);
}

.btn.ghost {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
}

.btn.plain {
  color: var(--blueberry-light);
}

.btn.full {
  width: 100%;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: white;
  font-size: 36px;
  line-height: 1;
  background: rgba(10, 13, 36, 0.55);
  transform: translateY(-50%);
}

.hero-arrow.prev {
  left: 18px;
}

.hero-arrow.next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  left: 54px;
  bottom: 26px;
  z-index: 5;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 32px;
  height: 4px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.36);
}

.hero-dot.is-active {
  background: linear-gradient(90deg, var(--blueberry-light), var(--night));
}

.hero-panel {
  height: 610px;
  padding: 22px;
  border-radius: 28px;
  overflow: hidden;
}

.hero-panel-title,
.ranking-head,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hero-panel-title span,
.ranking-head h2,
.section-head h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 850;
}

.hero-panel-title a,
.ranking-head a,
.more-link {
  color: var(--blueberry-light);
  font-size: 14px;
}

.hero-compact-list,
.compact-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.compact-card {
  position: relative;
  display: grid;
  grid-template-columns: 102px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 74px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.07);
  transition: transform 0.25s ease, background 0.25s ease;
}

.compact-card:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.12);
}

.compact-card img {
  width: 102px;
  height: 62px;
  object-fit: cover;
  border-radius: 12px;
}

.compact-card strong,
.compact-card em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-card strong {
  margin-bottom: 7px;
  font-size: 14px;
}

.compact-card em {
  color: var(--soft);
  font-size: 12px;
  font-style: normal;
}

.list-rank {
  position: absolute;
  left: 6px;
  top: 6px;
  z-index: 2;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--danger), var(--blueberry));
}

.quick-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  margin-bottom: 44px;
  border-radius: 24px;
}

.quick-search form {
  display: flex;
  gap: 12px;
}

.quick-search input {
  padding: 15px 18px;
}

.quick-search button {
  min-width: 128px;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-links a {
  padding: 10px 14px;
  border: 1px solid rgba(157, 141, 249, 0.28);
  border-radius: 999px;
  color: #eef1ff;
  background: rgba(125, 96, 245, 0.14);
}

.content-section {
  margin-top: 54px;
}

.section-head {
  justify-content: flex-start;
  margin-bottom: 22px;
}

.section-head > span {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--blueberry), var(--night));
  box-shadow: 0 15px 26px rgba(93, 119, 255, 0.24);
}

.section-head p {
  margin: 5px 0 0;
  color: var(--muted);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.09);
}

.movie-card.large {
  grid-column: span 2;
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.movie-card.large .card-cover {
  aspect-ratio: 16 / 8.2;
}

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

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

.card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent 62%);
}

.card-type,
.rank-badge {
  position: absolute;
  top: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  background: rgba(109, 62, 237, 0.86);
}

.card-type {
  right: 12px;
}

.rank-badge {
  left: 12px;
  background: linear-gradient(135deg, var(--danger), var(--blueberry));
}

.play-hover {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  font-size: 22px;
  background: rgba(125, 96, 245, 0.88);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-info {
  padding: 16px;
}

.card-info h3 {
  min-height: 48px;
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.card-info h3 a:hover {
  color: var(--blueberry-light);
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--soft);
  font-size: 13px;
}

.card-meta span:first-child,
.detail-meta span:first-child {
  color: var(--gold);
}

.card-info p {
  min-height: 44px;
  margin: 12px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.ranking-panel {
  padding: 20px;
  border-radius: 24px;
}

.side-stack {
  display: grid;
  gap: 20px;
}

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

.category-tile,
.category-overview {
  overflow: hidden;
  border-radius: 24px;
}

.category-tile {
  display: block;
  padding: 16px;
}

.tile-images,
.category-cover {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 16px;
}

.tile-images img,
.category-cover img {
  width: 100%;
  height: 88px;
  object-fit: cover;
  border-radius: 14px;
}

.category-tile strong,
.category-body h2 {
  display: block;
  margin: 0 0 8px;
  font-size: 22px;
}

.category-tile p,
.category-body p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.category-overview {
  display: grid;
  grid-template-rows: auto 1fr;
}

.category-cover {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 12px;
}

.category-cover img {
  height: 110px;
}

.category-body {
  padding: 0 18px 20px;
}

.category-hot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.category-hot a {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 7px 10px;
  border-radius: 999px;
  color: #e8ecff;
  background: rgba(255, 255, 255, 0.08);
}

.page-hero {
  padding: 38px;
  margin-bottom: 26px;
  border-radius: 28px;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.08;
}

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

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

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

.filter-panel {
  margin-bottom: 22px;
  padding: 18px;
  border-radius: 22px;
}

.filter-search input {
  padding: 14px 16px;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

.filter-buttons button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #e1e6ff;
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.08);
}

.filter-buttons button.active,
.filter-buttons button:hover {
  border-color: rgba(157, 141, 249, 0.55);
  background: rgba(125, 96, 245, 0.34);
}

.empty-state {
  display: none;
  padding: 46px;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.08);
}

.empty-state.show {
  display: block;
}

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

.detail-main,
.detail-side {
  display: grid;
  gap: 22px;
}

.player-card,
.detail-content,
.poster-card {
  border-radius: 26px;
  overflow: hidden;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: white;
  text-align: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.34));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-circle {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 34px;
  background: linear-gradient(135deg, var(--blueberry), var(--night));
  box-shadow: 0 0 34px rgba(125, 96, 245, 0.6);
}

.player-overlay strong {
  max-width: 80%;
  font-size: 28px;
}

.player-overlay em {
  color: #dce2ff;
  font-style: normal;
}

.detail-content {
  padding: 28px;
}

.detail-content h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
}

.one-line {
  margin: 20px 0;
  color: #eef1ff;
  font-size: 18px;
  line-height: 1.8;
}

.detail-content h2 {
  margin: 30px 0 12px;
  font-size: 24px;
}

.text-block p {
  margin: 0 0 15px;
  color: #d6dcf8;
  line-height: 1.9;
}

.review-block {
  padding: 18px;
  border: 1px solid rgba(157, 141, 249, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
}

.poster-card {
  padding: 18px;
}

.poster-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 20px;
}

.poster-card h2 {
  margin: 16px 0 8px;
  font-size: 22px;
}

.poster-card p {
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 1160px) {
  .top-search {
    display: none;
  }

  .hero-carousel,
  .two-column,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    height: auto;
  }

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

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

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

  .mobile-toggle {
    display: block;
    margin-left: auto;
  }

  .nav-wrap {
    height: 62px;
  }

  .home-page,
  .inner-page {
    padding-top: 84px;
  }

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

  .hero-content {
    padding: 34px 24px 58px;
  }

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

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

  .quick-search form {
    flex-direction: column;
  }

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

  .movie-card.large {
    grid-column: span 2;
  }
}

@media (max-width: 560px) {
  .page-shell,
  .nav-wrap,
  .mobile-menu {
    width: min(100% - 22px, 1280px);
  }

  .brand-name {
    font-size: 18px;
  }

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

  .hero-content h1 {
    font-size: 34px;
  }

  .hero-actions,
  .detail-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .hero-dots {
    left: 24px;
  }

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

  .movie-card.large {
    grid-column: auto;
  }

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

  .compact-card {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .compact-card img {
    width: 86px;
    height: 58px;
  }
}
