:root {
  --teal: #14b8a6;
  --cyan: #06b6d4;
  --blue: #3b82f6;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #f0fdfa;
  --card: #ffffff;
  --line: #e2e8f0;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #ecfeff 0%, #ffffff 42%, #f0fdfa 100%);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, var(--teal), var(--cyan), var(--blue));
  box-shadow: 0 10px 30px rgba(14, 116, 144, 0.25);
}

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

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

.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-weight: 600;
}

.desktop-nav a,
.dropdown-toggle {
  color: #ffffff;
  opacity: 0.94;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.dropdown-toggle:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.dropdown {
  position: relative;
}

.dropdown-toggle {
  border: 0;
  background: transparent;
  padding: 18px 0;
}

.dropdown-menu {
  position: absolute;
  top: 58px;
  left: 0;
  width: 210px;
  padding: 8px;
  border-radius: 16px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: #0f172a;
}

.dropdown-menu a:hover {
  background: #ecfeff;
  color: #0f766e;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 220px;
  padding: 7px 10px 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.search-form input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
}

.search-form input::placeholder {
  color: rgba(255, 255, 255, 0.74);
}

.search-form button,
.mobile-toggle {
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: transparent;
}

.mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.mobile-nav {
  display: none;
  padding: 0 0 16px;
}

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

.mobile-nav a {
  display: block;
  padding: 9px 0;
  font-weight: 600;
}

.mobile-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
  margin: 8px 0;
}

.hero {
  position: relative;
  height: 430px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(90deg, #111827, #1f2937);
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 900ms ease, transform 1200ms ease;
}

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

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.74;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.9) 0%, rgba(15, 23, 42, 0.62) 45%, rgba(15, 23, 42, 0.18) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.58), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: end;
  height: 100%;
  padding: 60px 0 78px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.9);
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 16px 0 12px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0 0 24px;
  max-width: 620px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 17px;
}

.hero-meta,
.card-meta,
.detail-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-meta span,
.card-meta span,
.detail-meta span,
.rank-meta span,
.tag,
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  white-space: nowrap;
}

.hero-meta span {
  padding: 7px 11px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.hero-actions,
.section-head,
.filter-bar,
.pagination-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-actions {
  justify-content: flex-start;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  box-shadow: 0 15px 28px rgba(6, 182, 212, 0.28);
}

.btn-light {
  color: #0f172a;
  background: #ffffff;
}

.btn-soft {
  color: #0f766e;
  background: #ccfbf1;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
  transition: all 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.34);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  bottom: 28px;
  left: 50%;
  display: flex;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(12px);
  transform: translateX(-50%);
}

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
}

.hero-dot.active {
  background: #ffffff;
  transform: scale(1.25);
}

.hero-progress {
  position: absolute;
  z-index: 4;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.14);
}

.hero-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #2dd4bf, #22d3ee);
  transition: width 0.4s ease;
}

.main-block {
  padding: 34px 0 0;
}

.section {
  margin: 0 0 46px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: #1e293b;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.section-title .icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #0f766e;
  background: #ccfbf1;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab,
.filter-button {
  border: 0;
  padding: 9px 15px;
  border-radius: 999px;
  color: #334155;
  background: #e2e8f0;
  transition: all 0.2s ease;
}

.tab.active,
.filter-button.active,
.tab:hover,
.filter-button:hover {
  color: #ffffff;
  background: var(--teal);
}

.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 {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.09);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img,
.category-thumb img,
.related-card img,
.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .poster-link img,
.category-card:hover img,
.related-card:hover img {
  transform: scale(1.06);
}

.poster-label {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(20, 184, 166, 0.9);
  font-size: 12px;
  font-weight: 800;
}

.poster-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.08);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.poster-play span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
}

.movie-card:hover .poster-play {
  opacity: 1;
}

.card-body {
  padding: 15px 15px 17px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.card-meta span,
.rank-meta span {
  padding: 4px 8px;
  color: #475569;
  background: #f1f5f9;
  font-size: 12px;
}

.list-band {
  padding: 26px;
  border-radius: 28px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: var(--shadow);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 84px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateX(3px);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #0f172a;
  background: #ffffff;
  font-weight: 900;
}

.rank-poster {
  overflow: hidden;
  width: 84px;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  background: #0f172a;
}

.rank-copy h3 {
  margin: 0 0 5px;
  font-size: 18px;
}

.rank-copy p {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.rank-item.light {
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.rank-item.light:hover {
  background: #f8fafc;
}

.rank-item.light .rank-number {
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
}

.rank-item.light .rank-copy p {
  color: var(--muted);
}

.masonry-grid {
  columns: 3 260px;
  column-gap: 22px;
}

.masonry-grid .movie-card {
  break-inside: avoid;
  margin: 0 0 22px;
}

.horizontal-strip {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scroll-snap-type: x mandatory;
}

.horizontal-strip .movie-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
}

.soft-panel {
  padding: 26px;
  border-radius: 28px;
  background: linear-gradient(135deg, #ccfbf1, #cffafe);
}

.page-hero {
  padding: 58px 0 42px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--cyan), var(--blue));
}

.page-hero p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 17px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: #0f766e;
  font-weight: 700;
}

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

