:root {
  --red: #ef4444;
  --red-dark: #b91c1c;
  --orange: #f97316;
  --orange-soft: #ffedd5;
  --pink: #ec4899;
  --pink-soft: #fdf2f8;
  --yellow-soft: #fefce8;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --shadow: 0 10px 25px rgba(15, 23, 42, 0.1);
  --shadow-xl: 0 25px 55px rgba(15, 23, 42, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--gray-800);
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 34%, #fdf2f8 100%);
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.72);
}

.nav-shell {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo,
.footer-logo {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--red), var(--orange), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-link,
.mobile-nav-link {
  color: var(--gray-600);
  font-weight: 650;
  transition: color 0.2s ease;
}

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

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

.menu-button span {
  width: 20px;
  height: 2px;
  background: var(--red);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

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

.mobile-nav-link {
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff7ed;
}

.hero-slider {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: linear-gradient(135deg, #f87171, #fb923c, #f472b6);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 320px;
  gap: 48px;
  align-items: center;
}

.hero-copy {
  color: var(--white);
  max-width: 680px;
  animation: fadeUp 0.7s ease both;
}

.hero-kicker {
  display: inline-flex;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 20px;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(44px, 7vw, 76px);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.hero-lead {
  font-size: clamp(20px, 2.4vw, 28px);
  line-height: 1.45;
  margin: 0 0 12px;
  font-weight: 300;
}

.hero-summary {
  font-size: 17px;
  line-height: 1.75;
  opacity: 0.92;
  margin: 0;
}

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

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

.primary-button {
  background: var(--white);
  color: var(--red);
  box-shadow: var(--shadow-xl);
}

.ghost-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.17);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

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

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  transform: rotate(2deg);
  aspect-ratio: 3 / 4;
  background: var(--gray-100);
}

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

.hero-poster span {
  position: absolute;
  left: 18px;
  bottom: 18px;
  right: 18px;
  display: flex;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  color: var(--white);
  font-weight: 800;
}

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

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.46);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--white);
}

.section-block {
  padding: 72px 0;
}

.section-heading {
  text-align: center;
  margin-bottom: 42px;
}

.section-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, #fee2e2, #ffedd5);
  color: var(--red-dark);
  font-weight: 800;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 0 auto;
  max-width: 680px;
  color: var(--gray-600);
  line-height: 1.8;
}

.search-panel {
  padding-bottom: 0;
}

.search-card {
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
  padding: 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.search-card h2 {
  margin: 0 0 6px;
  font-size: 26px;
}

.search-card p {
  margin: 0;
  color: var(--gray-600);
}

.movie-search,
.inline-search {
  width: min(100%, 420px);
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 14px 18px;
  color: var(--gray-800);
  outline: 0;
  background: var(--white);
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.05);
}

.movie-search:focus,
.inline-search:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.16);
}

.inline-search {
  display: block;
  margin: -18px auto 38px;
}

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

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

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

.movie-card {
  min-width: 0;
  background: var(--white);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .poster-wrap img {
  transform: scale(1.1);
}

.poster-hover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.movie-card:hover .poster-hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.4);
}

.play-mark {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  padding-left: 4px;
}

.badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.badge-region {
  top: 14px;
  right: 14px;
  color: var(--white);
  background: var(--red);
}

.badge-year {
  top: 14px;
  left: 14px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.72);
}

.card-body {
  padding: 20px;
}

.movie-card.compact .card-body {
  padding: 15px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

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

.card-body p {
  min-height: 44px;
  color: var(--gray-600);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.tag-row span,
.detail-tags span {
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--orange-soft);
  color: #c2410c;
  font-size: 12px;
  font-weight: 700;
}

.card-meta,
.rank-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--gray-500);
  font-size: 13px;
}

