* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: #0f172a;
  background: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

p {
  margin: 0;
  line-height: 1.75;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.2;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #e2e8f0;
  backdrop-filter: blur(16px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #1e3a8a;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  color: #fff;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #1e3a8a, #1d4ed8 55%, #f59e0b);
  box-shadow: 0 12px 26px rgba(30, 58, 138, 0.28);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links a {
  color: #334155;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #1e3a8a;
  background: #dbeafe;
}

.mobile-menu-btn {
  display: none;
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  color: #1e3a8a;
  border-radius: 0.8rem;
  background: #eff6ff;
  cursor: pointer;
}

.mobile-menu-btn span {
  display: block;
  width: 1.35rem;
  height: 2px;
  margin: 0.28rem auto;
  background: currentColor;
  border-radius: 999px;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 18% 20%, rgba(59, 130, 246, 0.52), transparent 28rem),
    radial-gradient(circle at 86% 12%, rgba(245, 158, 11, 0.35), transparent 24rem),
    linear-gradient(120deg, #0f172a 0%, #1e3a8a 48%, #1d4ed8 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 46px 46px;
  opacity: 0.35;
}

.hero-inner {
  position: relative;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  align-items: center;
  gap: 2.5rem;
  padding: 4.5rem 0;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  padding: 0.35rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #bfdbfe;
  font-weight: 700;
  backdrop-filter: blur(14px);
}

.hero h1 {
  max-width: 780px;
  margin-top: 1.15rem;
  font-size: clamp(2.35rem, 5vw, 4.8rem);
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-subtitle {
  max-width: 760px;
  margin-top: 1.2rem;
  color: #dbeafe;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  border-radius: 0.75rem;
  padding: 0.65rem 1.15rem;
  font-weight: 800;
  transition: all 0.22s ease;
}

.btn-primary {
  color: #fff;
  background: #1e3a8a;
  box-shadow: 0 12px 28px rgba(30, 58, 138, 0.28);
}

.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.btn-secondary {
  color: #1e3a8a;
  background: #fff;
}

.btn-secondary:hover {
  color: #1d4ed8;
  transform: translateY(-1px);
}

.btn-ghost {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.14);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.22);
}

.hero-search {
  display: flex;
  align-items: center;
  max-width: 620px;
  margin-top: 1.6rem;
  padding: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 1.05rem;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
}

.hero-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 0.8rem 0.9rem;
  font-size: 1rem;
}

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.hero-search a {
  white-space: nowrap;
  color: #1e3a8a;
  border-radius: 0.75rem;
  background: #fff;
  padding: 0.75rem 1rem;
  font-weight: 800;
}

.hero-panel {
  position: relative;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  min-height: 470px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 1.5rem;
  background: rgba(15, 23, 42, 0.32);
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.38);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  min-height: 470px;
  object-fit: cover;
  background: #1e293b;
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.34), rgba(15, 23, 42, 0.08));
}

.hero-slide-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 2rem;
}

.hero-slide-content h2 {
  margin-bottom: 0.65rem;
  font-size: clamp(1.65rem, 4vw, 2.5rem);
  font-weight: 900;
}

.hero-slide-content p {
  color: #e2e8f0;
}

.hero-dots {
  position: absolute;
  right: 1.35rem;
  bottom: 1.35rem;
  z-index: 5;
  display: flex;
  gap: 0.4rem;
}

.hero-dot {
  width: 0.65rem;
  height: 0.65rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 1.6rem;
  background: #fff;
}

.hero-mini-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 0.9rem;
}

.hero-mini-card {
  overflow: hidden;
  min-height: 112px;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-mini-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.18);
}

.hero-mini-card img {
  width: 100%;
  height: 74px;
  object-fit: cover;
  background: #1e293b;
}

.hero-mini-card span {
  display: block;
  overflow: hidden;
  padding: 0.55rem 0.65rem;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section {
  padding: 3.5rem 0;
}

.section-tight {
  padding: 2rem 0 3.5rem;
}

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

.section-title {
  color: #0f172a;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-desc {
  max-width: 780px;
  color: #64748b;
  margin-top: 0.55rem;
}

.grid {
  display: grid;
  gap: 1.35rem;
}

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

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

.video-card {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 0.95rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: all 0.25s ease;
}

.video-card:hover {
  transform: translateY(-4px);
  border-color: #bfdbfe;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.video-card-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #e2e8f0;
}

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

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

.card-gradient {
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.82), transparent);
}

.card-rating {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  color: #92400e;
  border-radius: 999px;
  background: #fef3c7;
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 900;
}

.video-card-body {
  padding: 0.9rem;
}

