* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: #111827;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  white-space: nowrap;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #dc2626, #f97316);
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.35);
  font-size: 14px;
}

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

.nav-link {
  color: #e5e7eb;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fb7185;
}

.nav-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(51, 65, 85, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-search input {
  width: 210px;
  border: 0;
  outline: 0;
  padding: 10px 14px;
  color: #fff;
  background: transparent;
}

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

.nav-search button {
  border: 0;
  color: #fff;
  padding: 10px 16px;
  background: #dc2626;
}

.menu-button {
  display: none;
  margin-left: auto;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 28px;
}

.hero-carousel {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: linear-gradient(90deg, #0f172a, #7f1d1d, #9a3412);
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

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

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  transform: scale(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(248, 113, 113, 0.28), transparent 32%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.45) 52%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100% - 1180px) / 2));
  top: 50%;
  width: min(680px, calc(100% - 48px));
  transform: translateY(-50%);
  color: #fff;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: #dc2626;
  box-shadow: 0 14px 30px rgba(220, 38, 38, 0.35);
  font-weight: 700;
}

.hero-content h1,
.hero-content h2 {
  margin: 0 0 18px;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.hero-content p {
  max-width: 620px;
  margin: 0 0 26px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  font-size: 13px;
}

.card-meta span {
  color: #64748b;
  background: #f1f5f9;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #fff;
  background: #dc2626;
  box-shadow: 0 16px 30px rgba(220, 38, 38, 0.35);
}

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

.primary-button:hover {
  background: #b91c1c;
}

.ghost-button {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(10px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 16px;
  transform: translateX(-50%);
}

.hero-prev,
.hero-next,
.hero-dot {
  border: 0;
  color: #fff;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(10px);
}

.hero-prev,
.hero-next {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 28px;
  line-height: 1;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  opacity: 0.58;
}

.hero-dot.active {
  width: 28px;
  background: #ef4444;
  opacity: 1;
}

.home-search-band {
  position: relative;
  z-index: 2;
  margin-top: -34px;
}

.search-band-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 24px;
  align-items: center;
  padding: 26px;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #1e293b);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.28);
}

.search-band-inner h2 {
  margin: 0 0 6px;
  font-size: 28px;
}

.search-band-inner p {
  margin: 0;
  color: #cbd5e1;
}

.large-search,
.filter-bar {
  display: flex;
  gap: 12px;
}

.large-search input,
.filter-bar input,
.filter-bar select {
  min-height: 50px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 0 16px;
  outline: 0;
  background: #fff;
}

.large-search input {
  flex: 1;
}

.large-search button {
  border: 0;
  border-radius: 16px;
  padding: 0 22px;
  color: #fff;
  background: #dc2626;
  font-weight: 800;
}

.section-block {
  padding: 56px 0;
}

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

.section-title h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.15;
}

.section-title a {
  color: #dc2626;
  font-weight: 800;
}

.light-title {
  color: #fff;
}

.light-title a {
  color: #fecaca;
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.18);
}

.poster-box {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #7f1d1d);
}

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

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

.duration-pill,
.rating-pill {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  padding: 4px 9px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
}

.duration-pill {
  right: 10px;
  top: 10px;
}

.rating-pill {
  left: 10px;
  bottom: 10px;
  color: #fde68a;
}

.poster-hover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .poster-hover {
  opacity: 1;
  transform: translateY(0);
}

.movie-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.movie-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
  min-height: 46px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.channel-section {
  padding: 58px 0;
  background: linear-gradient(135deg, #111827, #7f1d1d 62%, #9a3412);
}

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

.channel-grid a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 118px;
  padding: 22px;
  border-radius: 22px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.channel-grid a:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.16);
}

.channel-grid span {
  font-size: 20px;
  font-weight: 900;
}

.channel-grid small {
  color: #fecaca;
  line-height: 1.5;
}