.ranking-band,
.category-band {
  padding: 72px 0;
  background: linear-gradient(90deg, #ffedd5, #fce7f3, #fee2e2);
}

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

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

.rank-row {
  background: var(--white);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-row:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.rank-link {
  display: grid;
  grid-template-columns: 54px 86px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px 18px;
}

.rank-number {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.rank-link img {
  width: 76px;
  height: 100px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-info h3 {
  margin: 0 0 8px;
  font-size: 19px;
}

.rank-info p {
  margin: 0 0 8px;
  color: var(--gray-600);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-arrow {
  padding: 8px 16px;
  border-radius: 999px;
  background: #fef2f2;
  color: var(--red);
  font-weight: 800;
}

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

.category-tile {
  position: relative;
  min-height: 230px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  color: var(--white);
  background: var(--gray-900);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
  opacity: 0.62;
  transition: transform 0.45s ease;
}

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

.category-tile div {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
}

.category-tile h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.category-tile p {
  margin: 0;
  line-height: 1.65;
  opacity: 0.92;
}

.inner-hero {
  padding: 82px 0;
  color: var(--white);
  background: linear-gradient(135deg, #7f1d1d, #9a3412, #831843);
}

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

.ranking-hero {
  background: linear-gradient(135deg, #111827, #7f1d1d, #ea580c);
}

.inner-hero h1 {
  margin: 14px 0 14px;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.inner-hero p {
  max-width: 760px;
  margin: 0;
  font-size: 19px;
  line-height: 1.75;
  opacity: 0.92;
}

.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.crumb a:hover {
  color: var(--white);
}

.crumb span::before,
.crumb a + a::before {
  content: "/";
  margin-right: 8px;
  opacity: 0.62;
}

.detail-shell {
  padding: 40px 0 72px;
  background: linear-gradient(135deg, #fff7ed, #fdf2f8, #fef2f2);
}

.detail-crumb {
  color: var(--gray-600);
  margin-bottom: 26px;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.88fr);
  gap: 34px;
  align-items: start;
}

.movie-player {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: var(--shadow-xl);
  aspect-ratio: 16 / 9;
}

.player-video,
.player-overlay,
.player-overlay img {
  width: 100%;
  height: 100%;
}

.player-video {
  display: block;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: #000000;
  display: block;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 5;
}

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

.player-overlay img {
  object-fit: cover;
  opacity: 0.72;
}

.overlay-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.66));
}

.overlay-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 78px;
  height: 78px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-size: 34px;
  padding-left: 5px;
}

.player-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 800;
  pointer-events: none;
  z-index: 6;
}

.player-loading:empty {
  display: none;
}

.player-controls {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 8;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.58));
}

.player-controls button {
  border: 0;
  border-radius: 999px;
  min-width: 44px;
  height: 44px;
  padding: 0 16px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-weight: 800;
}

.play-toggle {
  width: 50px;
  padding-left: 18px;
}

.fullscreen-toggle {
  margin-left: auto;
}

.story-card,
.detail-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 26px;
}

.story-card {
  margin-top: 24px;
}

.story-card h2,
.detail-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.story-card p,
.review-card p {
  margin: 0;
  color: var(--gray-600);
  line-height: 1.9;
  font-size: 16px;
}

.detail-info {
  display: grid;
  gap: 20px;
}

.detail-pill {
  display: inline-flex;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--red-dark);
  background: linear-gradient(90deg, #fee2e2, #ffedd5);
  font-weight: 800;
  margin-bottom: 16px;
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

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

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

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--gray-700);
  font-weight: 750;
}

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

.site-footer {
  padding: 52px 0;
  background: var(--gray-900);
  color: #d1d5db;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 36px;
}

.footer-grid p {
  line-height: 1.8;
  margin: 14px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-content: start;
  justify-content: flex-end;
}

.footer-links a {
  color: #e5e7eb;
}

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

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

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

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

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

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

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

  .hero-poster {
    display: none;
  }
}

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

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

  .nav-shell {
    height: 64px;
  }

  .hero-slider {
    height: 640px;
  }

  .hero-content {
    align-items: end;
    padding-bottom: 86px;
  }

  .hero-actions,
  .search-card,
  .footer-grid {
    flex-direction: column;
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .search-card {
    display: grid;
  }

  .movie-search {
    width: 100%;
  }

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

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

  .card-body {
    padding: 14px;
  }

  .card-body h3 {
    font-size: 17px;
  }

  .card-body p,
  .tag-row {
    display: none;
  }

  .rank-link {
    grid-template-columns: 44px 72px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-link img {
    width: 66px;
    height: 88px;
  }

  .rank-arrow {
    display: none;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .player-controls {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  .player-controls button {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 13px;
  }
}

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

  .movie-grid,
  .small-grid,
  .category-movie-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1,
  .hero-copy h2 {
    font-size: 40px;
  }
}
