* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #111827;
  background: linear-gradient(135deg, #fff1f2 0%, #fffbeb 42%, #ecfdf5 100%);
  min-height: 100vh;
}

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
  backdrop-filter: blur(18px);
}

.nav-wrap {
  max-width: 1280px;
  height: 72px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #e11d48, #d97706, #059669);
  box-shadow: 0 14px 28px rgba(225, 29, 72, 0.28);
  font-size: 14px;
}

.brand-text,
.footer-brand {
  font-size: 25px;
  line-height: 1;
  background: linear-gradient(90deg, #e11d48, #d97706, #059669);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.nav-link,
.mobile-link {
  color: #374151;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 12px;
  transition: 0.25s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #e11d48;
  background: #fff1f2;
}

.top-search,
.mobile-search,
.search-page-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.search-page-form input,
.filter-bar input,
.filter-bar select {
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  outline: none;
  transition: 0.2s ease;
}

.top-search input {
  width: 220px;
  padding: 11px 16px;
}

.top-search input:focus,
.mobile-search input:focus,
.search-page-form input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #f43f5e;
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.12);
}

.top-search button,
.mobile-search button,
.search-page-form button,
.hero-button,
.outline-button {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #e11d48, #d97706);
  color: #fff;
  font-weight: 800;
  padding: 11px 18px;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(225, 29, 72, 0.2);
  transition: 0.25s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.search-page-form button:hover,
.hero-button:hover,
.outline-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(225, 29, 72, 0.28);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: #fff1f2;
  color: #e11d48;
  font-size: 24px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 0 24px 18px;
  border-top: 1px solid #f3f4f6;
}

.mobile-panel.open {
  display: block;
}

.mobile-search {
  margin: 16px 0;
}

.mobile-search input {
  flex: 1;
  padding: 12px 16px;
}

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

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #111827;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  transition: opacity 1s ease;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.05));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}

.hero-content > * {
  max-width: 680px;
}

.hero-kicker {
  color: #fbbf24;
  font-weight: 900;
  margin-bottom: 16px;
}

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-content p {
  margin: 0 0 24px;
  color: #e5e7eb;
  font-size: 20px;
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}

.hero-meta span {
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-weight: 700;
}

.hero-button {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
}

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

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

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

.section-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px;
}

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

.section-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, #e11d48, #d97706, #059669);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-head a {
  color: #e11d48;
  font-weight: 800;
}

.grid {
  display: grid;
  gap: 24px;
}

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

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.1);
  transition: 0.3s ease;
}

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

.card-cover,
.small-cover,
.ranking-cover,
.poster-card {
  position: relative;
  display: block;
  background-image: linear-gradient(135deg, rgba(225, 29, 72, 0.82), rgba(217, 119, 6, 0.7), rgba(5, 150, 105, 0.72)), var(--cover-image);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.card-cover {
  aspect-ratio: 16 / 9;
}

.movie-card.compact .card-cover {
  aspect-ratio: 4 / 3;
}

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.36), transparent 55%);
  opacity: 0.3;
  transition: 0.3s ease;
}

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

.play-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.88);
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #e11d48;
  font-weight: 900;
  opacity: 0;
  transition: 0.28s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.duration-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.78);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

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

.card-title {
  color: #111827;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
  transition: color 0.25s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-card:hover .card-title {
  color: #e11d48;
}

.card-desc {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #6b7280;
  font-size: 13px;
}

.pill {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  color: #e11d48;
  background: #fff1f2;
  font-weight: 800;
}

.split-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.1);
}

.rank-title {
  margin-bottom: 14px;
  font-size: 24px;
  font-weight: 900;
  background: linear-gradient(90deg, #d97706, #059669);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
}

.rank-row span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #e11d48, #d97706);
  font-weight: 900;
  font-size: 13px;
}

.rank-row strong {
  min-width: 0;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-row em {
  color: #9ca3af;
  font-style: normal;
  font-size: 12px;
}

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

.category-tile,
.category-block,
.detail-article,
.related-panel,
.detail-side,
.ranking-card,
.filter-bar,
.search-page-form {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.category-tile {
  min-height: 180px;
  padding: 22px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.14);
}

.category-title {
  font-size: 22px;
  font-weight: 900;
  color: #111827;
}

.category-desc {
  color: #6b7280;
  line-height: 1.65;
  font-size: 14px;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.category-samples a {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff1f2;
  color: #e11d48;
  font-size: 12px;
  font-weight: 800;
}

.page-hero,
.detail-hero {
  max-width: 1280px;
  margin: 34px auto 0;
  padding: 0 24px;
}

.page-hero > div {
  min-height: 260px;
  padding: 48px;
  border-radius: 32px;
  color: #fff;
  background: radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.28), transparent 28%), linear-gradient(135deg, #e11d48, #d97706 48%, #059669);
  box-shadow: 0 24px 56px rgba(225, 29, 72, 0.22);
}

.page-hero span {
  display: inline-flex;
  margin-bottom: 14px;
  font-weight: 900;
  color: #fde68a;
}

.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
  line-height: 1.8;
}

.category-list {
  display: grid;
  gap: 28px;
}

.category-block {
  padding: 28px;
  border-radius: 28px;
}

.category-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.category-block-head h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.category-block-head p {
  margin: 0;
  color: #6b7280;
}