.two-column-section {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 28px;
  padding: 56px 0 10px;
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rank-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border-radius: 18px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateX(4px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

.rank-row img {
  width: 78px;
  height: 104px;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(135deg, #1e293b, #7f1d1d);
}

.rank-row h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.rank-row p {
  margin: 0 0 10px;
  color: #64748b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.compact-list .rank-row {
  grid-template-columns: 40px 64px minmax(0, 1fr);
}

.full-rank-list .rank-row {
  grid-template-columns: 48px 78px minmax(0, 1fr);
}

.rank-index {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #dc2626, #f97316);
  font-weight: 900;
}

.page-shell {
  background: #f8fafc;
}

.page-hero {
  padding: 72px 0;
  color: #fff;
  background:
    radial-gradient(circle at 15% 18%, rgba(248, 113, 113, 0.35), transparent 28%),
    linear-gradient(135deg, #0f172a, #7f1d1d 58%, #9a3412);
}

.small-hero {
  padding: 62px 0;
}

.page-hero span {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 7px 14px;
  border-radius: 999px;
  color: #fecaca;
  background: rgba(255, 255, 255, 0.1);
}

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

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

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

.category-card {
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.14);
}

.category-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 170px;
  overflow: hidden;
  background: linear-gradient(135deg, #1e293b, #7f1d1d);
}

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

.category-card div:last-child {
  padding: 20px;
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 23px;
}

.category-card p {
  margin: 0;
  color: #64748b;
}

.filter-bar {
  position: sticky;
  top: 78px;
  z-index: 10;
  align-items: center;
  padding: 18px;
  margin-top: -28px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(14px);
}

.filter-bar input {
  flex: 1;
}

.filter-bar select {
  min-width: 160px;
}

.empty-result {
  margin: 30px 0 0;
  padding: 24px;
  border-radius: 18px;
  color: #64748b;
  background: #fff;
  text-align: center;
}

.detail-page {
  background: #f8fafc;
}

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

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  filter: blur(1px);
  transform: scale(1.03);
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(220, 38, 38, 0.32), transparent 32%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(15, 23, 42, 0.42));
}

.detail-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 38px;
  align-items: center;
  min-height: 560px;
  padding: 52px 0;
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.42);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

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

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.08;
}

.detail-one-line {
  max-width: 820px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: 20px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0 28px;
}

.tag-cloud span {
  border-radius: 999px;
  padding: 7px 12px;
  color: #fee2e2;
  background: rgba(248, 113, 113, 0.16);
  border: 1px solid rgba(248, 113, 113, 0.22);
}

.player-section {
  padding: 56px 0 34px;
}

.player-section h2 {
  margin: 0 0 18px;
  font-size: clamp(26px, 4vw, 36px);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at 50% 40%, rgba(220, 38, 38, 0.25), transparent 28%),
    rgba(0, 0, 0, 0.42);
}

.player-cover[hidden] {
  display: none;
}

.play-ring {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  color: #fff;
  background: #dc2626;
  box-shadow: 0 16px 44px rgba(220, 38, 38, 0.45);
  font-size: 32px;
}

.player-cover strong {
  font-size: 22px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  padding: 18px 0 26px;
}

.detail-content article,
.detail-side-card {
  border-radius: 24px;
  padding: 28px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.detail-content h2,
.detail-side-card h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.detail-content p {
  margin: 0 0 22px;
  color: #334155;
  font-size: 17px;
}

.detail-side-card dl {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px 18px;
  margin: 0;
}

.detail-side-card dt {
  color: #64748b;
}

.detail-side-card dd {
  margin: 0;
  color: #111827;
  font-weight: 700;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 34px;
  padding: 44px 0;
}

.footer-logo {
  color: #fff;
  margin-bottom: 14px;
}

.site-footer p {
  max-width: 480px;
  margin: 12px 0 0;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

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

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

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

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

  .nav-search {
    display: none;
  }
}

@media (max-width: 860px) {
  .nav-wrap {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .menu-button {
    display: block;
  }

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

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

  .nav-link {
    padding: 10px 0;
  }

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

  .hero-content {
    top: 48%;
  }

  .search-band-inner,
  .two-column-section,
  .detail-hero-inner,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-hero-inner {
    gap: 24px;
  }

  .detail-poster {
    width: min(260px, 72vw);
  }

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

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

  .filter-bar,
  .large-search {
    flex-direction: column;
  }

  .filter-bar {
    position: static;
  }
}

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

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

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

  .hero-meta,
  .detail-meta {
    gap: 8px;
  }

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

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

  .movie-card-body {
    padding: 12px;
  }

  .movie-card h3 {
    font-size: 15px;
  }

  .movie-card p {
    font-size: 13px;
  }

  .section-block {
    padding: 38px 0;
  }

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

  .rank-row,
  .compact-list .rank-row,
  .full-rank-list .rank-row {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .rank-index {
    display: none;
  }

  .rank-row img {
    width: 64px;
    height: 88px;
  }

  .page-hero {
    padding: 48px 0;
  }

  .detail-side-card dl {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
