:root {
  --cyan: #06b6d4;
  --cyan-dark: #0891b2;
  --teal: #14b8a6;
  --ink: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 52%, #f8fafc 100%);
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(236, 254, 255, 0.94), rgba(239, 246, 255, 0.94), rgba(240, 253, 250, 0.94));
  border-bottom: 1px solid rgba(6, 182, 212, 0.15);
  box-shadow: 0 10px 30px rgba(8, 145, 178, 0.08);
  backdrop-filter: blur(16px);
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  box-shadow: 0 10px 24px rgba(6, 182, 212, 0.3);
}

.brand-name {
  font-size: 1.25rem;
}

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

.nav-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: #334155;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--cyan-dark);
  background: rgba(6, 182, 212, 0.1);
}

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

.header-search input,
.mobile-search input,
.hero-search input,
.inline-search input,
.toolbar input,
.toolbar select {
  border: 1px solid rgba(6, 182, 212, 0.18);
  border-radius: 999px;
  padding: 11px 16px;
  outline: none;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  min-width: 0;
  transition: 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.inline-search input:focus,
.toolbar input:focus,
.toolbar select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.15);
}

.header-search button,
.mobile-search button,
.hero-search button,
.inline-search button,
.btn,
.text-link {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(6, 182, 212, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.hero-search button:hover,
.inline-search button:hover,
.btn:hover,
.text-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(6, 182, 212, 0.32);
}

.btn.ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: none;
}

.btn.small {
  display: inline-flex;
  padding: 9px 14px;
  font-size: 0.92rem;
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(6, 182, 212, 0.1);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 99px;
  background: var(--cyan-dark);
}

.mobile-menu {
  display: none;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px 18px;
}

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

.mobile-menu nav {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-menu nav a {
  padding: 10px 12px;
  border-radius: 12px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.78);
}

.hero {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  color: #fff;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.08);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 38%, rgba(6, 182, 212, 0.2), transparent 28%), linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(15, 23, 42, 0.58) 48%, rgba(15, 23, 42, 0.38)), linear-gradient(0deg, rgba(2, 6, 23, 0.88), transparent 38%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1240px) / 2 + 20px));
  top: 128px;
  z-index: 2;
  max-width: 680px;
  animation: fadeUp 0.7s ease both;
}

.eyebrow {
  margin: 0 0 12px;
  color: #67e8f9;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  font-weight: 900;
}

.eyebrow.dark {
  color: var(--cyan-dark);
}

.hero-content h2 {
  margin: 0;
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-desc {
  max-width: 620px;
  margin: 22px 0 0;
  color: #e2e8f0;
  font-size: 1.18rem;
  line-height: 1.8;
}

.hero-tags,
.tag-row,
.detail-tags,
.hero-category-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-tags {
  margin-top: 22px;
}

.hero-tags span,
.tag-row span,
.detail-tags a,
.pill-link {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 0.82rem;
  font-weight: 800;
  background: rgba(6, 182, 212, 0.12);
  color: var(--cyan-dark);
}

.hero-tags span {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.hero-poster {
  position: absolute;
  right: max(24px, calc((100vw - 1240px) / 2 + 24px));
  top: 130px;
  z-index: 2;
  width: min(32vw, 380px);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

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

.hero-poster:hover img {
  transform: scale(1.06);
}

.hero-controls {
  position: absolute;
  left: max(24px, calc((100vw - 1240px) / 2 + 20px));
  bottom: 48px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

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

.hero-dot.is-active {
  width: 64px;
  background: #67e8f9;
}

.hero-search-panel {
  position: relative;
  z-index: 4;
  max-width: 1240px;
  margin: 0 auto;
  padding: 510px 20px 42px;
}

.hero-search-panel h1 {
  max-width: 800px;
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 4vw, 3.2rem);
  line-height: 1.1;
}

.hero-search-panel p {
  max-width: 720px;
  margin: 0 0 18px;
  color: #cbd5e1;
  line-height: 1.8;
}

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

.hero-search input {
  flex: 1;
  padding: 15px 18px;
}

.hero-category-links {
  margin-top: 16px;
}

.pill-link {
  color: #cffafe;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.section,
.page-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 58px 20px;
}

.section-light {
  padding-top: 70px;
}

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

.section-head h2,
.page-hero h1,
.detail-info h1,
.player-section h2,
.detail-article h2,
.detail-side h2 {
  margin: 0;
  color: #1f2937;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.text-link {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 26px;
}

.toolbar input {
  flex: 1;
  border-radius: 16px;
}

.toolbar select {
  border-radius: 16px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(6, 182, 212, 0.1);
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(6, 182, 212, 0.32);
  box-shadow: var(--shadow);
}

.card-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #e0f2fe, #f0fdfa);
}

.card-poster img,
.rank-poster img,
.category-cover img,
.category-tile img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .card-poster img,
.rank-item:hover .rank-poster img,
.category-tile:hover img,
.category-overview-card:hover .category-cover img {
  transform: scale(1.08);
}

.card-score {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  color: #78350f;
  background: #fde68a;
  font-weight: 900;
  font-size: 0.8rem;
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(6, 182, 212, 0.9);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: 0.25s ease;
}

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

.card-body {
  padding: 17px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}

.card-body h3 {
  margin: 9px 0 8px;
  font-size: 1.08rem;
  line-height: 1.3;
}

.card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  gap: 6px;
}

.tag-row span {
  padding: 4px 8px;
  font-size: 0.74rem;
}

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

.category-tile {
  position: relative;
  display: flex;
  min-height: 170px;
  flex-direction: column;
  justify-content: end;
  overflow: hidden;
  border-radius: 24px;
  color: #fff;
  padding: 18px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.13);
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.86), rgba(15, 23, 42, 0.08));
}

