* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #1f2937;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 157, 179, 0.22), transparent 30%),
    radial-gradient(circle at 88% 8%, rgba(255, 232, 102, 0.22), transparent 30%),
    linear-gradient(135deg, #fff7f9 0%, #fffafa 42%, #f6fff6 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(255, 157, 179, 0.22);
  box-shadow: 0 12px 34px rgba(220, 38, 38, 0.08);
  backdrop-filter: blur(18px);
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-weight: 800;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, #fb7185, #dc2626);
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.28);
}

.logo-text {
  font-size: 24px;
  line-height: 1;
  background: linear-gradient(90deg, #fb7185, #dc2626);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.nav-link {
  padding: 9px 14px;
  color: #4b5563;
  border-radius: 999px;
  transition: color 0.24s ease, background 0.24s ease, transform 0.24s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #dc2626;
  background: #fff1f4;
  transform: translateY(-1px);
}

.header-search {
  width: 250px;
  display: flex;
  align-items: center;
  border: 1px solid #f9a8b8;
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
  transition: box-shadow 0.24s ease, border-color 0.24s ease;
}

.header-search:focus-within {
  border-color: #fb7185;
  box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.16);
}

.header-search input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 10px 2px 10px 16px;
  background: transparent;
}

.header-search button {
  border: 0;
  background: transparent;
  color: #dc2626;
  padding: 8px 14px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #374151;
  background: #fff1f4;
  border-radius: 12px;
  padding: 8px 11px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid rgba(255, 157, 179, 0.3);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 16px 32px rgba(31, 41, 55, 0.08);
}

.mobile-panel.open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  padding: 10px 12px;
  border-radius: 14px;
  color: #4b5563;
}

.mobile-link.active,
.mobile-link:hover {
  color: #dc2626;
  background: #fff1f4;
}

.mobile-search {
  display: flex;
  gap: 8px;
}

.mobile-search input {
  flex: 1;
  min-width: 0;
  border: 1px solid #f9a8b8;
  border-radius: 999px;
  padding: 10px 14px;
  outline: 0;
}

.mobile-search button {
  border: 0;
  color: #fff;
  background: linear-gradient(90deg, #fb7185, #dc2626);
  border-radius: 999px;
  padding: 10px 16px;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.hero-slider {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border-radius: 26px;
  background: linear-gradient(135deg, #111827, #374151);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.28);
}

.hero-track {
  display: flex;
  height: 100%;
  min-height: 420px;
  transition: transform 0.7s ease;
}

.hero-slide {
  position: relative;
  min-width: 100%;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #111827, #374151);
}

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transform: scale(1.02);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 74% 20%, rgba(255, 195, 0, 0.22), transparent 34%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.65) 48%, rgba(15, 23, 42, 0.2) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, 86%);
  padding: clamp(36px, 7vw, 82px);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.hero-kicker span {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.92);
  font-weight: 700;
  font-size: 14px;
}

.hero-kicker small {
  opacity: 0.92;
}

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

.hero-content p {
  max-width: 680px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(15px, 1.8vw, 19px);
}

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

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.24s ease, box-shadow 0.24s ease, background 0.24s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, #fb7185, #dc2626);
  box-shadow: 0 12px 28px rgba(220, 38, 38, 0.28);
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-secondary {
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.44);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.hero-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.48);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.24s ease, background 0.24s ease;
}

.hero-slider:hover .hero-arrow,
.hero-arrow:focus-visible {
  opacity: 1;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-arrow.prev {
  left: 18px;
}

.hero-arrow.next {
  right: 18px;
}

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

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

.hero-dot.active {
  width: 32px;
  background: #fb7185;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 46px 0 22px;
}

.section-line {
  width: 5px;
  min-height: 42px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fb7185, #dc2626);
}

.section-heading h1,
.section-heading h2 {
  margin: 0;
  color: #1f2937;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.18;
}

.section-heading p {
  margin: 6px 0 0;
  color: #6b7280;
}

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

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

.movie-card {
  position: relative;
  color: inherit;
}

.poster-card {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(31, 41, 55, 0.09);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.poster-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 44px rgba(220, 38, 38, 0.16);
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 210px;
  background:
    radial-gradient(circle at 25% 15%, rgba(255, 157, 179, 0.45), transparent 34%),
    linear-gradient(135deg, #374151, #111827);
}

.poster-card .poster-frame {
  height: 286px;
}

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

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

.play-hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 44px;
  background: rgba(0, 0, 0, 0.0);
  opacity: 0;
  transition: opacity 0.28s ease, background 0.28s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.3);
}

