:root {
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-soft: #fff7ed;
  --color-text: #1f2937;
  --color-muted: #64748b;
  --color-border: #e5e7eb;
  --color-orange: #f97316;
  --color-orange-dark: #ea580c;
  --color-amber: #f59e0b;
  --color-coral: #fb7185;
  --color-dark: #111827;
  --shadow-card: 0 14px 35px rgba(15, 23, 42, 0.10);
  --shadow-hover: 0 25px 55px rgba(249, 115, 22, 0.22);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --container: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--color-text);
  background: linear-gradient(180deg, #fff7ed 0%, #f8fafc 320px, #f1f5f9 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--color-orange-dark), var(--color-coral), var(--color-amber));
  box-shadow: 0 10px 30px rgba(234, 88, 12, 0.28);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
}

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

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--color-orange);
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  color: #ffffff;
  font-weight: 650;
}

.desktop-nav a {
  position: relative;
  opacity: 0.95;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.desktop-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: center;
  background: rgba(255, 255, 255, 0.85);
  transition: transform 0.2s ease;
}

.desktop-nav a:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.desktop-nav a:hover::after {
  transform: scaleX(1);
}

.mobile-menu-button {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  border: 0;
  background: transparent;
}

.mobile-menu-button span {
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: #ffffff;
}

.mobile-nav {
  display: none;
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

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

.mobile-nav a {
  display: block;
  padding: 10px 0;
  color: #ffffff;
  font-weight: 650;
}

.hero-section {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: linear-gradient(100deg, #c2410c 0%, #f97316 45%, #f59e0b 100%);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
  align-items: center;
  gap: 42px;
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease, visibility 0.55s ease;
  left: 50%;
  translate: -50% 0;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.hero-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.20;
  filter: blur(8px) saturate(1.15);
  transform: scale(1.06);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(124, 45, 18, 0.88), rgba(249, 115, 22, 0.72), rgba(245, 158, 11, 0.64));
}

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

.hero-content {
  position: relative;
  z-index: 2;
  color: #ffffff;
  padding: 84px 0 72px;
}

.hero-kicker,
.page-hero span,
.category-hero-copy span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fff7ed;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
  font-weight: 700;
}

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-shadow: 0 12px 36px rgba(0, 0, 0, 0.26);
}

.hero-summary {
  width: min(680px, 100%);
  margin: 0 0 24px;
  font-size: clamp(18px, 2.2vw, 25px);
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
}

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

.hero-tags span,
.detail-tags span,
.tag-row span,
.related-tags span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: inherit;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 650;
}

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

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

.primary-button {
  color: var(--color-orange-dark);
  background: #ffffff;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.18);
}

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

.ghost-button {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.ghost-button.dark {
  color: var(--color-orange-dark);
  border-color: rgba(249, 115, 22, 0.25);
  background: #fff7ed;
}

.full-width {
  width: 100%;
}

.hero-poster {
  position: relative;
  z-index: 2;
  display: block;
  overflow: hidden;
  border-radius: 32px;
  box-shadow: 0 28px 70px rgba(124, 45, 18, 0.35);
  aspect-ratio: 3 / 4;
  transform: rotate(2deg);
  border: 8px solid rgba(255, 255, 255, 0.20);
  background: rgba(255, 255, 255, 0.12);
}

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

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
  font-weight: 800;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 16px;
  translate: -50% 0;
}

.hero-controls button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 25px;
  line-height: 1;
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-controls button:hover {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.28);
}

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

.hero-dots .hero-dot {
  width: 10px;
  height: 10px;
  min-height: 0;
  padding: 0;
  opacity: 0.72;
}

.hero-dots .hero-dot.active {
  width: 30px;
  border-radius: 999px;
  opacity: 1;
  background: #ffffff;
}

.hero-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 110px;
  background: linear-gradient(0deg, #f8fafc, transparent);
}

.page-stack,
.page-shell,
.detail-shell {
  padding: 40px 0 70px;
}

