* {
  box-sizing: border-box;
}

:root {
  --primary-50: #fef7ee;
  --primary-100: #fdecd3;
  --primary-400: #f38d33;
  --primary-500: #f07315;
  --primary-600: #e1590b;
  --primary-700: #bb420b;
  --accent-50: #fdf8f3;
  --accent-500: #d9804f;
  --accent-600: #bf693c;
  --secondary-500: #0fcaaa;
  --neutral-50: #fafaf9;
  --neutral-100: #f5f5f4;
  --neutral-200: #e7e5e4;
  --neutral-300: #d6d3d1;
  --neutral-400: #a8a29e;
  --neutral-500: #78716c;
  --neutral-600: #57534e;
  --neutral-700: #44403c;
  --neutral-800: #292524;
  --neutral-900: #1c1917;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.10), 0 4px 6px -4px rgba(0, 0, 0, 0.10);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.10), 0 8px 10px -6px rgba(0, 0, 0, 0.10);
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--neutral-50);
  color: var(--neutral-800);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  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.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--neutral-800);
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  box-shadow: var(--shadow-sm);
}

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

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

.nav a {
  color: var(--neutral-600);
  font-size: 14px;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav a:hover,
.nav a.active {
  color: var(--primary-600);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-form {
  position: relative;
}

.search-input {
  width: 250px;
  height: 40px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  outline: none;
  color: var(--neutral-800);
  background: var(--white);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(240, 115, 21, 0.24);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--neutral-400);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: var(--primary-50);
  color: var(--primary-700);
  cursor: pointer;
}

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

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

.mobile-nav {
  display: grid;
  gap: 12px;
  padding-top: 16px;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500), var(--secondary-500));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.20;
  background-image: linear-gradient(rgba(255, 255, 255, 0.26) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.26) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -20% auto;
  width: 520px;
  height: 520px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  filter: blur(8px);
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: center;
  min-height: 600px;
  gap: 48px;
  padding: 72px 0;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
  font-weight: 700;
}

.hero h1 {
  max-width: 780px;
  margin: 0 0 24px;
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.hero h1 span {
  color: var(--primary-100);
}

.hero p {
  max-width: 720px;
  margin: 0 0 32px;
  color: rgba(255, 255, 255, 0.90);
  font-size: 20px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--white);
  color: var(--primary-600);
  box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
  background: var(--primary-50);
}

.btn-ghost {
  border-color: rgba(255, 255, 255, 0.30);
  background: rgba(255, 255, 255, 0.10);
  color: var(--white);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
}

.hero-stack {
  display: grid;
  gap: 16px;
}

.hero-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(12px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.20);
}

.hero-card img {
  width: 92px;
  height: 128px;
  border-radius: 14px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.20);
}

.hero-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.hero-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.section {
  padding: 64px 0;
}

.section-white {
  background: var(--white);
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.section-desc {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--neutral-500);
}

.more-link {
  color: var(--primary-600);
  font-weight: 800;
  white-space: nowrap;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.movie-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-100), var(--accent-50));
}

.movie-card.large .movie-cover {
  aspect-ratio: 16 / 10;
}

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

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

.movie-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.68);
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  color: var(--white);
  font-size: 13px;
  font-weight: 900;
}

.movie-body {
  padding: 16px;
}

.movie-title {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--neutral-800);
  font-size: 17px;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--neutral-500);
  font-size: 13px;
}

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

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

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: 12px;
  font-weight: 700;
}

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

.category-tile {
  padding: 24px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.category-tile span {
  color: var(--neutral-500);
  font-size: 14px;
}

.page-hero {
  padding: 72px 0;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500), var(--secondary-500));
}

.page-hero h1 {
  max-width: 850px;
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.14;
  letter-spacing: -0.04em;
}

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

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 34px;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 13px;
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  background: var(--white);
  color: var(--neutral-700);
  font-weight: 800;
}