.type-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(220, 38, 38, 0.92);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}

.rank-badge {
  left: 12px;
  right: auto;
  min-width: 32px;
  background: linear-gradient(135deg, #ffc300, #dc2626);
}

.card-body {
  display: block;
  padding: 15px;
}

.card-body strong,
.horizontal-body strong,
.compact-info strong {
  display: block;
  color: #1f2937;
  font-size: 18px;
  line-height: 1.3;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  transition: color 0.24s ease;
}

.movie-card:hover strong {
  color: #dc2626;
}

.card-desc {
  display: -webkit-box;
  min-height: 44px;
  margin-top: 8px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.55;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: #6b7280;
  font-size: 13px;
}

.card-meta b {
  color: #d97706;
}

.horizontal-card {
  display: flex;
  overflow: hidden;
  min-height: 220px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(31, 41, 55, 0.09);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.horizontal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px rgba(220, 38, 38, 0.16);
}

.horizontal-poster {
  width: 38%;
  min-width: 210px;
}

.horizontal-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
}

.compact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 12px;
  background: #fff;
  transition: background 0.24s ease, transform 0.24s ease;
}

.compact-card:hover {
  background: #fff5f7;
  transform: translateX(3px);
}

.compact-poster {
  width: 88px;
  height: 62px;
  min-height: 62px;
  flex: 0 0 88px;
  border-radius: 10px;
}

.compact-info {
  min-width: 0;
}

.compact-info strong {
  font-size: 14px;
}

.compact-info span {
  display: block;
  margin-top: 4px;
  color: #6b7280;
  font-size: 12px;
}

.feature-panel {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 24px;
  margin-top: 44px;
}

.feature-card,
.category-card,
.filter-panel,
.info-card,
.player-card,
.recommend-card,
.search-empty {
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(31, 41, 55, 0.09);
}

.feature-card {
  padding: 28px;
  background: linear-gradient(135deg, #84cc91, #3f8f46);
  color: #fff;
}

.feature-card h2 {
  margin: 0 0 10px;
  font-size: 32px;
}

.feature-card p {
  max-width: 720px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
}

.feature-side {
  padding: 20px;
}

.feature-side h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

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

.category-card {
  display: block;
  overflow: hidden;
  padding: 22px;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(220, 38, 38, 0.14);
}

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

.category-card p {
  margin: 0 0 16px;
  color: #6b7280;
}

.category-mini {
  display: flex;
  margin: 0 -4px 16px;
}

.category-mini span {
  width: 44px;
  height: 58px;
  margin: 0 4px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ffd8e0, #fda4af);
  overflow: hidden;
}

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

.category-enter {
  display: inline-flex;
  color: #dc2626;
  font-weight: 800;
}

.page-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  margin-bottom: 28px;
  padding: 30px;
  border-radius: 26px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 18%, rgba(255, 195, 0, 0.28), transparent 26%),
    linear-gradient(135deg, #111827, #4b5563);
  box-shadow: 0 22px 56px rgba(15, 23, 42, 0.2);
}

.page-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 4vw, 48px);
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

.filter-panel {
  margin: 24px 0;
  padding: 22px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-row:first-child {
  margin-top: 0;
}

.filter-search {
  display: grid;
  gap: 8px;
  width: 100%;
  color: #374151;
  font-weight: 700;
}

.filter-search input {
  width: 100%;
  border: 1px solid #fecdd6;
  border-radius: 999px;
  outline: 0;
  padding: 12px 16px;
  background: #fffafa;
}

.filter-search input:focus {
  border-color: #fb7185;
  box-shadow: 0 0 0 4px rgba(251, 113, 133, 0.14);
}

.filter-chip,
.sort-chip {
  border: 0;
  border-radius: 999px;
  padding: 9px 15px;
  color: #374151;
  background: #f5f5f5;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.24s ease, background 0.24s ease, color 0.24s ease, box-shadow 0.24s ease;
}

.filter-chip:hover,
.sort-chip:hover {
  transform: translateY(-1px);
}

.filter-chip.active {
  color: #fff;
  background: linear-gradient(90deg, #fb7185, #dc2626);
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.2);
}

.sort-chip.active {
  color: #fff;
  background: linear-gradient(90deg, #84cc91, #3f8f46);
  box-shadow: 0 10px 24px rgba(63, 143, 70, 0.2);
}

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

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.9fr);
  gap: 26px;
}

