:root {
  --color-night: #0a0e1a;
  --color-night-medium: #111827;
  --color-night-light: #1a1f2e;
  --color-card: rgba(255, 255, 255, 0.055);
  --color-border: rgba(255, 255, 255, 0.10);
  --color-border-strong: rgba(34, 211, 238, 0.36);
  --color-accent-cyan: #06b6d4;
  --color-accent-blue: #2563eb;
  --color-accent-teal: #14b8a6;
  --color-text-primary: #f8fafc;
  --color-text-secondary: #cbd5e1;
  --color-text-muted: #94a3b8;
  --shadow-cyan: 0 25px 50px -12px rgba(6, 182, 212, 0.20);
  --radius-lg: 18px;
  --radius-md: 12px;
  --container: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(6, 182, 212, 0.18), transparent 28rem),
    radial-gradient(circle at 80% 8%, rgba(37, 99, 235, 0.16), transparent 30rem),
    var(--color-night);
  color: var(--color-text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.gradient-text {
  background: linear-gradient(90deg, #67e8f9, #3b82f6, #2dd4bf);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.btn-primary,
.btn-secondary,
.filter-reset,
.nav-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.btn-primary,
.nav-search button {
  background: linear-gradient(90deg, var(--color-accent-cyan), var(--color-accent-blue));
  color: white;
  font-weight: 700;
  padding: 10px 22px;
}

.btn-secondary,
.filter-reset {
  border: 1px solid var(--color-border-strong);
  background: rgba(255, 255, 255, 0.06);
  color: #cffafe;
  font-weight: 700;
  padding: 10px 18px;
}

.btn-primary:hover,
.btn-secondary:hover,
.filter-reset:hover,
.nav-search button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-cyan);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 14, 26, 0.78);
}

.nav-bar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  white-space: nowrap;
}

.logo-icon {
  width: 34px;
  height: 34px;
  color: #22d3ee;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linejoin: round;
}

.logo-icon path:nth-child(2) {
  fill: currentColor;
  stroke: none;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link,
.dropdown-button {
  border: 0;
  background: transparent;
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.dropdown-button:hover {
  color: #22d3ee;
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 190px;
  border-radius: 14px;
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel,
.nav-dropdown:focus-within .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-panel a {
  display: block;
  border-radius: 10px;
  padding: 9px 10px;
  color: var(--color-text-secondary);
}

.dropdown-panel a:hover {
  color: #22d3ee;
  background: rgba(255, 255, 255, 0.06);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text-primary);
  outline: none;
  padding: 11px 12px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.nav-search input {
  width: 238px;
}

.nav-search input::placeholder,
.filter-panel input::placeholder {
  color: #64748b;
}

.nav-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #22d3ee;
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  margin: 0 auto;
  background: #cbd5e1;
  border-radius: 2px;
}

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

.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.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, var(--color-night) 0%, rgba(10, 14, 26, 0.72) 44%, rgba(10, 14, 26, 0.22) 100%),
    linear-gradient(90deg, rgba(10, 14, 26, 0.92), rgba(10, 14, 26, 0.34), rgba(10, 14, 26, 0.08));
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 52px 0 70px;
}

.hero-text {
  max-width: 760px;
}

.hero-tag,
.card-tag,
.detail-tag,
.rank-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(6, 182, 212, 0.32);
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.16);
  color: #67e8f9;
  font-size: 13px;
  padding: 5px 12px;
}

.hero-text h1 {
  margin: 16px 0;
  color: white;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-text p {
  max-width: 680px;
  margin: 0 0 28px;
  color: #d1d5db;
  font-size: 18px;
}

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

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - var(--container)) / 2));
  bottom: 36px;
  display: flex;
  gap: 9px;
  z-index: 3;
}

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

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

.main-space {
  padding: 56px 0 76px;
}

.section-block {
  margin-top: 64px;
}

.section-block:first-child {
  margin-top: 0;
}

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

.section-title,
.page-title {
  margin: 0;
  color: white;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.section-title {
  font-size: clamp(24px, 3vw, 34px);
}

.section-head a {
  color: #67e8f9;
  font-weight: 700;
}

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

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

.movie-card {
  border-radius: var(--radius-md);
  overflow: hidden;
}

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

.card-hover:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-cyan);
  border-color: var(--color-border-strong);
}

.poster-link {
  display: block;
  height: 100%;
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #05070d;
}

.movie-card-large .poster-frame {
  aspect-ratio: 21 / 9;
}

.movie-card-small .poster-frame {
  aspect-ratio: 3 / 4;
}

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

.movie-card:hover .poster-frame img,
.related-item:hover img,
.ranking-row:hover img {
  transform: scale(1.08);
}

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

.poster-meta {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255, 255, 255, 0.90);
  font-size: 12px;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.90);
  color: white;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-card-body h3 {
  margin: 0 0 8px;
  color: white;
  font-size: 17px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-body p {
  min-height: 46px;
  margin: 0 0 14px;
  color: var(--color-text-muted);
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #64748b;
  font-size: 13px;
}

.movie-card-info span:first-child {
  border: 1px solid rgba(6, 182, 212, 0.30);
  border-radius: 8px;
  background: rgba(6, 182, 212, 0.14);
  color: #67e8f9;
  padding: 3px 8px;
}

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

.category-card {
  border-radius: var(--radius-md);
  padding: 22px;
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  color: white;
}

.category-card p {
  margin: 0 0 16px;
  color: var(--color-text-muted);
  font-size: 14px;
}

.category-card a {
  display: inline-flex;
  align-items: center;
  color: #67e8f9;
  font-weight: 700;
}

.page-hero {
  padding: 54px 0 34px;
}

.page-title {
  font-size: clamp(32px, 5vw, 54px);
}

.page-lead {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--color-text-secondary);
  font-size: 17px;
}

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