.outline-button {
  background: linear-gradient(90deg, #e11d48, #d97706);
  flex: 0 0 auto;
}

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

.small-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border-radius: 18px;
  transition: 0.25s ease;
}

.small-card:hover {
  background: #f9fafb;
}

.small-cover {
  width: 120px;
  height: 76px;
  border-radius: 14px;
}

.small-cover span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.small-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.small-info strong {
  font-size: 15px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.small-info em {
  color: #6b7280;
  font-style: normal;
  font-size: 12px;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 190px 190px;
  gap: 14px;
  margin-bottom: 28px;
  padding: 18px;
  border-radius: 24px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  padding: 13px 16px;
}

.empty-state {
  margin-top: 24px;
  padding: 46px;
  border-radius: 24px;
  background: #fff;
  color: #6b7280;
  text-align: center;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.ranking-list {
  display: grid;
  gap: 18px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: center;
  padding: 18px;
  border-radius: 24px;
}

.ranking-cover {
  height: 138px;
  border-radius: 20px;
}

.ranking-cover span {
  position: absolute;
  left: 14px;
  top: 14px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #e11d48, #d97706);
  font-weight: 900;
}

.ranking-info h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.ranking-info p {
  margin: 0 0 14px;
  color: #6b7280;
  line-height: 1.7;
}

.ranking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #6b7280;
  font-size: 13px;
}

.ranking-meta a,
.ranking-meta span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #f9fafb;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  margin-bottom: 18px;
  font-size: 14px;
}

.breadcrumb a {
  color: #e11d48;
  font-weight: 800;
}

.detail-head-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: stretch;
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 32px;
  background: #030712;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28);
}

.movie-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 34px;
  color: #fff;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.18));
  transition: 0.25s ease;
}

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

.big-play {
  width: 84px;
  height: 84px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #e11d48, #d97706);
  color: #fff;
  box-shadow: 0 18px 42px rgba(225, 29, 72, 0.32);
  font-size: 28px;
  cursor: pointer;
  transition: 0.25s ease;
}

.big-play:hover {
  transform: scale(1.07);
}

.player-overlay span {
  color: #fbbf24;
  font-weight: 900;
}

.player-overlay h1 {
  margin: 8px 0 12px;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.1;
}

.player-overlay p {
  max-width: 720px;
  margin: 0;
  color: #e5e7eb;
  line-height: 1.75;
}

.detail-side {
  padding: 18px;
  border-radius: 30px;
}

.poster-card {
  height: 260px;
  border-radius: 22px;
  margin-bottom: 18px;
}

.detail-meta {
  margin: 0;
  display: grid;
  gap: 10px;
}

.detail-meta div {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
}

.detail-meta dt {
  color: #9ca3af;
  font-weight: 800;
}

.detail-meta dd {
  margin: 0;
  color: #111827;
  font-weight: 800;
}

.detail-meta a {
  color: #e11d48;
}

.detail-content-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.detail-article,
.related-panel {
  border-radius: 28px;
  padding: 28px;
}

.detail-article h2,
.related-panel h2 {
  margin: 0 0 18px;
  font-size: 26px;
}

.detail-article p {
  margin: 0 0 26px;
  color: #374151;
  line-height: 2;
  font-size: 16px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-list span {
  padding: 8px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #fff1f2, #fffbeb);
  color: #e11d48;
  font-weight: 800;
}

.related-panel {
  position: sticky;
  top: 96px;
}

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

.search-page-form {
  padding: 18px;
  border-radius: 24px;
  margin-bottom: 28px;
}

.search-page-form input {
  flex: 1;
  padding: 14px 18px;
}

.site-footer {
  margin-top: 48px;
  color: #d1d5db;
  background: #111827;
}

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

.footer-inner p {
  margin: 10px 0 0;
  color: #9ca3af;
}

.footer-nav {
  display: flex;
  gap: 18px;
  color: #e5e7eb;
  font-weight: 800;
}

[hidden] {
  display: none !important;
}

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

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

  .top-search {
    margin-left: auto;
  }

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

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

  .split-wrap,
  .detail-head-grid,
  .detail-content-wrap {
    grid-template-columns: 1fr;
  }

  .rank-panel,
  .related-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .nav-wrap {
    height: 64px;
    padding: 0 16px;
  }

  .brand-text {
    font-size: 20px;
  }

  .top-search {
    display: none;
  }

  .hero {
    height: 560px;
  }

  .hero-content {
    padding: 0 18px;
  }

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

  .section-wrap,
  .page-hero,
  .detail-hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .page-hero > div {
    padding: 32px 24px;
    border-radius: 24px;
  }

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

  .featured-grid,
  .latest-grid,
  .section-grid,
  .category-page-grid,
  .category-grid,
  .small-card-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .ranking-card {
    grid-template-columns: 1fr;
  }

  .ranking-cover {
    height: 210px;
  }

  .detail-side {
    display: none;
  }

  .player-shell {
    border-radius: 22px;
  }

  .player-overlay {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 22px;
  }

  .big-play {
    width: 66px;
    height: 66px;
  }

  .detail-article,
  .related-panel,
  .category-block {
    padding: 22px;
  }

  .category-block-head,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .small-card {
    grid-template-columns: 110px 1fr;
  }

  .small-cover {
    width: 110px;
  }

  .footer-nav {
    flex-wrap: wrap;
  }
}
