* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f8fafc;
  color: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container-custom {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.9rem;
  color: #ffffff;
  background: linear-gradient(135deg, #14b8a6, #0891b2);
  box-shadow: 0 18px 45px rgba(20, 184, 166, 0.25);
}

.logo-text {
  font-size: 1.2rem;
  color: #0f172a;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 0.35rem;
}

.nav-link,
.mobile-nav-link {
  border-radius: 999px;
  color: #475569;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link {
  padding: 0.65rem 0.9rem;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: #0f766e;
  background: #ccfbf1;
}

.mobile-menu-button {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
  width: 2.65rem;
  height: 2.65rem;
  border: 0;
  border-radius: 0.85rem;
  background: #f1f5f9;
  padding: 0.55rem;
}

.mobile-menu-button span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: #0f172a;
}

.mobile-nav {
  display: none;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 0.75rem 1rem 1rem;
}

.mobile-nav.open {
  display: grid;
  gap: 0.5rem;
}

.mobile-nav-link {
  padding: 0.85rem 1rem;
}

.hero-section {
  position: relative;
  min-height: 68vh;
  overflow: hidden;
  background: #020617;
}

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

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

.hero-slide img,
.detail-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.55), rgba(2, 6, 23, 0.16)), linear-gradient(0deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.05) 58%, rgba(2, 6, 23, 0.72));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  min-height: 68vh;
  padding-top: 6rem;
  padding-bottom: 6.5rem;
}

.hero-copy {
  max-width: 720px;
  color: #ffffff;
}

.hero-kicker,
.section-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.8rem;
  color: #67e8f9;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-kicker span {
  border: 1px solid rgba(103, 232, 249, 0.4);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  background: rgba(15, 23, 42, 0.52);
}

