* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #0f172a;
  background: #f8fafc;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(90deg, #0f172a, #1e293b);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #991b1b);
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.3);
  font-size: 14px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 700;
}

.nav-links a,
.mobile-menu a {
  transition: color 0.2s ease;
}

.nav-links a:hover,
.mobile-menu a:hover {
  color: #f87171;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 14px;
  padding: 0 24px 20px;
  color: #e2e8f0;
  background: #0f172a;
}

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

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #7f1d1d, #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 {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
  transform: scale(1.03);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 35%, rgba(239, 68, 68, 0.28), transparent 34%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.78) 45%, rgba(15, 23, 42, 0.46));
}

.hero-inner {
  position: relative;
  z-index: 1;
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(280px, 0.88fr);
  align-items: center;
  gap: 48px;
  padding: 72px 0;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #fecaca;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero h1,
.hero h2 {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero h2 {
  font-size: clamp(32px, 5vw, 54px);
}

.hero p {
  max-width: 700px;
  margin: 0 0 28px;
  color: #e2e8f0;
  font-size: clamp(16px, 2vw, 20px);
}

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

.btn,
.btn-soft,
.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn {
  color: #ffffff;
  background: #dc2626;
  box-shadow: 0 16px 28px rgba(220, 38, 38, 0.28);
}

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

.btn-soft {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.btn-soft:hover {
  background: rgba(255, 255, 255, 0.26);
  transform: translateY(-2px);
}

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

.btn-dark:hover {
  background: #1e293b;
  transform: translateY(-2px);
}

.hero-panel {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.46);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 16 / 10;
  background: #1e293b;
}

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

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

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  font-weight: 800;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 34px;
  background: #ef4444;
}

.hero-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  max-width: 600px;
  margin-top: 26px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.hero-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 14px;
  color: #ffffff;
  background: transparent;
}

.hero-search input::placeholder {
  color: #cbd5e1;
}

.section {
  padding: 72px 0;
}

.section.alt {
  background: #ffffff;
}

.section.dark {
  color: #ffffff;
  background: #0f172a;
}

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

.section-title {
  margin: 0;
  color: #0f172a;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.15;
}

.dark .section-title {
  color: #ffffff;
}

.section-subtitle {
  margin: 8px 0 0;
  max-width: 720px;
  color: #64748b;
}

.dark .section-subtitle {
  color: #cbd5e1;
}

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

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

.movie-card {
  min-width: 0;
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 2 / 3;
  background: #e2e8f0;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.movie-grid.large .poster-link {
  aspect-ratio: 16 / 10;
}

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

.poster-link:hover img {
  transform: scale(1.08);
}

.poster-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: #dc2626;
  font-size: 12px;
  font-weight: 900;
}

.poster-mask {
  position: absolute;
  inset: auto 0 0;
  padding: 40px 12px 12px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.poster-link:hover .poster-mask {
  opacity: 1;
}

.movie-card-body h3 {
  margin: 12px 0 4px;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.35;
}

.movie-card-body h3 a:hover {
  color: #dc2626;
}

.movie-meta,
.movie-desc {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.movie-desc {
  display: -webkit-box;
  min-height: 42px;
  margin-top: 6px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.tag-row span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  color: #b91c1c;
  background: #fee2e2;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card {
  display: block;
  overflow: hidden;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 38px rgba(15, 23, 42, 0.12);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}

.category-thumbs img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  object-fit: cover;
  background: #e2e8f0;
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-card p {
  margin: 0 0 12px;
  color: #64748b;
  font-size: 14px;
}

.category-card span {
  color: #dc2626;
  font-weight: 900;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 46px 76px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #7f1d1d);
  font-size: 18px;
  font-weight: 900;
}

.rank-cover {
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 2 / 3;
  background: #e2e8f0;
}

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

.rank-item h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.rank-item h3 a:hover {
  color: #dc2626;
}

.rank-item p,
.rank-item span {
  display: block;
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.page-hero {
  padding: 68px 0;
  color: #ffffff;
  background: linear-gradient(120deg, #1e293b, #7f1d1d 58%, #0f172a);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #e2e8f0;
  font-size: 18px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 170px 170px;
  gap: 12px;
  padding: 18px;
  margin: -34px auto 36px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.12);
}

.filter-panel input,
.filter-panel select,
.search-box input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cbd5e1;
  border-radius: 13px;
  outline: 0;
  padding: 0 14px;
  color: #0f172a;
  background: #ffffff;
}

.filter-panel input:focus,
.filter-panel select:focus,
.search-box input:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14);
}

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

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

.detail-page {
  color: #e2e8f0;
  background: #0f172a;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 42px 0 34px;
  background: #0f172a;
}

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.18;
  filter: blur(2px);
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.97), rgba(15, 23, 42, 0.72));
}

.detail-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  aspect-ratio: 2 / 3;
  background: #1e293b;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

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

.breadcrumb {
  margin-bottom: 18px;
  color: #cbd5e1;
  font-size: 14px;
}

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

.detail-info h1 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.detail-line {
  margin: 0 0 18px;
  color: #f8fafc;
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.12);
}

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

.player-section {
  padding: 42px 0 30px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.66));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button-core {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: #dc2626;
  box-shadow: 0 16px 38px rgba(220, 38, 38, 0.38);
  font-size: 34px;
  transform: translateX(2px);
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 26px;
  padding-bottom: 70px;
}

.detail-card {
  padding: 28px;
  border-radius: 24px;
  background: #1e293b;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2);
}

.detail-card + .detail-card {
  margin-top: 22px;
}

.detail-card h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 26px;
}

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

.detail-card p + p {
  margin-top: 14px;
}

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

.related-mini {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #0f172a;
}

.related-mini:hover h3 {
  color: #f87171;
}

.related-mini img {
  width: 78px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
  background: #334155;
}

.related-mini h3 {
  margin: 0 0 4px;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.35;
}

.related-mini p {
  margin: 0;
  color: #94a3b8;
  font-size: 13px;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  max-width: 760px;
  margin-top: 24px;
}

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

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 38px;
  padding: 50px 0;
}

.footer-grid p {
  max-width: 460px;
  margin: 14px 0 0;
  color: #94a3b8;
}

.footer-grid h3 {
  margin: 0 0 14px;
  color: #ffffff;
}

.footer-links {
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  text-align: center;
  font-size: 14px;
}

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

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

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

  .menu-button {
    display: inline-grid;
    place-items: center;
  }

  .hero-inner,
  .detail-layout,
  .content-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    display: none;
  }

  .hero,
  .hero-inner {
    min-height: 600px;
  }

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

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

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

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

  .detail-poster {
    width: min(220px, 70vw);
  }
}

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

  .logo,
  .footer-logo {
    font-size: 20px;
  }

  .hero-actions,
  .section-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn,
  .btn-soft,
  .btn-dark {
    width: 100%;
  }

  .movie-grid,
  .movie-grid.large,
  .search-result-grid,
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .rank-item {
    grid-template-columns: 38px 64px 1fr;
    padding: 10px;
  }

  .rank-number {
    width: 34px;
    height: 34px;
    font-size: 15px;
  }

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