* {
  box-sizing: border-box;
}

:root {
  --bg: #f9fafb;
  --text: #111827;
  --muted: #6b7280;
  --soft: #f3f4f6;
  --line: #e5e7eb;
  --white: #ffffff;
  --red: #ef4444;
  --red-dark: #dc2626;
  --orange: #f97316;
  --yellow: #f59e0b;
  --shadow: 0 14px 35px rgba(15, 23, 42, 0.10);
  --radius: 18px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(16px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  border-radius: 50%;
  box-shadow: 0 10px 18px rgba(239, 68, 68, 0.25);
  font-size: 13px;
}

.brand-text {
  font-size: 21px;
  color: #1f2937;
  white-space: nowrap;
}

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

.nav-link,
.mobile-nav-link {
  padding: 9px 13px;
  color: #4b5563;
  border-radius: 999px;
  font-weight: 650;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.mobile-nav-link:hover,
.nav-link.is-active,
.mobile-nav-link.is-active {
  color: var(--red);
  background: #fef2f2;
}

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

.header-search input,
.mobile-search input,
.toolbar input,
.toolbar select {
  height: 42px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 0 14px;
  background: #ffffff;
  color: #111827;
  outline: none;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.toolbar input:focus,
.toolbar select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.header-search button,
.mobile-search button,
.small-button,
.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 750;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.header-search button,
.mobile-search button,
.primary-button,
.small-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.22);
}

.header-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.small-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.ghost-button {
  color: #374151;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.10);
}

.ghost-button.light {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: none;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  background: #374151;
  border-radius: 20px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

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

.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  background: linear-gradient(135deg, #fff1f2 0%, #fffbeb 50%, #fef3c7 100%);
  display: grid;
  align-items: center;
  padding: 54px 0 38px;
}

.hero-glow {
  position: absolute;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  filter: blur(55px);
  opacity: 0.35;
  animation: pulseGlow 5s ease-in-out infinite;
}

.hero-glow-one {
  top: -90px;
  left: -90px;
  background: #fca5a5;
}

.hero-glow-two {
  right: -110px;
  bottom: -100px;
  background: #fdba74;
  animation-delay: 1.5s;
}

@keyframes pulseGlow {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

.hero-slider {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.78fr);
  align-items: center;
  gap: 42px;
}

.hero-slide.is-active {
  display: grid;
  animation: fadeUp 0.55s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-kicker,
.page-hero span,
.section-head span,
.category-overview-head span {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 6px 12px;
  color: var(--red-dark);
  background: #fee2e2;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-copy h1 {
  max-width: 760px;
  margin: 18px 0 18px;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 24px;
  color: #4b5563;
  font-size: clamp(17px, 2vw, 21px);
}

.hero-tags,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #6b7280;
  font-size: 14px;
}

.hero-tags span,
.detail-meta span,
.card-meta span {
  padding: 5px 10px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(229, 231, 235, 0.8);
  border-radius: 999px;
}

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

.hero-poster {
  position: relative;
  display: block;
  min-height: 420px;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(127, 29, 29, 0.22);
  isolation: isolate;
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.60));
}

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

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

.hero-poster span {
  position: absolute;
  left: 22px;
  bottom: 22px;
  z-index: 2;
  padding: 8px 14px;
  color: #ffffff;
  background: var(--red);
  border-radius: 999px;
  font-weight: 800;
}

.hero-controls {
  position: relative;
  z-index: 3;
  width: min(1180px, calc(100% - 32px));
  margin: 26px auto 0;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 32px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.24);
}

.hero-dot.is-active {
  background: var(--red);
}

.stat-strip {
  width: min(1180px, calc(100% - 32px));
  margin: -28px auto 0;
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-strip a {
  min-height: 110px;
  padding: 22px;
  background: #ffffff;
  border: 1px solid #f3f4f6;
  border-radius: 22px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-strip a:hover,
.movie-card:hover,
.category-tile:hover,
.category-pill:hover,
.compact-card:hover,
.rank-row:hover,
.category-overview-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.13);
}

.stat-strip strong {
  display: block;
  margin-bottom: 7px;
  color: var(--red);
  font-size: 18px;
}

.stat-strip span {
  color: #6b7280;
  font-size: 14px;
}

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

.white-section,
.warm-section {
  width: 100%;
  padding-left: max(16px, calc((100% - 1180px) / 2));
  padding-right: max(16px, calc((100% - 1180px) / 2));
}

.white-section {
  background: #ffffff;
}