.hero-copy h1,
.hero-copy h2,
.page-hero h1,
.detail-intro h1 {
  margin: 0;
  font-size: clamp(2.25rem, 6vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-movie-title {
  margin-top: 0.85rem !important;
  font-size: clamp(1.65rem, 3.5vw, 3.25rem) !important;
  color: #ccfbf1;
}

.hero-copy p,
.page-hero p,
.detail-intro p {
  max-width: 760px;
  margin: 1.1rem 0 0;
  color: #dbeafe;
  font-size: 1.08rem;
  line-height: 1.85;
}

.hero-tags,
.detail-tags,
.tag-row,
.genre-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.hero-tags,
.detail-tags {
  margin-top: 1.2rem;
}

.hero-tags span,
.detail-tags span,
.tag-row span,
.genre-row span {
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.12);
  color: #0f766e;
  padding: 0.34rem 0.68rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-tags span,
.detail-tags span {
  background: rgba(255, 255, 255, 0.13);
  color: #ecfeff;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.55rem;
}

.btn-primary,
.btn-ghost,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  min-height: 3rem;
  padding: 0.85rem 1.3rem;
  color: #ffffff;
  background: linear-gradient(135deg, #14b8a6, #0891b2);
  box-shadow: 0 20px 40px rgba(8, 145, 178, 0.32);
}

.btn-ghost {
  min-height: 3rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 0.85rem 1.25rem;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.btn-primary:hover,
.btn-ghost:hover,
.section-link:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateX(-50%);
  pointer-events: none;
}

.hero-arrow,
.hero-dot {
  pointer-events: auto;
}

.hero-arrow {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.6);
  font-size: 2rem;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 0.55rem;
}

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

.hero-dot.active {
  width: 2rem;
  background: #2dd4bf;
}

.section-block {
  padding: 4.5rem 0;
}

.muted-section {
  background: linear-gradient(180deg, #f8fafc, #eef2ff);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.section-title {
  margin: 0;
  color: #1e293b;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-kicker {
  color: #0d9488;
}

.section-link {
  flex: 0 0 auto;
  padding: 0.68rem 1rem;
  color: #0f766e;
  background: #ccfbf1;
}

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

.video-card {
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 1.25rem;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.video-card:hover {
  transform: translateY(-0.28rem);
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.14);
}

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

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

.video-card:hover .card-cover img {
  transform: scale(1.05);
}

.score-badge,
.type-badge {
  position: absolute;
  top: 0.75rem;
  border-radius: 999px;
  padding: 0.26rem 0.56rem;
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 800;
}

.score-badge {
  left: 0.75rem;
  background: rgba(20, 184, 166, 0.92);
}

.type-badge {
  right: 0.75rem;
  background: rgba(15, 23, 42, 0.72);
}

.card-body {
  padding: 1rem;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}

.card-body h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.03rem;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: #0f766e;
}

.card-body p {
  display: -webkit-box;
  min-height: 3.15rem;
  margin: 0.65rem 0 0.85rem;
  overflow: hidden;
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 11rem;
  border-radius: 1.35rem;
  padding: 1.35rem;
  color: #ffffff;
  background: radial-gradient(circle at 15% 15%, rgba(45, 212, 191, 0.65), transparent 28%), linear-gradient(135deg, #0f172a, #164e63);
  box-shadow: 0 24px 65px rgba(15, 23, 42, 0.17);
}

.category-glow {
  position: absolute;
  right: -2rem;
  bottom: -2rem;
  width: 8rem;
  height: 8rem;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.22);
}

.category-tile strong,
.category-tile p,
.category-tile em {
  position: relative;
  z-index: 1;
}

.category-tile strong {
  display: block;
  font-size: 1.35rem;
}

.category-tile p {
  margin: 0.75rem 0 1.1rem;
  color: #dbeafe;
  line-height: 1.65;
}

.category-tile em {
  font-style: normal;
  font-weight: 800;
  color: #99f6e4;
}

.filter-panel {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  border: 1px solid #e2e8f0;
  border-radius: 1.25rem;
  padding: 1rem;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.filter-panel label {
  display: grid;
  gap: 0.35rem;
  color: #475569;
  font-size: 0.82rem;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 2.8rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.9rem;
  outline: none;
  padding: 0 0.85rem;
  color: #0f172a;
  background: #f8fafc;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: #14b8a6;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

.empty-state {
  display: none;
  border: 1px dashed #cbd5e1;
  border-radius: 1.25rem;
  padding: 2rem;
  color: #64748b;
  text-align: center;
  background: #ffffff;
}

.empty-state.show {
  display: block;
}

.ranking-preview {
  background: #0f172a;
}

.ranking-preview .section-title,
.ranking-preview .section-heading {
  color: #ffffff;
}

.ranking-list {
  display: grid;
  gap: 0.75rem;
}

.ranking-row {
  display: grid;
  grid-template-columns: auto 4rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 1rem;
  padding: 0.7rem;
  background: rgba(255, 255, 255, 0.92);
  transition: transform 0.2s ease, background 0.2s ease;
}

.ranking-preview .ranking-row {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.ranking-row:hover {
  transform: translateX(0.25rem);
  background: #ccfbf1;
}

.ranking-preview .ranking-row:hover {
  color: #0f172a;
}

.ranking-number {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #14b8a6, #0891b2);
  font-weight: 900;
}

.ranking-row img {
  width: 4rem;
  height: 5.2rem;
  border-radius: 0.75rem;
  object-fit: cover;
}

.ranking-main {
  min-width: 0;
}

.ranking-main strong,
.ranking-main em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-main em {
  margin-top: 0.3rem;
  color: #64748b;
  font-size: 0.85rem;
  font-style: normal;
}

.ranking-preview .ranking-main em {
  color: #cbd5e1;
}

.ranking-score {
  color: #f97316;
  font-size: 1.1rem;
  font-weight: 900;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

.page-hero {
  padding: 5rem 0;
}

.small-hero {
  background: radial-gradient(circle at 10% 10%, rgba(20, 184, 166, 0.32), transparent 32%), linear-gradient(135deg, #0f172a, #164e63);
}

.category-hero {
  background: radial-gradient(circle at 82% 14%, rgba(34, 211, 238, 0.32), transparent 34%), linear-gradient(135deg, #020617, #134e4a);
}

.ranking-hero {
  background: radial-gradient(circle at 22% 18%, rgba(249, 115, 22, 0.3), transparent 32%), linear-gradient(135deg, #020617, #0f172a);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: #99f6e4;
  font-weight: 700;
}

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

.detail-hero {
  min-height: 34rem;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding-top: 4rem;
  padding-bottom: 3rem;
}

.detail-intro {
  display: grid;
  gap: 1.5rem;
  align-items: end;
}

.detail-poster {
  width: min(15rem, 60vw);
  border: 4px solid rgba(255, 255, 255, 0.28);
  border-radius: 1.35rem;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.3rem;
}

.detail-stats span {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 1rem;
  padding: 0.7rem 0.9rem;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.56);
}

.detail-stats strong {
  color: #ffffff;
}

.player-layout {
  display: grid;
  gap: 1.25rem;
}

.player-card,
.watch-info,
.detail-content article {
  border: 1px solid #e2e8f0;
  border-radius: 1.35rem;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.player-card {
  overflow: hidden;
}

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

.movie-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.72));
  font-size: 1.05rem;
  font-weight: 900;
}

.player-overlay.is-hidden {
  display: none;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #14b8a6, #0891b2);
  box-shadow: 0 20px 45px rgba(8, 145, 178, 0.35);
  font-size: 1.7rem;
}

.watch-info {
  padding: 1.25rem;
}

.watch-info h2,
.detail-content h2 {
  margin: 0 0 0.8rem;
  color: #0f172a;
}

.watch-info p,
.detail-content p {
  margin: 0;
  color: #475569;
  line-height: 1.9;
}

.info-list {
  display: grid;
  gap: 0.45rem;
  margin: 1rem 0;
  color: #334155;
  font-weight: 700;
}

.detail-content {
  display: grid;
  gap: 1rem;
}

.detail-content article {
  padding: 1.35rem;
}

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

.site-footer {
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
  padding-top: 3rem;
  padding-bottom: 2rem;
}

.footer-logo {
  color: #ffffff;
  font-size: 1.2rem;
}

.site-footer p {
  max-width: 32rem;
  color: #94a3b8;
  line-height: 1.8;
}

.site-footer h3 {
  margin: 0 0 1rem;
  color: #ffffff;
}

.footer-links {
  display: grid;
  gap: 0.55rem;
}

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding: 1.2rem 1rem;
  color: #94a3b8;
  text-align: center;
}

@media (min-width: 560px) {
  .movie-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (min-width: 768px) {
  .container-custom {
    padding: 0 1.5rem;
  }

  .desktop-nav {
    display: flex;
  }

  .mobile-menu-button {
    display: none;
  }

  .mobile-nav {
    display: none !important;
  }

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

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

  .filter-panel {
    grid-template-columns: minmax(16rem, 1.6fr) repeat(3, minmax(8rem, 1fr));
    align-items: end;
  }

  .detail-intro {
    grid-template-columns: 15rem minmax(0, 1fr);
  }

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

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

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

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

  .player-layout {
    grid-template-columns: minmax(0, 1.55fr) minmax(20rem, 0.8fr);
    align-items: start;
  }

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

@media (min-width: 1280px) {
  .movie-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

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

@media (max-width: 767px) {
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-controls {
    justify-content: center;
    gap: 1rem;
  }

  .hero-arrow {
    display: none;
  }

  .ranking-row {
    grid-template-columns: auto 3.5rem minmax(0, 1fr);
  }

  .ranking-score {
    display: none;
  }
}