.page-stack > section,
.page-shell > section,
.detail-shell > section {
  margin-bottom: 54px;
}

.quick-search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: 28px;
  align-items: center;
  margin-top: -62px;
  position: relative;
  z-index: 8;
  padding: 28px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.quick-search-panel h2 {
  margin: 0 0 6px;
  font-size: 28px;
}

.quick-search-panel p {
  margin: 0;
  color: var(--color-muted);
}

.quick-search,
.search-page-panel {
  display: flex;
  gap: 12px;
}

.quick-search input,
.search-page-panel input,
.filter-search input,
.rank-filter input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0 18px;
  outline: none;
  background: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.quick-search input:focus,
.search-page-panel input:focus,
.filter-search input:focus,
.rank-filter input:focus {
  border-color: var(--color-orange);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.quick-search button,
.search-page-panel button {
  min-width: 94px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-orange), var(--color-amber));
  font-weight: 800;
  box-shadow: 0 10px 25px rgba(249, 115, 22, 0.28);
}

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

.section-heading h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-orange), var(--color-amber));
  box-shadow: 0 10px 22px rgba(249, 115, 22, 0.24);
  font-size: 20px;
}

.section-more,
.text-button {
  color: var(--color-orange-dark);
  font-weight: 800;
}

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

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

.poster-grid,
.compact-grid,
.catalog-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #fed7aa, #fb923c);
}

.poster-grid .movie-cover,
.compact-grid .movie-cover,
.catalog-grid .movie-cover {
  aspect-ratio: 3 / 4;
}

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

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

.cover-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 50%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.70), transparent);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.duration-badge,
.rank-badge,
.play-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
}

.duration-badge {
  right: 10px;
  top: 10px;
  padding: 4px 8px;
  background: var(--color-orange);
  font-size: 12px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.play-badge {
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  background: rgba(249, 115, 22, 0.88);
  transform: translate(-50%, -50%) scale(0.84);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

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

.movie-info {
  padding: 16px;
}

.movie-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  margin-bottom: 8px;
  color: var(--color-text);
  font-weight: 800;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-title {
  color: var(--color-orange-dark);
}

.movie-desc {
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  margin: 0 0 12px;
  color: var(--color-muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--color-muted);
  font-size: 13px;
}

.tag-row span,
.related-tags span {
  color: #c2410c;
  background: #ffedd5;
}

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

.category-tile {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 170px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  color: #ffffff;
  padding: 18px;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.category-tile img,
.category-overlay {
  position: absolute;
  inset: 0;
}

.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-overlay {
  background: linear-gradient(0deg, rgba(124, 45, 18, 0.80), rgba(249, 115, 22, 0.20));
}

.category-name,
.category-count {
  position: relative;
  z-index: 2;
}

.category-name {
  font-size: 22px;
  font-weight: 900;
}

.category-count {
  opacity: 0.90;
}

.two-column-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

.ranking-panel,
.detail-card,
.player-card,
.related-panel,
.poster-info-card,
.filter-panel,
.ranking-table-wrap,
.search-page-panel,
.category-overview-card {
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-card);
}

.ranking-panel {
  align-self: start;
  position: sticky;
  top: 90px;
  padding: 24px;
}

.ranking-panel h2,
.related-panel h2 {
  margin: 0 0 16px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-row:hover {
  background: #fff7ed;
  transform: translateX(4px);
}

.ranking-row span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-orange), var(--color-amber));
  font-weight: 900;
}

.ranking-row strong,
.ranking-row em {
  grid-column: 2;
}

.ranking-row strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ranking-row em {
  color: var(--color-muted);
  font-size: 13px;
  font-style: normal;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, #111827, #020617);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 34px;
  padding: 48px 0 32px;
}

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

.site-footer p {
  margin: 12px 0 0;
  color: #94a3b8;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #94a3b8;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: #fdba74;
}

.footer-bottom {
  padding: 18px 0 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #64748b;
  text-align: center;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  color: var(--color-muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--color-orange-dark);
}

