:root {
  --bg: #f7f7f8;
  --panel: #ffffff;
  --text: #151515;
  --muted: #6b7280;
  --border: #ececec;
  --primary: #dc2626;
  --primary-dark: #b91c1c;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

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

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

.nav-shell {
  height: 74px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.28);
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #374151;
  font-weight: 700;
  transition: 0.2s ease;
}

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

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 280px;
}

.nav-search input,
.wide-search input,
.filter-input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 12px 16px;
  outline: none;
  background: #ffffff;
  transition: 0.2s ease;
}

.nav-search input:focus,
.wide-search input:focus,
.filter-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08);
}

.nav-search button,
.wide-search button,
.btn.primary {
  border: 0;
  border-radius: 999px;
  padding: 12px 20px;
  color: #ffffff;
  background: var(--primary);
  font-weight: 800;
  white-space: nowrap;
  transition: 0.2s ease;
}

.nav-search button:hover,
.wide-search button:hover,
.btn.primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #ffffff;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #111827;
  border-radius: 2px;
}

.hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  background-image: linear-gradient(90deg, rgba(5, 8, 20, 0.9), rgba(9, 12, 28, 0.72), rgba(9, 12, 28, 0.38)), var(--hero-image);
  background-size: cover;
  background-position: center;
}

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

.hero-backdrop {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, var(--bg), transparent);
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 650px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
  color: #ffffff;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy .eyebrow,
.page-hero .eyebrow {
  color: #fecaca;
}

.hero h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 82px);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.06em;
  text-shadow: 0 18px 45px rgba(0, 0, 0, 0.36);
}

.hero-summary {
  margin: 24px 0 0;
  max-width: 680px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

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

.btn,
.section-more,
.filter-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 20px;
  font-weight: 900;
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(12px);
}

.btn.text {
  color: #ffffff;
  padding-left: 4px;
  padding-right: 4px;
}

.hero-poster {
  position: relative;
  width: min(380px, 100%);
  margin-left: auto;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.4);
  transform: rotate(2deg);
}

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

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

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  right: auto;
  bottom: 36px;
  transform: translateX(-50%);
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.hero-arrow,
.hero-dot {
  pointer-events: auto;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
  transition: 0.2s ease;
}

.hero-arrow {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
}

.hero-arrow:hover,
.hero-dot.active {
  background: var(--primary);
}

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

.hero-dot {
  width: 28px;
  height: 8px;
  padding: 0;
  border-radius: 99px;
}

.intro-search,
.page-main {
  padding: 42px 0;
}

.intro-search {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 34px;
  align-items: center;
}

.intro-search h2,
.section-heading h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: #111827;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.intro-search h2,
.section-heading h2 {
  font-size: clamp(28px, 4vw, 44px);
}

.intro-search p,
.page-hero p,
.detail-line,
.article-block p,
.site-footer p {
  color: var(--muted);
  line-height: 1.8;
}

.wide-search {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.wide-search input {
  border: 0;
  box-shadow: none;
}

.site-section {
  margin: 48px 0;
}

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

.section-more,
.filter-link {
  color: var(--primary);
  background: #fef2f2;
}

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

.movie-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--soft-shadow);
  transition: 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #e5e7eb;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.quality-badge,
.view-badge,
.rank-no {
  position: absolute;
  z-index: 2;
  padding: 6px 9px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.quality-badge {
  top: 10px;
  left: 10px;
  background: var(--primary);
}

.view-badge {
  right: 10px;
  bottom: 10px;
  background: rgba(0, 0, 0, 0.68);
}

.rank-no {
  right: 10px;
  top: 10px;
  background: rgba(0, 0, 0, 0.72);
}

.card-body {
  padding: 16px;
}

.card-body h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

.card-body h2 a:hover {
  color: var(--primary);
}

.card-body p {
  min-height: 50px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.movie-meta span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #4b5563;
  background: #f3f4f6;
  font-size: 12px;
  font-weight: 800;
}

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

.tag-row span {
  color: var(--primary-dark);
  background: #fee2e2;
}

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

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

.category-tile {
  min-height: 150px;
  padding: 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #ffffff, #fff7f7);
  border: 1px solid #fee2e2;
  box-shadow: var(--soft-shadow);
  transition: 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: #fecaca;
  box-shadow: var(--shadow);
}

.category-tile span {
  display: block;
  color: var(--primary);
  font-size: 22px;
  font-weight: 950;
}

.category-tile strong {
  display: block;
  margin-top: 12px;
  color: #4b5563;
  line-height: 1.7;
}

.page-hero {
  padding: 64px;
  border-radius: 32px;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(185, 28, 28, 0.96), rgba(17, 24, 39, 0.95));
  box-shadow: var(--shadow);
}

.page-hero.small h1 {
  color: #ffffff;
  font-size: clamp(34px, 5vw, 58px);
}

.page-hero.small p:last-child {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

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

.breadcrumb a {
  color: var(--primary);
  font-weight: 800;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

.filter-input {
  max-width: 520px;
}

.search-panel {
  margin-top: 26px;
}

.search-status {
  margin: 22px 0;
  color: #4b5563;
  font-weight: 800;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.75fr);
  gap: 26px;
  align-items: start;
}

.player-card,
.detail-info,
.detail-content,
.search-panel {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.player-card {
  overflow: hidden;
}

.video-frame {
  position: relative;
  background: #020617;
}

.video-frame video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.56));
  transition: 0.2s ease;
}

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

.play-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  padding-left: 5px;
  border-radius: 50%;
  color: #ffffff;
  background: var(--primary);
  font-size: 32px;
  box-shadow: 0 18px 38px rgba(220, 38, 38, 0.36);
}

.detail-info {
  padding: 22px;
}

.detail-poster {
  width: 100%;
  max-height: 410px;
  object-fit: cover;
  border-radius: 22px;
  margin-bottom: 20px;
}

.detail-info h1 {
  font-size: clamp(28px, 4vw, 46px);
}

.detail-line {
  margin: 16px 0 0;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 26px;
  padding: 28px;
}

.article-block h2 {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 950;
}

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

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.footer-brand {
  color: #ffffff;
}

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

.footer-links {
  display: grid;
  gap: 10px;
}

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

.footer-bottom {
  margin-top: 36px;
  padding: 18px;
  text-align: center;
  color: #9ca3af;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

  .hero-inner,
  .intro-search,
  .detail-hero,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-poster {
    display: none;
  }

  .nav-search {
    width: 230px;
  }
}

@media (max-width: 760px) {
  .site-container {
    width: min(100% - 24px, 1180px);
  }

  .nav-shell {
    height: auto;
    min-height: 68px;
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .nav-menu {
    display: none;
    width: 100%;
    order: 3;
    padding-top: 8px;
  }

  .nav-menu.open {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .nav-search {
    order: 4;
    width: 100%;
  }

  .hero,
  .hero-inner {
    min-height: 610px;
  }

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

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

  .hero-controls {
    bottom: 20px;
  }

  .wide-search,
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    border-radius: 22px;
  }

  .movie-grid,
  .ranking-grid,
  .related-grid,
  .category-grid,
  .category-grid.large {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .page-hero {
    padding: 34px 24px;
    border-radius: 24px;
  }

  .card-body {
    padding: 13px;
  }

  .card-body h2 {
    font-size: 16px;
  }

  .card-body p {
    min-height: auto;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .ranking-grid,
  .related-grid,
  .category-grid,
  .category-grid.large {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
  }

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