* {
  box-sizing: border-box;
}

:root {
  --bg: #f1f5f9;
  --panel: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --dark: #020617;
  --line: #e2e8f0;
  --teal: #14b8a6;
  --teal-dark: #0f766e;
  --cyan: #06b6d4;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
  --radius: 22px;
}

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;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 55%, #e2e8f0 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.nav-wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  color: #ffffff;
  font-size: 15px;
  box-shadow: 0 12px 28px rgba(20, 184, 166, 0.36);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #cbd5e1;
  font-weight: 600;
  font-size: 15px;
}

.nav-links a {
  transition: color 0.22s ease, transform 0.22s ease;
}

.nav-links a:hover {
  color: #5eead4;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.hero {
  position: relative;
  height: 680px;
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, rgba(20, 184, 166, 0.34), transparent 34%), #020617;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #0f172a, #0f766e);
  transform: scale(1.02);
}

.hero-bg[src$=".jpg"] {
  color: transparent;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.65) 46%, rgba(2, 6, 23, 0.24) 100%), linear-gradient(0deg, rgba(2, 6, 23, 0.96) 0%, transparent 52%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.55fr);
  align-items: center;
  gap: 48px;
  padding: 48px 0;
}

.hero-copy {
  color: #ffffff;
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 14px;
  color: #5eead4;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--teal-dark);
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.055em;
  text-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

.hero-desc {
  margin: 0 0 24px;
  max-width: 720px;
  color: #dbeafe;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.7;
}

.chip-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-row span {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  color: #0f172a;
  background: #ccfbf1;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(20, 184, 166, 0.78);
  backdrop-filter: blur(12px);
}

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

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

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 18px 45px rgba(20, 184, 166, 0.35);
}

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

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

.hero-poster {
  display: block;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: linear-gradient(135deg, #0f172a, #134e4a);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4.1;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-poster:hover img {
  transform: scale(1.05);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dots button.is-active {
  background: #5eead4;
}

.section-wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 48px auto;
}

.lift-panel {
  margin-top: -44px;
  position: relative;
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.75fr);
  gap: 28px;
  align-items: center;
  padding: 28px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.home-search h2,
.section-title h2,
.rank-copy h2,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  color: var(--text);
  letter-spacing: -0.035em;
}

.home-search h2 {
  font-size: clamp(28px, 4vw, 42px);
}

.home-search p,
.rank-copy p,
.page-hero p,
.detail-line,
.detail-text p {
  color: var(--muted);
  line-height: 1.8;
}

.search-bar {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 18px;
  background: #f1f5f9;
  border: 1px solid var(--line);
}

.search-bar input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 12px;
  color: var(--text);
}

.search-bar button {
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  cursor: pointer;
}

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

.section-title h2 {
  font-size: clamp(26px, 4vw, 40px);
}

.section-title a {
  color: var(--teal-dark);
  font-weight: 800;
}

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

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

.movie-card {
  border-radius: 18px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.09);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.18);
}

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

.poster-wrap {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 25% 20%, rgba(20, 184, 166, 0.34), transparent 38%), linear-gradient(135deg, #0f172a, #134e4a);
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(20, 184, 166, 0.9);
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  min-width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.34);
}

.card-body {
  padding: 15px;
}

.card-body h3 {
  min-height: 48px;
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.4;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

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

.category-card {
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff, #ecfeff);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.09);
  border: 1px solid rgba(20, 184, 166, 0.18);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.16);
}

.category-card span {
  font-size: 22px;
  font-weight: 900;
  color: var(--text);
}

.category-card b {
  color: var(--teal-dark);
  font-size: 18px;
}

.category-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.rank-entry {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 28px;
  align-items: center;
  padding: 30px;
  border-radius: 26px;
  background: linear-gradient(135deg, #ffffff, #ecfeff);
  box-shadow: var(--shadow);
}

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

.rank-mini .movie-card:nth-child(n+4) {
  display: none;
}

.page-main {
  padding-bottom: 24px;
}

.page-hero {
  width: min(1240px, calc(100% - 32px));
  margin: 34px auto 0;
  min-height: 330px;
  padding: 52px;
  border-radius: 30px;
  color: #ffffff;
  background: radial-gradient(circle at 20% 20%, rgba(20, 184, 166, 0.42), transparent 36%), linear-gradient(135deg, #020617, #0f172a 48%, #134e4a);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.page-hero.small-hero {
  min-height: 260px;
}

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

.page-hero p:not(.eyebrow) {
  max-width: 780px;
  color: #cbd5e1;
  font-size: 18px;
}

.ranking-hero {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 34px;
  align-items: center;
}

.ranking-cover {
  display: block;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #0f172a, #134e4a);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

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

.filter-panel {
  margin-top: 24px;
  grid-template-columns: 1fr;
}

.inline-filter {
  width: 100%;
}

.select-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.select-row select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #ffffff;
  outline: 0;
}

.breadcrumb {
  width: min(1240px, calc(100% - 32px));
  margin: 24px auto;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-hero {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
  padding: 30px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #0f172a, #134e4a);
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.2);
}

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

.detail-copy h1 {
  font-size: clamp(34px, 5vw, 58px);
}

.detail-line {
  font-size: 19px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0;
}

.detail-meta span {
  padding: 9px 13px;
  border-radius: 999px;
  color: #0f172a;
  background: #e2e8f0;
  font-weight: 800;
}

.player-section {
  padding: 28px;
  border-radius: 28px;
  background: #020617;
  box-shadow: var(--shadow);
}

.player-section h2 {
  margin: 0 0 20px;
  color: #ffffff;
  font-size: clamp(24px, 4vw, 36px);
}

.video-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  aspect-ratio: 16 / 9;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.video-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
  cursor: pointer;
}

.player-start {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.32), rgba(2, 6, 23, 0.76));
  cursor: pointer;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-start span {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 20px 60px rgba(20, 184, 166, 0.42);
  font-size: 34px;
}

.player-start b {
  font-size: 20px;
}

.video-box.is-playing .player-start {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.detail-text {
  padding: 30px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.detail-text h2 {
  margin: 0 0 12px;
  font-size: 28px;
}

.detail-text p + h2 {
  margin-top: 30px;
}

.detail-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.detail-nav a {
  padding: 11px 14px;
  border-radius: 14px;
  color: var(--teal-dark);
  background: #ccfbf1;
  font-weight: 800;
}

.site-footer {
  margin-top: 72px;
  color: #cbd5e1;
  background: #020617;
}

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1.1fr;
  gap: 32px;
}

.footer-logo {
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

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

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

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

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

.footer-cats {
  columns: 2;
}

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

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

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

  .hero-content,
  .rank-entry,
  .ranking-hero {
    grid-template-columns: 1fr;
  }

  .hero-poster,
  .ranking-cover {
    display: none;
  }
}

@media (max-width: 820px) {
  .nav-wrap {
    min-height: 64px;
  }

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

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 68px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px;
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.98);
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 13px 14px;
  }

  .hero {
    height: 610px;
  }

  .hero-content {
    padding: 34px 0 70px;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

  .select-row {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 540px) {
  .brand {
    font-size: 20px;
  }

  .hero {
    height: 560px;
  }

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

  .section-wrap {
    width: min(100% - 22px, 1240px);
    margin: 34px auto;
  }

  .lift-panel {
    margin-top: -30px;
    padding: 18px;
  }

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

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

  .detail-hero,
  .detail-text,
  .player-section,
  .rank-entry {
    padding: 18px;
    border-radius: 20px;
  }
}