.page-hero,
.category-hero {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  padding: 44px;
  color: #ffffff;
  background: linear-gradient(120deg, #c2410c, #f97316 55%, #f59e0b);
  box-shadow: var(--shadow-card);
}

.page-hero::after,
.category-hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.page-hero h1,
.category-hero h1 {
  position: relative;
  z-index: 2;
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.12;
}

.page-hero p,
.category-hero p {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.90);
  font-size: 18px;
}

.compact-hero {
  margin-bottom: 36px;
}

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

.category-overview-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  overflow: hidden;
}

.category-thumb-wall {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: #fed7aa;
}

.category-thumb-wall img {
  width: 100%;
  height: 100%;
  min-height: 110px;
  object-fit: cover;
}

.category-thumb-wall span {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(194, 65, 12, 0.62), rgba(249, 115, 22, 0.12));
}

.category-overview-body {
  padding: 24px;
}

.category-overview-body h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-overview-body p {
  margin: 0 0 16px;
  color: var(--color-muted);
}

.category-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.category-stats span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #c2410c;
  background: #ffedd5;
  font-size: 13px;
  font-weight: 750;
}

.category-hero {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  margin-bottom: 30px;
}

.category-hero-image {
  position: relative;
  z-index: 2;
  overflow: hidden;
  border-radius: 26px;
  aspect-ratio: 4 / 3;
  box-shadow: 0 20px 48px rgba(124, 45, 18, 0.30);
}

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

.category-hero-copy {
  position: relative;
  z-index: 2;
}

.hero-stats-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 24px;
}

.hero-stats-row strong {
  font-size: 34px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 20px;
  margin-bottom: 30px;
}

.filter-selects {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.filter-selects label {
  display: grid;
  gap: 6px;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 700;
}

.filter-selects select {
  min-width: 120px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: #ffffff;
  outline: none;
}

.empty-state {
  margin: 28px 0;
  padding: 28px;
  border-radius: var(--radius-lg);
  color: var(--color-muted);
  background: #ffffff;
  box-shadow: var(--shadow-card);
  text-align: center;
}

.top-rank-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 30px;
}

.top-rank-card {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  border-radius: 28px;
  color: #ffffff;
  padding: 24px;
  display: grid;
  align-content: end;
  box-shadow: var(--shadow-card);
}

.top-rank-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.top-rank-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent 72%);
}

.top-rank-card:hover img {
  transform: scale(1.06);
}

.top-rank-card strong,
.top-rank-card em,
.rank-medal {
  position: relative;
  z-index: 2;
}

.rank-medal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-weight: 900;
  font-size: 22px;
}

.top-rank-card strong {
  font-size: 24px;
}

.top-rank-card em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.82);
}

.ranking-table-wrap {
  padding: 22px;
}

.rank-filter {
  margin-bottom: 18px;
}

.ranking-table {
  display: grid;
  gap: 10px;
}

.ranking-table-row {
  display: grid;
  grid-template-columns: 52px 70px minmax(170px, 1fr) minmax(160px, 1.2fr) 110px 70px;
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-table-row:hover {
  background: #fff7ed;
  transform: translateX(4px);
}

.ranking-table-row img {
  width: 70px;
  height: 54px;
  border-radius: 12px;
  object-fit: cover;
}

.ranking-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-orange), var(--color-amber));
  font-weight: 900;
}

.ranking-table-row em,
.ranking-table-row i {
  color: var(--color-muted);
  font-style: normal;
}

.ranking-table-row b {
  color: var(--color-orange-dark);
}

.search-page-panel {
  align-items: center;
  padding: 22px;
  margin-bottom: 30px;
}

.detail-shell {
  padding-top: 30px;
}

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

.player-card {
  overflow: hidden;
  margin-bottom: 24px;
}

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

.video-player video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.10), rgba(0, 0, 0, 0.46));
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-orange), var(--color-amber));
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.28);
  font-size: 36px;
  transition: transform 0.2s ease;
}

