:root {
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --cyan: #0891b2;
  --blue: #2563eb;
  --slate: #0f172a;
  --slate-soft: #1e293b;
  --gray: #64748b;
  --line: #e2e8f0;
  --soft: #f8fafc;
  --white: #ffffff;
  --amber: #f59e0b;
  --rose: #e11d48;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--slate);
  background: linear-gradient(180deg, #f8fafc 0%, #eff6ff 48%, #ecfeff 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

.main-nav {
  color: #ffffff;
  background: linear-gradient(90deg, #0d9488 0%, #0891b2 48%, #2563eb 100%);
  box-shadow: 0 14px 30px rgba(8, 145, 178, 0.24);
}

.nav-inner {
  max-width: 1280px;
  height: 66px;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-links a {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.92);
  transition: 0.22s ease;
}

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

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: #ffffff;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 22px;
}

.hero-carousel {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s 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-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 20%, rgba(8, 145, 178, 0.26), transparent 28%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.62) 44%, rgba(2, 6, 23, 0.28) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0) 45%);
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 84px;
  width: min(1180px, calc(100% - 44px));
  transform: translateX(-50%);
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: #ccfbf1;
  background: rgba(13, 148, 136, 0.22);
  border: 1px solid rgba(153, 246, 228, 0.28);
  backdrop-filter: blur(12px);
}

.hero-content h1 {
  max-width: 800px;
  margin: 18px 0 16px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.05em;
  text-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
}

.hero-content p {
  max-width: 720px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.68;
}

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

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: 0.22s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(90deg, #0d9488, #0891b2);
  box-shadow: 0 18px 38px rgba(8, 145, 178, 0.32);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 42px rgba(8, 145, 178, 0.42);
}

.btn-secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.24);
}

.btn-ghost {
  color: var(--teal-dark);
  background: #ecfeff;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

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

.hero-tags span {
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.hero-control {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transform: translateY(-50%);
  transition: 0.22s ease;
}

.hero-control:hover {
  background: rgba(15, 23, 42, 0.72);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: 0.22s ease;
}

.hero-dots button.is-active {
  width: 34px;
  background: #ffffff;
}

.section {
  padding: 72px 0;
}

.section-tight {
  padding: 48px 0;
}

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

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--teal-dark);
  font-weight: 800;
}

.section-header h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  color: #111827;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-header h2 {
  font-size: clamp(30px, 4vw, 44px);
}

.section-header p,
.page-title p {
  max-width: 760px;
  margin: 12px 0 0;
  color: #64748b;
  font-size: 17px;
  line-height: 1.75;
}

.feature-panel {
  border-radius: 32px;
  padding: 34px;
  background: linear-gradient(90deg, #f0fdfa, #ecfeff);
  box-shadow: inset 0 0 0 1px rgba(13, 148, 136, 0.12), var(--shadow);
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.16);
}

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0f172a;
}

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

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

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

.card-cover::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.02));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-cover::after {
  opacity: 1;
}

.quality-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.quality-badge {
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  color: #ffffff;
  background: linear-gradient(90deg, #0d9488, #0891b2);
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  background: #fbbf24;
}

.card-body {
  padding: 18px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: #64748b;
  font-size: 13px;
  margin-bottom: 10px;
}

.card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card-body h3 {
  margin: 0 0 10px;
  font-size: 19px;
  line-height: 1.35;
  font-weight: 900;
  color: #0f172a;
}

.card-body h3 a:hover {
  color: var(--teal-dark);
}

.card-body p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 14px;
  overflow: hidden;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  padding: 5px 9px;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  min-height: 210px;
  padding: 26px;
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
  background: linear-gradient(135deg, #0d9488, #0891b2 52%, #2563eb);
  box-shadow: 0 20px 48px rgba(8, 145, 178, 0.26);
  transition: 0.25s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 62px rgba(8, 145, 178, 0.36);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.2;
}

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.68;
}

.rank-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
}

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

.rank-row {
  min-height: 86px;
  display: grid;
  grid-template-columns: 48px 60px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 13px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: 0.22s ease;
}

.rank-row:hover {
  transform: translateX(6px);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.14);
}

.rank-number {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 900;
  color: #ffffff;
  background: linear-gradient(135deg, #0d9488, #2563eb);
}

.rank-row img {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  object-fit: cover;
}

.rank-info {
  min-width: 0;
}

.rank-info strong,
.rank-info em {
  display: block;
}

.rank-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #0f172a;
}