.category-card {
  display: grid;
  grid-template-columns: 210px 1fr;
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-thumb {
  position: relative;
  min-height: 210px;
  background: #0f172a;
}

.category-thumb::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(15, 23, 42, 0.28));
}

.category-copy {
  padding: 22px;
}

.category-copy h2,
.category-copy h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-copy p {
  margin: 0 0 14px;
  color: var(--muted);
}

.sample-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 14px 0 18px;
}

.sample-links a {
  color: #0f766e;
  font-weight: 700;
}

.filter-panel {
  margin: 34px 0 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(10px);
}

.filter-input {
  width: min(100%, 360px);
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  outline: 0;
  background: #ffffff;
}

.empty-state {
  display: none;
  padding: 24px;
  border-radius: 18px;
  color: #64748b;
  background: #f8fafc;
  text-align: center;
}

.detail-page {
  padding-bottom: 44px;
}

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

.watch-panel,
.detail-info-card,
.content-card,
.related-section {
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.09);
}

.watch-panel {
  overflow: hidden;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(20, 184, 166, 0.24), rgba(2, 6, 23, 0.58));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-button-core {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 20px 42px rgba(6, 182, 212, 0.35);
  font-size: 34px;
  transform: translateZ(0);
}

.detail-title {
  padding: 24px;
}

.detail-title h1 {
  margin-top: 0;
  color: #111827;
  font-size: clamp(28px, 4vw, 42px);
}

.detail-title p {
  margin: 0;
  color: #475569;
  font-size: 17px;
}

.detail-info-card {
  padding: 20px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 3 / 4;
  background: #0f172a;
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-meta {
  margin: 18px 0 0;
}

.detail-meta span,
.tag,
.badge {
  padding: 6px 10px;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 13px;
  font-weight: 700;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.content-card,
.related-section {
  margin-top: 26px;
  padding: 26px;
}

.content-card h2,
.related-section h2 {
  margin: 0 0 14px;
  color: #1e293b;
  font-size: 26px;
}

.content-card p {
  margin: 0;
  color: #475569;
  font-size: 16px;
}

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

.related-card {
  overflow: hidden;
  border-radius: 16px;
  background: #f8fafc;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.1);
}

.related-card figure {
  margin: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

.related-card h3 {
  margin: 0;
  padding: 10px;
  font-size: 14px;
  line-height: 1.35;
}

.search-shell {
  min-height: 440px;
}

.search-results {
  margin-top: 24px;
}

.footer {
  margin-top: 54px;
  color: #ffffff;
  background: linear-gradient(180deg, #1f2937, #111827);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 28px;
  padding: 42px 0;
}

.footer h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.footer p,
.footer a {
  color: rgba(255, 255, 255, 0.74);
}

.footer a:hover {
  color: #2dd4bf;
}

.footer ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.64);
  text-align: center;
}

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

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

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

@media (max-width: 860px) {
  .desktop-nav,
  .header-actions .search-form {
    display: none;
  }

  .mobile-toggle {
    display: grid;
  }

  .hero {
    height: 560px;
  }

  .hero-content {
    padding: 46px 0 82px;
  }

  .hero-arrow {
    display: none;
  }

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

  .rank-item {
    grid-template-columns: 44px 70px 1fr;
  }

  .rank-item .btn {
    grid-column: 2 / -1;
    justify-self: start;
  }

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

  .detail-info-card {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 18px;
  }

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

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

  .logo {
    font-size: 18px;
  }

  .hero h1,
  .page-hero h1,
  .detail-title h1 {
    font-size: 30px;
  }

  .hero {
    height: 600px;
  }

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

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

  .category-thumb {
    min-height: 260px;
  }

  .rank-item {
    grid-template-columns: 42px 1fr;
  }

  .rank-poster {
    display: none;
  }

  .detail-info-card {
    display: block;
  }

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

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