.play-overlay:hover span {
  transform: scale(1.08);
}

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

.player-loading {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.56);
  font-size: 13px;
}

.detail-card {
  padding: 28px;
}

.detail-card h1 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.18;
}

.detail-one-line {
  margin: 0 0 20px;
  color: var(--color-muted);
  font-size: 18px;
}

.detail-meta-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}

.detail-meta-list span {
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--color-muted);
  background: #f8fafc;
}

.detail-meta-list strong {
  color: var(--color-text);
}

.detail-tags {
  margin-bottom: 24px;
}

.detail-tags span {
  color: #c2410c;
  background: #ffedd5;
}

.content-block {
  padding-top: 22px;
  border-top: 1px solid var(--color-border);
}

.content-block + .content-block {
  margin-top: 24px;
}

.content-block h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.content-block p {
  margin: 0;
  color: #475569;
  font-size: 16px;
  line-height: 1.9;
}

.review-block {
  padding: 22px;
  border: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #fff7ed, #fffbeb);
}

.detail-sidebar {
  position: sticky;
  top: 90px;
  display: grid;
  gap: 24px;
}

.poster-info-card,
.related-panel {
  padding: 20px;
}

.poster-info-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  margin-bottom: 16px;
  border-radius: 18px;
  background: #fed7aa;
}

.poster-info-card .primary-button,
.poster-info-card .ghost-button {
  margin-bottom: 10px;
}

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

.related-card {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
  transition: background 0.2s ease, transform 0.2s ease;
}

.related-card:hover {
  background: #fff7ed;
  transform: translateX(4px);
}

.related-cover {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 3 / 4;
}

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

.related-title {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 6px;
  font-weight: 800;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.related-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 8px;
  color: var(--color-muted);
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

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

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

  .ranking-panel,
  .detail-sidebar {
    position: static;
  }
}

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

  .mobile-menu-button {
    display: flex;
  }

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

  .hero-slide {
    grid-template-columns: 1fr;
    gap: 20px;
    align-content: center;
  }

  .hero-content {
    padding: 70px 0 10px;
  }

  .hero-poster {
    width: min(260px, 78vw);
    justify-self: center;
    transform: rotate(0deg);
  }

  .quick-search-panel,
  .filter-panel,
  .category-hero,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .category-overview-grid,
  .top-rank-grid {
    grid-template-columns: 1fr;
  }

  .category-thumb-wall {
    min-height: 220px;
  }

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

  .ranking-table-row {
    grid-template-columns: 42px 58px minmax(0, 1fr);
  }

  .ranking-table-row em,
  .ranking-table-row b,
  .ranking-table-row i {
    grid-column: 3;
  }

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

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

  .movie-grid,
  .featured-grid,
  .poster-grid,
  .compact-grid,
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .movie-info {
    padding: 12px;
  }

  .movie-title {
    min-height: 42px;
    font-size: 15px;
  }

  .movie-desc {
    min-height: 40px;
    font-size: 13px;
  }

  .category-tile-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .category-tile {
    min-height: 138px;
  }

  .quick-search,
  .search-page-panel,
  .filter-selects {
    flex-direction: column;
  }

  .quick-search button,
  .search-page-panel button {
    min-height: 48px;
  }

  .page-hero,
  .category-hero {
    padding: 28px;
    border-radius: 24px;
  }

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

  .detail-card,
  .poster-info-card,
  .related-panel,
  .ranking-table-wrap {
    padding: 16px;
  }

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

  .play-overlay span {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}

@media (max-width: 460px) {
  .brand-text {
    font-size: 18px;
  }

  .hero-section {
    min-height: 660px;
  }

  .hero-content h1 {
    font-size: 38px;
  }

  .hero-summary {
    font-size: 17px;
  }

  .movie-grid,
  .featured-grid,
  .poster-grid,
  .compact-grid,
  .catalog-grid,
  .category-tile-grid {
    grid-template-columns: 1fr;
  }
}
