:root {
  --red: #dc2626;
  --red-dark: #7f1d1d;
  --orange: #f97316;
  --amber: #f59e0b;
  --teal: #0f766e;
  --cyan: #0891b2;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --paper: #ffffff;
  --soft: #f8fafc;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #f3f4f6;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "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;
}

.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.86);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: -0.03em;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  color: #374151;
  font-size: 14px;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #fff;
  background: var(--red);
  box-shadow: 0 10px 20px rgba(220, 38, 38, 0.22);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  color: #374151;
}

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

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

.hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.35), transparent 32%), linear-gradient(135deg, #450a0a, #9a3412 48%, #92400e);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.55fr);
  align-items: center;
  gap: 44px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  opacity: 0;
  transform: translateY(18px) scale(1.015);
  pointer-events: none;
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.hero-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 650px;
  object-fit: cover;
  opacity: 0.22;
  filter: blur(5px) saturate(1.1);
  transform: scale(1.04);
}

.hero-shade {
  position: fixed;
  inset: 0;
  height: 650px;
  background: linear-gradient(90deg, rgba(69, 10, 10, 0.92), rgba(69, 10, 10, 0.62), rgba(15, 23, 42, 0.32));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding-top: 48px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(17px, 2vw, 21px);
}

.hero-actions,
.hero-category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-button,
.ghost-button,
.hero-search button,
.search-page-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 14px;
  border: 0;
  font-weight: 900;
  transition: 0.22s ease;
}

.primary-button,
.hero-search button,
.search-page-form button {
  color: var(--red-dark);
  background: #fff;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
}

.primary-button:hover,
.hero-search button:hover,
.search-page-form button:hover {
  transform: translateY(-2px);
  background: #fff7ed;
}

.ghost-button {
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.06);
}

.ghost-button:hover {
  color: var(--red-dark);
  background: #fff;
}

.hero-poster {
  position: relative;
  z-index: 2;
  overflow: hidden;
  align-self: center;
  border-radius: 28px;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

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

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

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

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  width: min(760px, calc(100% - 32px));
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
}

.hero-search input,
.search-page-form input,
.filter-panel input,
.filter-panel select {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 16px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.hero-search input:focus,
.search-page-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.hero-category-links {
  position: absolute;
  right: calc((100% - min(1180px, calc(100% - 32px))) / 2);
  bottom: 174px;
  z-index: 4;
  justify-content: flex-end;
  max-width: 520px;
}

.hero-category-links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
}

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

.light-panel {
  width: 100%;
  padding-left: max(16px, calc((100% - 1180px) / 2));
  padding-right: max(16px, calc((100% - 1180px) / 2));
  background: #fff;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

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

.section-head .section-kicker {
  color: var(--red);
  background: #fee2e2;
}

.section-head.inverted {
  color: #fff;
}

.section-head.inverted a {
  color: #99f6e4;
}

.section-head.inverted .section-kicker {
  color: #ccfbf1;
  background: rgba(255, 255, 255, 0.14);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  background: #111827;
}

.movie-thumb img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.featured-grid .movie-thumb img {
  aspect-ratio: 4 / 5;
}

.movie-card:hover .movie-thumb img {
  transform: scale(1.06);
}

.movie-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  background: var(--red);
}

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

.movie-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h2 a:hover,
.rank-info h2 a:hover,
.horizontal-item:hover strong,
.sitemap-group a:hover {
  color: var(--red);
}

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

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

.movie-meta span {
  padding: 4px 8px;
  border-radius: 8px;
  background: #f3f4f6;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag-row span {
  padding: 4px 9px;
  border-radius: 999px;
  color: #991b1b;
  font-size: 12px;
  font-weight: 800;
  background: #fee2e2;
}

.ranking-band {
  padding: 72px max(16px, calc((100% - 1180px) / 2));
  color: #fff;
  background: linear-gradient(135deg, #134e4a, #155e75);
}

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

.horizontal-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.11);
  backdrop-filter: blur(10px);
  transition: 0.2s ease;
}

.horizontal-item:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(4px);
}

.horizontal-item img {
  width: 92px;
  height: 62px;
  flex: 0 0 auto;
  border-radius: 12px;
  object-fit: cover;
  background: #0f172a;
}

.horizontal-item span {
  min-width: 0;
}

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

.horizontal-item em {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-style: normal;
}

.rank-number {
  width: 32px;
  height: 32px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  font-weight: 900;
  background: var(--teal);
}

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

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

.category-card {
  min-height: 220px;
  padding: 22px;
  border-radius: 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: var(--shadow-soft);
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, #0f766e, #0891b2);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #92400e, #f59e0b);
}