.video-card h3 {
  display: -webkit-box;
  overflow: hidden;
  min-height: 2.65em;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 900;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-card h3:hover {
  color: #1e3a8a;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.6rem;
  color: #64748b;
  font-size: 0.86rem;
}

.card-line {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 0.6rem;
  color: #64748b;
  font-size: 0.88rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.badges,
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.badge,
.tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 800;
}

.badge-year {
  color: #1e3a8a;
  background: #dbeafe;
}

.badge-region {
  color: #166534;
  background: #dcfce7;
}

.badge-type {
  color: #92400e;
  background: #fef3c7;
}

.tag {
  color: #334155;
  background: #f1f5f9;
}

.filters {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.4rem;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #fff;
  padding: 0.8rem;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.8rem;
  outline: 0;
  padding: 0.85rem 1rem;
  color: #0f172a;
  background: #fff;
  font-size: 1rem;
  transition: all 0.18s ease;
}

.input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.filter-btn {
  border: 1px solid #dbeafe;
  border-radius: 999px;
  color: #1e3a8a;
  background: #eff6ff;
  padding: 0.55rem 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s ease;
}

.filter-btn:hover,
.filter-btn.is-active {
  color: #fff;
  border-color: #1e3a8a;
  background: #1e3a8a;
}

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  border: 1px solid #dbeafe;
  border-radius: 1.1rem;
  background: linear-gradient(135deg, #fff, #eff6ff);
  padding: 1.2rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  transition: all 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(30, 58, 138, 0.14);
}

.category-card::after {
  content: "";
  position: absolute;
  width: 10rem;
  height: 10rem;
  right: -4rem;
  bottom: -4rem;
  border-radius: 50%;
  background: rgba(29, 78, 216, 0.12);
}

.category-card h2,
.category-card h3 {
  position: relative;
  z-index: 1;
  color: #1e3a8a;
  font-size: 1.35rem;
  font-weight: 900;
}

.category-card p {
  position: relative;
  z-index: 1;
  margin-top: 0.75rem;
  color: #475569;
  font-size: 0.95rem;
}

.category-card .btn-primary {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 3.2rem 120px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  background: #fff;
  padding: 0.85rem;
  transition: all 0.22s ease;
}

.rank-item:hover {
  transform: translateY(-2px);
  border-color: #bfdbfe;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.1);
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  color: #92400e;
  border-radius: 999px;
  background: #fef3c7;
  font-weight: 900;
}

.rank-item img {
  width: 120px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 0.75rem;
  background: #e2e8f0;
}

.rank-info h3 {
  font-size: 1.02rem;
  font-weight: 900;
}

.rank-info p {
  display: -webkit-box;
  overflow: hidden;
  color: #64748b;
  font-size: 0.9rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.page-hero {
  color: #fff;
  background:
    radial-gradient(circle at 12% 0%, rgba(96, 165, 250, 0.42), transparent 26rem),
    linear-gradient(120deg, #0f172a, #1e3a8a 56%, #1d4ed8);
  padding: 4rem 0;
}

.page-hero h1 {
  font-size: clamp(2.1rem, 5vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 780px;
  margin-top: 0.9rem;
  color: #dbeafe;
  font-size: 1.1rem;
}

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

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

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

.player-card {
  overflow: hidden;
  border-radius: 1.2rem;
  background: #020617;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.25);
}

.player-shell {
  position: relative;
  background: #020617;
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.22));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-card.is-playing .play-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5.2rem;
  height: 5.2rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #1e3a8a;
  font-size: 2rem;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.3);
  transform: scale(1);
  transition: transform 0.22s ease;
}

.play-overlay:hover .play-circle {
  transform: scale(1.08);
}

.player-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  color: #cbd5e1;
  background: #0f172a;
  padding: 0.85rem 1rem;
}

.detail-panel,
.sidebar-panel {
  border: 1px solid #e2e8f0;
  border-radius: 1.1rem;
  background: #fff;
  padding: 1.35rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.detail-panel h2,
.sidebar-panel h2 {
  margin-bottom: 0.8rem;
  color: #0f172a;
  font-size: 1.35rem;
  font-weight: 900;
}

.detail-panel p + h2 {
  margin-top: 1.5rem;
}

.detail-panel p {
  color: #334155;
}

.poster {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 0.85rem;
  background: #e2e8f0;
}

.meta-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.meta-list div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 0.55rem;
  color: #475569;
}

.meta-list strong {
  color: #0f172a;
}

.footer {
  margin-top: 3rem;
  color: #cbd5e1;
  background: #0f172a;
  padding: 2.2rem 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer a {
  color: #bfdbfe;
}

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

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

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

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

@media (max-width: 920px) {
  .mobile-menu-btn {
    display: inline-block;
  }

  .nav-links {
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: #fff;
    padding: 0.7rem;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
  }

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

  .hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 3.3rem 0;
  }

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

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

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

  .filter-buttons {
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .container-custom {
    padding: 0 0.85rem;
  }

  .grid-movies,
  .grid-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
  }

  .hero-search {
    align-items: stretch;
    flex-direction: column;
  }

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

  .hero-carousel,
  .hero-slide img {
    min-height: 380px;
  }

  .hero-slide-content {
    padding: 1.2rem;
  }

  .section {
    padding: 2.5rem 0;
  }

  .rank-item {
    grid-template-columns: 2.5rem 96px minmax(0, 1fr);
    gap: 0.7rem;
  }

  .rank-item img {
    width: 96px;
  }

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

@media (max-width: 420px) {
  .grid-movies,
  .grid-categories {
    grid-template-columns: 1fr;
  }
}