.page-link:hover,
.page-link.active {
  border-color: var(--primary-600);
  background: var(--primary-600);
  color: var(--white);
}

.detail-hero {
  padding: 52px 0;
  color: var(--white);
  background: linear-gradient(135deg, var(--neutral-900), var(--neutral-800));
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.10);
  box-shadow: var(--shadow-xl);
}

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

.detail-title {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.detail-line {
  max-width: 820px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.90);
  font-size: 13px;
  font-weight: 800;
}

.player-shell {
  overflow: hidden;
  border-radius: 24px;
  background: var(--neutral-900);
  box-shadow: var(--shadow-xl);
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: rgba(0, 0, 0, 0.32);
  color: var(--white);
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--primary-600);
  color: var(--white);
  font-size: 18px;
  font-weight: 900;
  box-shadow: var(--shadow-lg);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
}

.panel {
  padding: 28px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.panel + .panel {
  margin-top: 24px;
}

.panel h2,
.panel h3 {
  margin: 0 0 16px;
  color: var(--neutral-800);
  line-height: 1.3;
}

.panel p {
  margin: 0;
  color: var(--neutral-700);
}

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

.related-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: var(--neutral-50);
}

.related-item img {
  width: 72px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--primary-50);
}

.related-item strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.related-item span {
  display: block;
  margin-top: 4px;
  color: var(--neutral-500);
  font-size: 12px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 56px 92px minmax(0, 1fr) 88px;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--primary-50);
  color: var(--primary-700);
  font-weight: 900;
}

.rank-row:nth-child(-n + 3) .rank-number {
  background: linear-gradient(135deg, var(--primary-500), var(--accent-500));
  color: var(--white);
}

.rank-row img {
  width: 92px;
  height: 124px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--primary-50);
}

.rank-row h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.rank-row p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--neutral-600);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-score {
  color: var(--primary-600);
  font-size: 18px;
  font-weight: 900;
  text-align: right;
}

.search-page-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  max-width: 760px;
  margin-top: 28px;
}

.search-page-form input {
  min-height: 50px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  outline: none;
}

.search-page-form button {
  min-height: 50px;
  padding: 0 26px;
  border: 0;
  border-radius: 14px;
  background: var(--neutral-900);
  color: var(--white);
  font-weight: 900;
  cursor: pointer;
}

.sitemap-list {
  columns: 4 220px;
  column-gap: 34px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sitemap-list li {
  break-inside: avoid;
  margin: 0 0 10px;
}

.sitemap-list a {
  color: var(--neutral-700);
}

.sitemap-list a:hover {
  color: var(--primary-600);
}

.site-footer {
  background: var(--neutral-800);
  color: var(--neutral-300);
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 48px 0;
}

.footer-title {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

.footer-text {
  max-width: 420px;
  margin: 0;
  color: var(--neutral-400);
  font-size: 14px;
}

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

.footer-links a {
  color: var(--neutral-400);
  font-size: 14px;
}

.footer-links a:hover {
  color: var(--primary-400);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  color: var(--neutral-400);
  font-size: 14px;
}

@media (max-width: 980px) {
  .nav,
  .header-actions .search-form {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

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

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

  .hero-card img {
    width: 100%;
    height: 180px;
  }

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

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

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

  .hero {
    min-height: auto;
  }

  .hero-inner {
    min-height: auto;
    padding: 54px 0;
  }

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

  .hero-stack,
  .card-grid,
  .card-grid.large,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 44px 0;
  }

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

  .detail-poster {
    max-width: 260px;
  }

  .rank-row {
    grid-template-columns: 42px 74px minmax(0, 1fr);
  }

  .rank-row img {
    width: 74px;
    height: 100px;
  }

  .rank-score {
    grid-column: 3;
    text-align: left;
  }

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

  .footer-inner,
  .footer-bottom {
    grid-template-columns: 1fr;
    flex-direction: column;
  }
}