.category-tile img {
  position: absolute;
  inset: 0;
}

.category-tile span,
.category-tile small {
  position: relative;
  z-index: 2;
}

.category-tile span {
  font-size: 1.25rem;
  font-weight: 900;
}

.category-tile small {
  margin-top: 6px;
  color: #dbeafe;
  line-height: 1.5;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: auto 160px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(6, 182, 212, 0.1);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition: 0.25s ease;
}

.rank-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.rank-num {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  font-weight: 900;
}

.rank-poster {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 14px;
  background: #e0f2fe;
}

.rank-content h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.rank-content p {
  display: -webkit-box;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.site-footer {
  margin-top: 40px;
  padding: 46px 20px 24px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #111827 55%, #164e63);
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 28px;
}

.footer-brand {
  color: #fff;
  font-size: 1.35rem;
}

.footer-inner p {
  max-width: 520px;
  color: #94a3b8;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.08);
}

.copyright {
  max-width: 1240px;
  margin: 28px auto 0;
  color: #94a3b8;
  text-align: center;
  font-size: 0.88rem;
}

.page-main {
  padding-top: 34px;
}

.page-hero,
.detail-hero {
  overflow: hidden;
  border-radius: 32px;
  background: radial-gradient(circle at 78% 20%, rgba(6, 182, 212, 0.32), transparent 24%), linear-gradient(135deg, #0f172a, #1e293b 55%, #164e63);
  color: #fff;
  box-shadow: var(--shadow);
}

.page-hero {
  padding: 54px;
  margin-bottom: 10px;
}

.page-hero h1 {
  color: #fff;
}

.page-hero p {
  max-width: 760px;
  color: #dbeafe;
  line-height: 1.8;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: #64748b;
  font-size: 0.95rem;
}

.breadcrumb a:hover {
  color: var(--cyan-dark);
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 18px;
  padding: 16px;
  border: 1px solid rgba(6, 182, 212, 0.1);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  transition: 0.25s ease;
}

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

.category-cover {
  overflow: hidden;
  border-radius: 18px;
  aspect-ratio: 16 / 10;
  background: #e0f2fe;
}

.category-overview-card h2 {
  margin: 4px 0 8px;
  font-size: 1.35rem;
}

.category-overview-card p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.7;
}

.category-mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.category-mini-links a {
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--cyan-dark);
  background: rgba(6, 182, 212, 0.1);
  font-size: 0.85rem;
  font-weight: 700;
}

.detail-main {
  max-width: 1180px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(280px, 38%) 1fr;
  gap: 32px;
  padding: 28px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 26px;
  aspect-ratio: 16 / 10;
  background: #e0f2fe;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
}

.detail-info {
  align-self: center;
}

.detail-info h1 {
  color: #fff;
}

.detail-line {
  margin: 18px 0 18px;
  color: #e2e8f0;
  font-size: 1.12rem;
  line-height: 1.8;
}

.detail-meta {
  color: #cbd5e1;
}

.detail-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.detail-tags {
  margin: 18px 0 22px;
}

.detail-tags a {
  color: #cffafe;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.player-section {
  margin-top: 30px;
  padding: 26px;
  border-radius: 28px;
  background: #fff;
  box-shadow: var(--shadow);
}

.player-section h2 {
  margin-bottom: 18px;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background: #020617;
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
  cursor: pointer;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle at 50% 40%, rgba(6, 182, 212, 0.22), transparent 28%), linear-gradient(0deg, rgba(2, 6, 23, 0.76), rgba(2, 6, 23, 0.38));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--teal));
  box-shadow: 0 20px 50px rgba(6, 182, 212, 0.4);
  font-size: 1.8rem;
}

.player-cover strong {
  font-size: 1.08rem;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  margin-top: 30px;
}

.detail-article,
.detail-side {
  padding: 28px;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 14px;
  font-size: 1.55rem;
}

.detail-article p {
  margin: 0 0 26px;
  color: #334155;
  line-height: 1.95;
  font-size: 1.02rem;
}

.related-grid {
  display: grid;
  gap: 16px;
}

.compact-card .card-body p {
  min-height: auto;
}

.compact-card .tag-row {
  display: none;
}

.is-filtered-out {
  display: none !important;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

  .home-rank-list,
  .category-overview-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

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

  .hero {
    min-height: 760px;
  }

  .hero-content {
    top: 84px;
    right: 20px;
  }

  .hero-poster {
    top: auto;
    right: 20px;
    left: 20px;
    bottom: 188px;
    width: auto;
    height: 170px;
  }

  .hero-search-panel {
    padding-top: 565px;
  }

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

  .detail-hero,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .toolbar,
  .section-head,
  .footer-inner {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .page-hero {
    padding: 34px 24px;
  }
}

@media (max-width: 560px) {
  .header-inner {
    padding: 12px 14px;
  }

  .brand-name {
    font-size: 1.05rem;
  }

  .hero-content h2 {
    font-size: 2.35rem;
  }

  .hero-desc {
    font-size: 1rem;
  }

  .hero-actions,
  .hero-search,
  .inline-search,
  .mobile-search {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-controls {
    bottom: 22px;
  }

  .section,
  .page-main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .movie-grid,
  .category-grid,
  .detail-side .related-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-content p {
    -webkit-line-clamp: 1;
  }

  .player-section,
  .detail-article,
  .detail-side,
  .detail-hero {
    padding: 18px;
    border-radius: 22px;
  }
}