.category-card > span {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.18);
}

.category-card h2 {
  margin: 0 0 10px;
  font-size: 25px;
}

.category-card p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.88);
}

.category-card div {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

.category-card div a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-hero {
  padding: 84px max(16px, calc((100% - 1180px) / 2));
  color: #fff;
  background: linear-gradient(135deg, #7f1d1d, #ea580c 58%, #92400e);
}

.page-hero h1 {
  max-width: 820px;
  margin: 0 0 16px;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

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

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

.ranking-hero {
  background: linear-gradient(135deg, #0f766e, #155e75);
}

.search-hero {
  background: linear-gradient(135deg, #7f1d1d, #f97316);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
}

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

.filter-panel,
.search-page-form {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.search-page-form {
  grid-template-columns: 1fr auto;
  max-width: 760px;
  margin: 28px 0 0;
  padding: 12px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.category-movie-grid {
  align-items: stretch;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.rank-cover img {
  width: 100%;
  height: 118px;
  border-radius: 18px;
  object-fit: cover;
  background: #111827;
}

.rank-info {
  position: relative;
  min-width: 0;
  padding-left: 56px;
}

.rank-index {
  position: absolute;
  left: 0;
  top: 0;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  font-weight: 900;
  background: var(--red);
}

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.rank-info p {
  margin: 0 0 12px;
  color: var(--muted);
}

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

.detail-shell .breadcrumb {
  color: #6b7280;
}

.detail-shell .breadcrumb a:hover {
  color: var(--red);
}

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

.detail-main,
.detail-side .side-panel,
.detail-content {
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.detail-main {
  overflow: hidden;
}

.player-card {
  background: #050505;
}

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

.movie-player {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.46));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-overlay span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  padding-left: 5px;
  font-size: 34px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 18px 36px rgba(220, 38, 38, 0.36);
}

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

.detail-content {
  padding: 28px;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  box-shadow: none;
}

.detail-content h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.14;
  letter-spacing: -0.04em;
}

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

.detail-content p {
  margin: 0;
  color: #374151;
  font-size: 16px;
}

.detail-meta {
  margin-bottom: 8px;
}

.detail-side {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 18px;
}

.detail-cover {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  object-fit: cover;
  background: #111827;
  box-shadow: var(--shadow);
}

.side-panel {
  padding: 20px;
}

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

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

.side-list .horizontal-item {
  color: var(--ink);
  background: #f9fafb;
}

.side-list .horizontal-item:hover {
  background: #fff1f2;
}

.side-list .horizontal-item em {
  color: var(--muted);
}

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

.sitemap-group {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.sitemap-group h2 {
  margin: 0 0 14px;
}

.sitemap-group ul {
  columns: 2;
  margin: 0;
  padding-left: 18px;
}

.sitemap-group li {
  break-inside: avoid;
  margin: 0 0 8px;
  color: #374151;
  font-size: 14px;
}

.site-footer {
  color: #d1d5db;
  background: #111827;
}

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

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

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

.site-footer li {
  margin-bottom: 8px;
}

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

.footer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-tags a {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

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

@media (max-width: 1080px) {
  .movie-grid,
  .category-grid,
  .category-grid.large {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .detail-side {
    position: static;
    grid-template-columns: 220px 1fr;
  }
}

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

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

  .hero {
    min-height: 780px;
  }

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

  .hero-bg,
  .hero-shade {
    height: 780px;
  }

  .hero-content {
    padding-top: 0;
  }

  .hero-poster {
    max-width: 220px;
    transform: rotate(0deg);
  }

  .hero-category-links {
    left: 16px;
    right: 16px;
    bottom: 150px;
    justify-content: flex-start;
  }

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

  .movie-grid,
  .featured-grid,
  .ranking-list,
  .category-grid,
  .category-grid.large,
  .sitemap-wrap,
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

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

  .rank-card {
    grid-template-columns: 130px 1fr;
  }

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

  .detail-cover {
    max-width: 320px;
  }
}

@media (max-width: 560px) {
  .header-inner {
    height: 64px;
  }

  .brand-text small {
    display: none;
  }

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

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

  .movie-grid,
  .featured-grid,
  .ranking-list,
  .category-grid,
  .category-grid.large,
  .sitemap-wrap,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

  .rank-info {
    padding-left: 0;
    padding-top: 52px;
  }

  .horizontal-item img {
    width: 76px;
    height: 54px;
  }

  .sitemap-group ul {
    columns: 1;
  }
}