.breadcrumb a {
  color: #67e8f9;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px auto;
  align-items: end;
  gap: 14px;
  border-radius: var(--radius-md);
  margin: 0 0 28px;
  padding: 16px;
}

.filter-panel label {
  display: grid;
  gap: 7px;
  color: var(--color-text-muted);
  font-size: 13px;
}

.filter-panel select {
  color-scheme: dark;
}

.filter-empty {
  display: none;
  border-radius: var(--radius-md);
  padding: 22px;
  color: var(--color-text-secondary);
  text-align: center;
}

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

.movie-card.is-hidden,
.ranking-row.is-hidden {
  display: none;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 62px 116px 1fr auto;
  align-items: center;
  gap: 18px;
  border-radius: var(--radius-md);
  padding: 12px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.ranking-row:hover {
  transform: translateY(-2px);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-cyan);
}

.ranking-number {
  color: #67e8f9;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.ranking-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
  background: #05070d;
}

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

.ranking-main h2,
.ranking-main h3 {
  margin: 0 0 6px;
  color: white;
  font-size: 18px;
}

.ranking-main p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 14px;
}

.ranking-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  color: var(--color-text-muted);
  font-size: 13px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
  gap: 30px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #000;
  aspect-ratio: 16 / 9;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

.player-shell video {
  width: 100%;
  height: 100%;
  background: black;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.18));
  color: white;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-button {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.88);
  box-shadow: 0 20px 60px rgba(6, 182, 212, 0.38);
  font-size: 30px;
  transform: translateZ(0);
}

.detail-card {
  border-radius: var(--radius-lg);
  padding: 26px;
}

.detail-card h1 {
  margin: 0 0 18px;
  color: white;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
}

.detail-meta,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.detail-meta span,
.detail-tags a,
.detail-tags span {
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-secondary);
  font-size: 13px;
  padding: 5px 11px;
}

.detail-tags a {
  border-color: rgba(6, 182, 212, 0.34);
  color: #67e8f9;
}

.detail-section {
  border-top: 1px solid var(--color-border);
  margin-top: 22px;
  padding-top: 22px;
}

.detail-section h2 {
  margin: 0 0 12px;
  color: white;
  font-size: 20px;
}

.detail-section p {
  margin: 0;
  color: var(--color-text-secondary);
  white-space: pre-line;
}

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

.detail-table div {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  padding: 12px;
}

.detail-table span {
  display: block;
  color: #64748b;
  font-size: 13px;
}

.detail-table strong {
  color: var(--color-text-primary);
}

.sidebar-card {
  position: sticky;
  top: 92px;
  border-radius: var(--radius-lg);
  padding: 20px;
}

.sidebar-card h2 {
  margin: 0 0 16px;
  color: white;
  font-size: 22px;
}

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

.related-item {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: center;
}

.related-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 10px;
  background: #05070d;
}

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

.related-cover span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.18);
  color: white;
}

.related-item h3 {
  margin: 0 0 5px;
  color: white;
  font-size: 15px;
  line-height: 1.35;
}

.related-item p {
  margin: 0 0 4px;
  color: var(--color-text-muted);
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-item em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}

.site-footer {
  border-top: 1px solid var(--color-border);
  background: #0f1420;
  padding: 46px 0 22px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 32px;
}

.footer-grid p {
  max-width: 460px;
  color: var(--color-text-muted);
}

.footer-grid h2 {
  margin: 0 0 12px;
  color: white;
  font-size: 17px;
}

.footer-grid a:not(.footer-logo) {
  display: block;
  margin: 7px 0;
  color: var(--color-text-muted);
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid var(--color-border);
  margin-top: 30px;
  padding-top: 18px;
  color: #64748b;
  font-size: 13px;
}

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

  .nav-search input {
    width: 190px;
  }
}

@media (max-width: 860px) {
  .menu-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 78px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: rgba(10, 14, 26, 0.96);
    padding: 16px;
  }

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

  .nav-link,
  .dropdown-button {
    width: 100%;
    text-align: left;
  }

  .dropdown-panel {
    position: static;
    width: 100%;
    opacity: 1;
    visibility: visible;
    transform: none;
    margin-top: 6px;
  }

  .nav-search {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .nav-search input {
    width: 100%;
  }

  .hero-carousel {
    min-height: 66vh;
  }

  .hero-content {
    padding: 42px 0 72px;
  }

  .hero-dots {
    left: 16px;
    right: auto;
  }

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

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

  .ranking-row {
    grid-template-columns: 44px 92px 1fr;
  }

  .ranking-side {
    grid-column: 2 / -1;
    align-items: flex-start;
    flex-direction: row;
  }

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

  .sidebar-card {
    position: static;
  }
}

@media (max-width: 560px) {
  .container {
    width: min(100% - 24px, var(--container));
  }

  .site-logo,
  .footer-logo {
    font-size: 19px;
  }

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

  .hero-actions {
    display: grid;
  }

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

  .movie-card-small .poster-frame {
    aspect-ratio: 2 / 3;
  }

  .detail-card {
    padding: 20px;
  }

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

  .related-item {
    grid-template-columns: 94px 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }
}
