:root {
  --page-bg: #f8fafc;
  --text: #111827;
  --muted: #64748b;
  --soft: #f1f5f9;
  --line: #e2e8f0;
  --red: #dc2626;
  --red-dark: #991b1b;
  --yellow: #facc15;
  --card: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.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.94);
  border-bottom: 1px solid rgba(220, 38, 38, 0.12);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 12px 26px rgba(220, 38, 38, 0.32);
}

.brand-mark::after {
  content: "";
  position: absolute;
  right: -3px;
  top: -3px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--yellow);
}

.brand-mark span {
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 12px solid white;
  margin-left: 3px;
}

.brand-name {
  font-size: 20px;
  background: linear-gradient(90deg, var(--red), var(--red-dark));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #374151;
  font-weight: 600;
  white-space: nowrap;
}

.desktop-nav a,
.mobile-panel a,
.site-footer a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover {
  color: var(--red);
}

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

.search-form input,
.mobile-search input,
.filter-input,
.filter-select {
  border: 1px solid #cbd5e1;
  background: white;
  border-radius: 999px;
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.search-form input {
  width: 210px;
  padding: 10px 15px;
}

.mobile-search input,
.filter-input {
  width: 100%;
  padding: 12px 16px;
}

.filter-select {
  padding: 12px 16px;
}

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

.search-form button,
.mobile-search button,
.btn-primary,
.btn-light,
.player-start {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  font-weight: 800;
}

.search-form button,
.mobile-search button,
.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.26);
}

.search-form button {
  padding: 9px 16px;
}

.mobile-search button {
  padding: 10px 18px;
}

.btn-primary,
.btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
}

.btn-light {
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: #fee2e2;
}

.menu-toggle span {
  width: 21px;
  height: 2px;
  margin: 3px auto;
  background: var(--red-dark);
}

.mobile-panel {
  display: none;
  padding: 0 16px 18px;
  border-top: 1px solid var(--line);
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel nav {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  font-weight: 700;
}

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #111827 0%, #1f2937 42%, #0f172a 100%);
  color: white;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(55px);
  opacity: 0.28;
}

.hero::before {
  top: 90px;
  right: 6%;
  width: 270px;
  height: 270px;
  background: var(--red);
}

.hero::after {
  bottom: 45px;
  left: 7%;
  width: 360px;
  height: 360px;
  background: #eab308;
}

.hero-shell {
  position: relative;
  z-index: 2;
  padding: 72px 0;
}

.hero-kicker,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  color: white;
  background: rgba(220, 38, 38, 0.88);
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(220, 38, 38, 0.22);
}

.hero-title {
  max-width: 760px;
  margin: 22px 0 26px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-intro {
  max-width: 760px;
  margin: 0 0 30px;
  color: #cbd5e1;
  font-size: 18px;
}

.hero-slider {
  position: relative;
  margin-top: 38px;
  min-height: 480px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 44px;
  align-items: center;
}

.hero-slide.is-active {
  display: grid;
}

.hero-copy {
  display: grid;
  gap: 18px;
}

.hero-copy h2 {
  margin: 0;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.08;
}

.hero-copy p {
  max-width: 650px;
  margin: 0;
  color: #d1d5db;
  font-size: 18px;
}

.hero-meta,
.movie-meta,
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta span,
.movie-meta span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-meta span {
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
  aspect-ratio: 2 / 3;
  transform: rotate(1.5deg);
}

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

.hero-dots {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.hero-dots button {
  width: 34px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: var(--yellow);
}

.main-area {
  padding: 52px 0;
}

.content-section {
  margin-bottom: 58px;
}

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

.section-heading div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-heading span {
  width: 5px;
  height: 32px;
  border-radius: 999px;
  background: var(--red);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.more-link {
  color: var(--red);
  font-weight: 800;
}

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

.movie-card {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 255px;
  border-radius: 20px;
  background: #111827;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.12);
  aspect-ratio: 2 / 3;
  transform: translateY(0);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

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

.card-year {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  padding: 5px 9px;
  border-radius: 8px;
  color: white;
  background: var(--red);
  font-size: 12px;
  font-weight: 900;
}

.card-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 999px;
  color: white;
  background: var(--red);
  box-shadow: 0 14px 30px rgba(220, 38, 38, 0.36);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.8);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.86));
}