.player-card {
  overflow: hidden;
  background: #000;
}

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

.movie-player video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  cursor: pointer;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at 50% 40%, rgba(251, 113, 133, 0.24), transparent 28%),
    rgba(0, 0, 0, 0.55);
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.player-cover.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-play-icon {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #fb7185, #dc2626);
  box-shadow: 0 16px 32px rgba(220, 38, 38, 0.36);
  font-size: 34px;
  text-indent: 4px;
}

.player-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
  transition: opacity 0.24s ease;
}

.movie-player:hover .player-controls,
.movie-player:focus-within .player-controls {
  opacity: 1;
}

.player-controls button {
  border: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 9px 13px;
  cursor: pointer;
  transition: background 0.24s ease;
}

.player-controls button:hover {
  background: rgba(251, 113, 133, 0.8);
}

.info-card {
  padding: 24px;
  margin-top: 22px;
}

.info-card h1 {
  margin: 0 0 18px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.16;
}

.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 22px;
}

.meta-pills span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  color: #374151;
  background: #f8fafc;
  font-size: 14px;
  font-weight: 700;
}

.meta-pills span:first-child {
  color: #991b1b;
  background: #fee2e2;
}

.detail-section {
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid #eef2f7;
}

.detail-section h2 {
  margin: 0 0 10px;
  font-size: 22px;
}

.detail-section p {
  margin: 0;
  color: #4b5563;
}

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

.tag-list span {
  padding: 6px 11px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 14px;
}

.recommend-card {
  position: sticky;
  top: 96px;
  padding: 20px;
}

.recommend-card h2,
.recommend-card h3 {
  margin: 0 0 16px;
  font-size: 22px;
}

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

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

.search-empty {
  display: none;
  padding: 28px;
  color: #6b7280;
  text-align: center;
}

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

.site-footer {
  color: #fff;
  background: linear-gradient(135deg, #27272a, #111827);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 28px;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 28px;
}

.footer-logo .logo-text {
  color: #fff;
  background: none;
  -webkit-text-fill-color: #fff;
}

.footer-brand p {
  max-width: 560px;
  color: #d1d5db;
}

.footer-links {
  display: grid;
  align-content: center;
  justify-content: end;
  gap: 10px;
}

.footer-links a {
  color: #d1d5db;
  transition: color 0.24s ease;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
  font-size: 14px;
  text-align: center;
}

.hidden-by-filter {
  display: none !important;
}

@media (max-width: 980px) {
  .main-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero-slider,
  .hero-track {
    min-height: 360px;
  }

  .movie-grid,
  .movie-grid.two-col,
  .category-grid,
  .feature-panel,
  .detail-layout,
  .footer-inner,
  .page-hero {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: start;
  }
}

@media (max-width: 720px) {
  .header-inner,
  main,
  .footer-inner,
  .footer-bottom,
  .mobile-panel {
    width: min(100% - 22px, 1180px);
  }

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

  .hero-slider,
  .hero-track {
    min-height: 460px;
  }

  .hero-content {
    width: 100%;
    padding: 34px 24px 68px;
  }

  .hero-arrow {
    opacity: 1;
    width: 38px;
    height: 38px;
  }

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

  .horizontal-card {
    flex-direction: column;
  }

  .horizontal-poster {
    width: 100%;
    height: 230px;
  }

  .poster-card .poster-frame {
    height: 310px;
  }

  .feature-card,
  .filter-panel,
  .info-card,
  .recommend-card,
  .page-hero {
    padding: 20px;
  }
}