.warm-section {
  background: linear-gradient(135deg, #fff7ed, #fef2f2);
}

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

.section-head.centered {
  justify-content: center;
  text-align: center;
}

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

.section-head a {
  color: var(--red);
  font-weight: 800;
}

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

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

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

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #eef2f7;
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card-list {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  min-height: 220px;
}

.poster-link {
  position: relative;
  display: block;
  min-height: 260px;
  overflow: hidden;
  background: #111827;
}

.movie-card-list .poster-link {
  min-height: 100%;
}

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

.movie-card-list .poster-link img {
  min-height: 100%;
}

.poster-link:hover img,
.movie-card:hover .poster-link img {
  transform: scale(1.06);
}

.poster-badge,
.poster-play {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
}

.poster-badge {
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  color: #ffffff;
  background: rgba(239, 68, 68, 0.92);
  font-size: 12px;
  font-weight: 750;
}

.poster-play {
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(17, 24, 39, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.card-body {
  padding: 16px;
}

.card-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: #111827;
  font-size: 17px;
  font-weight: 850;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-title:hover {
  color: var(--red);
}

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

.card-meta {
  gap: 6px;
  margin-bottom: 12px;
}

.card-meta span {
  font-size: 12px;
  background: #f9fafb;
}

.tag-row,
.detail-tags,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-row span,
.detail-tags a,
.tag-cloud a {
  padding: 5px 10px;
  color: #4b5563;
  background: #f3f4f6;
  border-radius: 999px;
  font-size: 12px;
}

.detail-tags a:hover,
.tag-cloud a:hover {
  color: #ffffff;
  background: var(--red);
}

.category-tile-grid,
.category-pill-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.category-tile,
.category-pill,
.category-overview-card,
.white-card,
.toolbar,
.rank-row {
  background: #ffffff;
  border: 1px solid #eef2f7;
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile {
  padding: 18px;
}

.category-tile h3,
.category-pill strong,
.category-overview-head h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.category-tile p,
.category-pill span,
.category-overview-head p {
  margin: 0;
  color: #6b7280;
}

.category-tile div {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.category-tile div a {
  display: block;
  color: #ef4444;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-pill {
  min-height: 138px;
  padding: 20px;
}

.category-pill strong {
  display: block;
  color: var(--red);
}

.category-overview-card {
  margin-bottom: 22px;
  padding: 24px;
}

.category-overview-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

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

.compact-grid.one-col {
  grid-template-columns: 1fr;
}

.compact-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: #f9fafb;
  border-radius: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.compact-card img {
  width: 96px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
}

.compact-card strong,
.compact-card em {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.compact-card strong {
  color: #111827;
  font-size: 14px;
}

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

.page-hero {
  min-height: 310px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 54px max(16px, calc((100% - 1180px) / 2));
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.small-hero,
.search-hero {
  background: linear-gradient(135deg, #ef4444, #f59e0b);
}

.category-hero {
  background: linear-gradient(135deg, #dc2626, #f97316);
}

.rank-hero {
  background: linear-gradient(135deg, #991b1b, #f97316);
}

.page-hero div {
  max-width: 760px;
}

.page-hero span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.page-hero h1 {
  margin: 18px 0 12px;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.05;
}

.page-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 26px;
  padding: 18px;
}

.search-toolbar {
  grid-template-columns: 1.3fr repeat(4, minmax(130px, 0.7fr));
}

.toolbar label {
  display: grid;
  gap: 8px;
  color: #374151;
  font-weight: 750;
}

.toolbar input,
.toolbar select {
  width: 100%;
  border-radius: 14px;
}

.empty-result {
  display: none;
  margin: 18px 0;
  padding: 22px;
  text-align: center;
  color: #6b7280;
  background: #ffffff;
  border: 1px dashed #d1d5db;
  border-radius: 18px;
}

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

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

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

.breadcrumbs a:hover {
  color: var(--red);
}

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

.player-card {
  overflow: hidden;
  background: #ffffff;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.player-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background-size: cover;
  background-position: center;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.player-start {
  width: 76px;
  height: 76px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
  font-size: 28px;
  padding-left: 5px;
  transition: transform 0.2s ease;
}

.player-start:hover {
  transform: scale(1.08);
}

.detail-info {
  padding: 24px;
}

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
}

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

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

.white-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.white-card p {
  margin: 0;
  color: #4b5563;
}

.detail-side {
  min-width: 0;
}

.sticky-card {
  position: sticky;
  top: 90px;
}

.full-button {
  width: 100%;
  margin-top: 16px;
}

.no-side-padding {
  width: 100%;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 56px 96px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
}

.rank-num {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  border-radius: 50%;
  font-weight: 900;
}

.rank-cover img {
  width: 96px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-main a {
  display: block;
  color: #111827;
  font-weight: 850;
  font-size: 17px;
}

.rank-main a:hover {
  color: var(--red);
}

.rank-main p,
.rank-main span {
  margin: 3px 0 0;
  color: #6b7280;
  font-size: 13px;
}

.rank-score {
  color: var(--red);
  font-weight: 850;
  white-space: nowrap;
}

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

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

.footer-grid h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 17px;
}

.footer-grid p,
.footer-grid ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.footer-grid li {
  margin: 8px 0;
}

.footer-grid a:hover {
  color: #ffffff;
}

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

.is-hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .header-search {
    display: none;
  }

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

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

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

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

  .sticky-card {
    position: static;
  }

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

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

  .menu-toggle {
    display: flex;
    margin-left: auto;
  }

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

  .hero-poster,
  .hero-poster img {
    min-height: 330px;
  }

  .movie-grid,
  .three-grid,
  .list-grid,
  .compact-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar,
  .search-toolbar {
    grid-template-columns: 1fr;
  }

  .page-hero {
    display: grid;
    min-height: 280px;
  }

  .rank-row {
    grid-template-columns: 46px 82px minmax(0, 1fr);
  }

  .rank-score {
    grid-column: 3;
  }
}

@media (max-width: 560px) {
  .header-inner {
    width: min(100% - 22px, 1180px);
  }

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

  .hero-section {
    min-height: auto;
    padding: 38px 0 30px;
  }

  .hero-copy h1 {
    font-size: 36px;
  }

  .hero-actions {
    display: grid;
  }

  .stat-strip,
  .movie-grid,
  .three-grid,
  .list-grid,
  .category-tile-grid,
  .category-pill-grid,
  .compact-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .poster-link,
  .poster-link img {
    min-height: 230px;
  }

  .rank-row {
    grid-template-columns: 40px 74px minmax(0, 1fr);
    gap: 10px;
  }

  .rank-cover img {
    width: 74px;
    height: 54px;
  }

  .rank-main p {
    display: none;
  }

  .player-start {
    width: 64px;
    height: 64px;
  }
}
