:root {
  --bg: #f8fafc;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --panel: #ffffff;
  --night: #020617;
  --cyan: #06b6d4;
  --blue: #2563eb;
  --orange: #f97316;
  --pink: #ec4899;
  --green: #10b981;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
  --soft-shadow: 0 12px 26px rgba(15, 23, 42, 0.10);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 45%, #f1f5f9 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.88);
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(18px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.32);
}

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

.nav-menu a {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

.nav-menu a:hover,
.nav-menu a.is-active {
  background: rgba(6, 182, 212, 0.18);
  color: #ffffff;
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 690px;
  overflow: hidden;
  background: radial-gradient(circle at top left, rgba(6, 182, 212, 0.35), transparent 35%), linear-gradient(135deg, #020617, #0f1b3f 50%, #082f49);
  color: #ffffff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image: linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 54px 54px;
  z-index: -2;
}

.hero-slide {
  display: none;
  min-height: 690px;
  background-size: cover;
  background-position: center;
}

.hero-slide.is-active {
  display: block;
  animation: fadeIn 0.55s ease both;
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.55fr);
  align-items: center;
  gap: 44px;
  min-height: 690px;
  padding: 86px 0 104px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 0 18px;
  padding: 8px 12px;
  border: 1px solid rgba(103, 232, 249, 0.32);
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.12);
  color: #a5f3fc;
  font-size: 14px;
  font-weight: 800;
}

.hero h1,
.hero h2 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.96;
  letter-spacing: -0.06em;
  font-weight: 950;
}

.hero-lead {
  max-width: 710px;
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: clamp(17px, 2.4vw, 22px);
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-meta,
.inline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-meta {
  margin: 24px 0 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 900;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
  cursor: pointer;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #ffffff;
  box-shadow: 0 16px 36px rgba(6, 182, 212, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 20px 42px rgba(37, 99, 235, 0.34);
}

.btn-ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(10px);
}

.btn-light {
  color: var(--ink);
  background: #ffffff;
  border-color: var(--line);
  box-shadow: var(--soft-shadow);
}

.hero-poster {
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.72));
}

.hero-thumbs {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 5;
}

.hero-thumb {
  width: 74px;
  height: 48px;
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  opacity: 0.72;
  transition: transform 0.22s ease, opacity 0.22s ease, border-color 0.22s ease;
}

.hero-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-thumb.is-active,
.hero-thumb:hover {
  opacity: 1;
  border-color: #67e8f9;
  transform: translateY(-3px);
}

.section {
  padding: 72px 0;
}

.section.compact {
  padding: 44px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.04em;
  font-weight: 950;
  color: #0f172a;
}

.section-desc {
  max-width: 700px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.search-panel,
.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 160px;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(14px);
}

.search-panel input,
.search-panel select,
.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--ink);
  padding: 0 14px;
  outline: none;
}

.search-panel input:focus,
.search-panel select:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.14);
}

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

.category-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 22px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #155e75);
  box-shadow: var(--soft-shadow);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-card:nth-child(3n + 1) {
  background: linear-gradient(135deg, #0f172a, #2563eb, #06b6d4);
}

.category-card:nth-child(3n + 2) {
  background: linear-gradient(135deg, #111827, #7c3aed, #ec4899);
}

.category-card:nth-child(3n + 3) {
  background: linear-gradient(135deg, #0f172a, #f97316, #ef4444);
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-card::after {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  right: -34px;
  bottom: -44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.category-card h2,
.category-card h3 {
  position: relative;
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 950;
  z-index: 1;
}

.category-card p {
  position: relative;
  margin: 0;
  color: rgba(255, 255, 255, 0.80);
  line-height: 1.7;
  z-index: 1;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.88);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(6, 182, 212, 0.34);
  box-shadow: 0 24px 52px rgba(15, 23, 42, 0.15);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.55s ease, opacity 0.3s ease;
}

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

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%) scale(0.88);
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.86);
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.24s ease;
  box-shadow: 0 16px 34px rgba(6, 182, 212, 0.32);
}

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

.card-year,
.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.74);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.card-body {
  padding: 14px;
}

.card-meta {
  margin-bottom: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.card-meta span {
  max-width: 100%;
}

.movie-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 950;
  color: #0f172a;
}

.movie-card h3 a:hover {
  color: #0891b2;
}

.movie-card p {
  margin: 0;
  min-height: 44px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #ecfeff;
  color: #0e7490;
  font-size: 11px;
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.rank-index {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--orange), var(--pink));
  color: #ffffff;
  font-weight: 950;
}

.rank-title {
  margin: 0;
  font-weight: 950;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-desc {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 76px;
  background: radial-gradient(circle at 10% 10%, rgba(6, 182, 212, 0.32), transparent 35%), linear-gradient(135deg, #020617, #0f172a 55%, #164e63);
  color: #ffffff;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.05em;
  font-weight: 950;
}

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

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #020617;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.26;
  filter: blur(2px);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.80), rgba(8, 47, 73, 0.72));
}

.detail-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 74px 0;
}

.detail-poster {
  margin: 0;
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #a5f3fc;
  font-size: 14px;
  font-weight: 800;
}

.breadcrumb a:hover {
  color: #ffffff;
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  font-weight: 950;
}

.detail-info p {
  max-width: 820px;
  margin: 20px 0 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.9;
}

.detail-meta {
  margin-top: 20px;
}

.detail-meta .chip {
  background: rgba(255, 255, 255, 0.12);
}

.player-section {
  margin-top: -34px;
  position: relative;
  z-index: 5;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(6, 182, 212, 0.20), rgba(2, 6, 23, 0.34));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-start span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 18px 48px rgba(6, 182, 212, 0.35);
  font-size: 34px;
  padding-left: 5px;
}

.player-start strong {
  display: block;
  font-size: 20px;
  font-weight: 950;
}

.player-shell.is-playing .player-start {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  margin-top: 34px;
}

.text-panel {
  padding: 28px;
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.text-panel h2 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 950;
}

.text-panel p {
  margin: 0;
  color: #475569;
  line-height: 1.95;
}

.no-result {
  display: none;
  padding: 28px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: #64748b;
  text-align: center;
  font-weight: 800;
}

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

.site-footer {
  margin-top: 72px;
  padding: 34px 0;
  background: #020617;
  color: rgba(255, 255, 255, 0.72);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

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

  .nav-menu a {
    border-radius: 14px;
  }

  .hero,
  .hero-slide,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 58px 0 116px;
  }

  .hero-poster {
    max-width: 290px;
    margin: 0 auto;
  }

  .hero-thumbs {
    width: calc(100% - 32px);
    justify-content: center;
    overflow-x: auto;
  }

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

  .section-head {
    display: block;
  }

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

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

  .rank-list {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
    padding: 46px 0 64px;
  }

  .detail-poster {
    width: min(300px, 76vw);
  }

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

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

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

  .brand {
    font-size: 18px;
  }

  .hero h1,
  .hero h2 {
    font-size: 42px;
  }

  .hero-lead,
  .page-hero p,
  .detail-info p {
    font-size: 16px;
  }

  .section {
    padding: 52px 0;
  }

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

  .category-card {
    min-height: 160px;
    padding: 18px;
  }

  .card-body {
    padding: 12px;
  }

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

  .movie-card p {
    font-size: 12px;
  }

  .rank-item {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .rank-item .btn {
    grid-column: 1 / -1;
  }
}