.rank-info em {
  margin-top: 5px;
  color: #64748b;
  font-size: 13px;
  font-style: normal;
}

.rank-watch {
  padding: 8px 12px;
  border-radius: 999px;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 13px;
  font-weight: 900;
}

.search-panel,
.filter-panel {
  border-radius: 30px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.search-form,
.filter-form {
  display: grid;
  grid-template-columns: 1fr 180px 160px;
  gap: 14px;
  margin-bottom: 24px;
}

.search-form input,
.filter-form input,
.filter-form select {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  transition: 0.2s ease;
}

.search-form input:focus,
.filter-form input:focus,
.filter-form select:focus {
  border-color: #0d9488;
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
}

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

.search-result-card {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 14px;
  padding: 12px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.search-result-card img {
  width: 82px;
  height: 112px;
  border-radius: 14px;
  object-fit: cover;
}

.search-result-card strong {
  display: block;
  margin: 3px 0 8px;
  color: #0f172a;
}

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

.page-title {
  padding: 56px 0 26px;
}

.page-title h1 {
  font-size: clamp(36px, 5vw, 58px);
}

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

.breadcrumb a {
  color: var(--teal-dark);
  font-weight: 800;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 32px;
  align-items: start;
}

.player-card,
.detail-panel,
.related-panel {
  border-radius: 30px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

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

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.52), rgba(2, 6, 23, 0.18));
  cursor: pointer;
  transition: opacity 0.25s ease;
}

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

.play-button {
  width: 94px;
  height: 94px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #0d9488, #0891b2);
  box-shadow: 0 20px 44px rgba(8, 145, 178, 0.42);
  cursor: pointer;
  transition: 0.22s ease;
}

.play-button:hover {
  transform: scale(1.06);
}

.play-button span {
  margin-left: 6px;
  font-size: 38px;
}

.player-caption {
  padding: 22px 26px;
}

.player-caption h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
  font-weight: 900;
  color: #0f172a;
}

.player-caption p {
  margin: 0;
  color: #64748b;
  line-height: 1.72;
}

.detail-panel {
  padding: 28px;
}

.detail-cover {
  overflow: hidden;
  margin-bottom: 22px;
  border-radius: 24px;
  aspect-ratio: 2 / 3;
  background: #0f172a;
}

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

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

.detail-meta div {
  padding: 13px;
  border-radius: 16px;
  background: #f8fafc;
}

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

.detail-meta strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-tags span {
  padding: 8px 12px;
  color: #0f766e;
  background: #ccfbf1;
  font-weight: 800;
}

.content-block {
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.content-block h2 {
  margin: 0 0 14px;
  font-size: 24px;
  color: #0f172a;
}

.content-block p {
  margin: 0;
  color: #475569;
  font-size: 17px;
  line-height: 1.9;
}

.review-block {
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(90deg, #fffbeb, #fff7ed);
}

.related-panel {
  margin-top: 34px;
  padding: 30px;
}

.related-panel h2 {
  margin: 0 0 24px;
  font-size: 30px;
}

.site-footer {
  margin-top: 70px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #1e293b, #0f172a);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 46px 22px;
}

.footer-brand strong {
  display: block;
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 24px;
}

.footer-brand p {
  max-width: 820px;
  margin: 0;
  color: #cbd5e1;
  line-height: 1.75;
}

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

.footer-links a {
  color: #cbd5e1;
}

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

.copyright {
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 40;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: var(--teal);
  box-shadow: 0 14px 28px rgba(13, 148, 136, 0.32);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: 0.22s ease;
}

.back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.empty-state {
  padding: 26px;
  border-radius: 20px;
  color: #64748b;
  background: #ffffff;
  text-align: center;
}

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

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

@media (max-width: 820px) {
  .nav-inner {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: block;
  }

  .nav-links {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0 0 16px;
  }

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

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

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

  .hero-content {
    bottom: 78px;
  }

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

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

  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }

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

@media (max-width: 560px) {
  .container,
  .nav-inner,
  .footer-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

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

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

  .hero-control {
    display: none;
  }

  .hero-content {
    width: calc(100% - 32px);
  }

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

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

  .feature-panel,
  .search-panel,
  .filter-panel,
  .detail-panel,
  .related-panel {
    padding: 20px;
    border-radius: 22px;
  }

  .rank-row {
    grid-template-columns: 40px 54px 1fr;
  }

  .rank-watch {
    display: none;
  }
}