.card-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: grid;
  gap: 3px;
  padding: 18px;
  color: white;
}

.card-content strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 16px;
  line-height: 1.3;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-content em {
  overflow: hidden;
  color: #cbd5e1;
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.category-tile {
  display: grid;
  gap: 12px;
  min-height: 176px;
  padding: 24px;
  border: 1px solid rgba(220, 38, 38, 0.10);
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff, #fff1f2);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.category-tile strong {
  font-size: 22px;
}

.category-tile p {
  margin: 0;
  color: var(--muted);
}

.page-hero {
  padding: 56px 0 36px;
  background: linear-gradient(135deg, #fff1f2, #ffffff 48%, #f8fafc);
}

.page-hero h1 {
  margin: 14px 0 12px;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.08;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 170px;
  gap: 12px;
  margin: 28px 0 30px;
}

.empty-state {
  display: none;
  padding: 30px;
  border-radius: 20px;
  background: white;
  color: var(--muted);
  text-align: center;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

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

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

.ranking-item {
  display: grid;
  grid-template-columns: 64px 94px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: white;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.rank-no {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  font-weight: 900;
}

.ranking-item img {
  width: 94px;
  height: 132px;
  border-radius: 14px;
  object-fit: cover;
}

.ranking-copy h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.ranking-copy p {
  margin: 0;
  color: var(--muted);
}

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

.breadcrumb {
  margin: 26px 0;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--red);
  font-weight: 700;
}

.player-card,
.detail-card,
.side-card {
  overflow: hidden;
  border-radius: 24px;
  background: white;
  box-shadow: var(--shadow);
}

.player-card {
  background: #020617;
}

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

.video-player video {
  display: block;
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  background: rgba(2, 6, 23, 0.48);
  cursor: pointer;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

.player-start {
  position: relative;
  z-index: 2;
  width: 84px;
  height: 84px;
  color: white;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  font-size: 30px;
  box-shadow: 0 18px 44px rgba(220, 38, 38, 0.42);
}

.video-player.is-playing .player-cover {
  display: none;
}

.detail-card {
  padding: 30px;
}

.detail-card h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.12;
}

.movie-meta span,
.tag-list span {
  color: #7f1d1d;
  background: #fee2e2;
}

.detail-card h2,
.side-card h2 {
  margin: 28px 0 12px;
  font-size: 22px;
}

.detail-card p {
  margin: 0 0 14px;
  color: #334155;
  font-size: 16px;
}

.side-card {
  padding: 18px;
}

.side-card h2 {
  margin-top: 0;
}

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

.related-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.related-item img {
  width: 72px;
  height: 102px;
  border-radius: 12px;
  object-fit: cover;
}

.related-item strong {
  display: block;
  margin-bottom: 5px;
  line-height: 1.35;
}

.related-item span {
  color: var(--muted);
  font-size: 13px;
}

.search-results-title {
  margin: 0 0 20px;
  font-size: 24px;
}

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

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

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

  .hero-slide {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

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

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

  .search-form {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .hero-shell {
    padding: 44px 0;
  }

  .hero-slider {
    min-height: auto;
  }

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

  .hero-poster {
    max-width: 260px;
    margin: 0 auto;
  }

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

  .movie-card {
    min-height: 220px;
    border-radius: 16px;
  }

  .category-tiles,
  .filter-bar {
    grid-template-columns: 1fr;
  }

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

  .ranking-item {
    grid-template-columns: 44px 78px minmax(0, 1fr);
  }

  .ranking-item img {
    width: 78px;
    height: 110px;
  }

  .ranking-item .btn-primary {
    grid-column: 1 / -1;
  }

  .detail-card {
    padding: 22px;
  }
}
