* {
  box-sizing: border-box;
}

:root {
  --blue: #2563eb;
  --cyan: #06b6d4;
  --teal: #14b8a6;
  --orange: #f97316;
  --red: #ef4444;
  --green: #10b981;
  --purple: #7c3aed;
  --dark: #0f172a;
  --gray: #64748b;
  --soft: #f1f5f9;
  --white: #ffffff;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
  --small-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
  --radius: 22px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #1f2937;
  background: linear-gradient(135deg, #eff6ff 0%, #ecfeff 45%, #f0fdfa 100%);
  line-height: 1.65;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--teal));
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.25);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  flex: 0 0 auto;
  color: #ffffff;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 12px rgba(15, 23, 42, 0.25);
}

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

.site-nav a {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 700;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: #fef08a;
  border-bottom-color: #fef08a;
}

.header-search {
  display: flex;
  align-items: center;
  margin-left: 8px;
}

.header-search input {
  width: 220px;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px 0 0 12px;
  outline: none;
}

.header-search button {
  height: 40px;
  border: 0;
  border-radius: 0 12px 12px 0;
  padding: 0 16px;
  background: #facc15;
  color: #0f172a;
  font-weight: 800;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 24px;
  cursor: pointer;
}

.hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(115deg, #1d4ed8 0%, #06b6d4 52%, #14b8a6 100%);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(38px);
  opacity: 0.42;
  pointer-events: none;
}

.hero::before {
  width: 320px;
  height: 320px;
  left: 7%;
  top: 8%;
  background: #ffffff;
}

.hero::after {
  width: 440px;
  height: 440px;
  right: 6%;
  bottom: -8%;
  background: #fde047;
}

.hero-shell {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 560px;
  margin: 0 auto;
  padding: 68px 0;
}

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

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

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

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-weight: 800;
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 1.05;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.hero p {
  margin: 0 0 26px;
  color: #dbeafe;
  font-size: clamp(18px, 2.2vw, 24px);
}

.hero-tags,
.detail-tags,
.tag-line,
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.detail-tags span,
.tag-line span,
.filter-pills a,
.filter-pills button {
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.20);
  color: inherit;
  font-weight: 700;
}

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

.btn-primary,
.btn-secondary,
.btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 900;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-primary {
  background: linear-gradient(90deg, #f97316, #ef4444);
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(239, 68, 68, 0.28);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  backdrop-filter: blur(12px);
}

.btn-light {
  background: #ffffff;
  color: #2563eb;
  box-shadow: var(--small-shadow);
}

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

.hero-card {
  position: relative;
  min-height: 500px;
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.36);
  background: rgba(15, 23, 42, 0.30);
}

.hero-card img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.hero-card-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 28px;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.92), transparent);
}

.hero-card-info strong {
  display: block;
  font-size: 28px;
  margin-bottom: 8px;
}

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

.hero-controls button {
  width: 42px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
}

.hero-controls button.active {
  background: #ffffff;
}

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

.section {
  padding: 72px 0;
}

.section-soft {
  padding: 72px 0;
  background: linear-gradient(90deg, #ffedd5, #fee2e2);
}

.section-green {
  padding: 72px 0;
  background: linear-gradient(90deg, #dcfce7, #ccfbf1);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.section-title h2 {
  margin: 0;
  color: #1f2937;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.15;
}

.section-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--small-shadow);
}

.grid {
  display: grid;
  gap: 24px;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--small-shadow);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #1e40af, #06b6d4);
}

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(15, 23, 42, 0.76));
  opacity: 0.92;
}

.play-chip {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  transform: translate(-50%, -50%) scale(0.88);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #2563eb;
  font-weight: 900;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.rank-mark {
  position: absolute;
  left: 12px;
  top: 12px;
  min-width: 42px;
  height: 42px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: #ffffff;
  box-shadow: var(--small-shadow);
}

.movie-info {
  padding: 18px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.meta-line span {
  border-radius: 8px;
  padding: 4px 8px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
}

.meta-line span:nth-child(2) {
  background: linear-gradient(90deg, #059669, #10b981);
}

.meta-line span:nth-child(3) {
  background: linear-gradient(90deg, #7c3aed, #a855f7);
}

.movie-info h3 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 19px;
  line-height: 1.35;
}

.movie-info h3 a:hover {
  color: #2563eb;
}

.movie-info p {
  margin: 0 0 12px;
  color: #64748b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-line span {
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
}

.feature-card .poster-link img {
  aspect-ratio: 4 / 5;
}

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

.category-tile {
  border-radius: var(--radius);
  padding: 20px;
  background: #ffffff;
  box-shadow: var(--small-shadow);
}

.category-tile-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 70px;
  padding: 18px;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #06b6d4, #14b8a6);
}

.category-tile-main span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile-main strong {
  font-size: 14px;
  white-space: nowrap;
}

.category-tile p {
  min-height: 76px;
  color: #64748b;
}

.category-samples {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-samples a {
  color: #2563eb;
  font-weight: 700;
}

.page-hero {
  padding: 72px 0;
  color: #ffffff;
  background: linear-gradient(110deg, #1d4ed8, #06b6d4, #14b8a6);
}

.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: #e0f2fe;
  font-size: 20px;
}

.filter-panel {
  margin-bottom: 28px;
  border-radius: var(--radius);
  padding: 22px;
  background: #ffffff;
  box-shadow: var(--small-shadow);
}

.filter-panel input {
  width: 100%;
  height: 48px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 0 16px;
  outline: none;
  font-size: 16px;
}

.filter-panel input:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.16);
}

.filter-pills {
  margin-top: 14px;
}

.filter-pills a,
.filter-pills button {
  background: #f1f5f9;
  color: #334155;
  cursor: pointer;
}

.filter-pills a:hover,
.filter-pills button:hover,
.filter-pills a.active {
  background: linear-gradient(90deg, #2563eb, #06b6d4);
  color: #ffffff;
}

.breadcrumb {
  margin-bottom: 24px;
  color: #64748b;
  font-weight: 700;
}

.breadcrumb a {
  color: #2563eb;
}

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

.player-card,
.content-card,
.sidebar-card {
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--small-shadow);
  overflow: hidden;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(37, 99, 235, 0.12), rgba(2, 6, 23, 0.36));
  pointer-events: none;
}

.player-start {
  pointer-events: auto;
  border: 0;
  border-radius: 999px;
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.92);
  color: #2563eb;
  font-size: 34px;
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.32);
  cursor: pointer;
}

.player-wrap.is-playing .player-overlay {
  display: none;
}

.content-card {
  padding: 28px;
  margin-top: 24px;
}

.content-card h1,
.content-card h2,
.sidebar-card h2 {
  margin-top: 0;
  color: #111827;
  line-height: 1.25;
}

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

.detail-meta span {
  border-radius: 999px;
  padding: 8px 13px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
}

.detail-meta span:nth-child(2) {
  background: linear-gradient(90deg, #059669, #10b981);
}

.detail-meta span:nth-child(3) {
  background: linear-gradient(90deg, #f97316, #ef4444);
}

.detail-tags span {
  background: #eff6ff;
  color: #2563eb;
}

.sidebar-card {
  padding: 22px;
}

.sidebar-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, #1d4ed8, #06b6d4);
}

.info-list {
  display: grid;
  gap: 10px;
  color: #475569;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 10px;
}

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

.compact-movie {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: #f8fafc;
  transition: background 0.25s ease, transform 0.25s ease;
}

.compact-movie:hover {
  background: #eff6ff;
  transform: translateX(3px);
}

.compact-movie img {
  width: 72px;
  height: 92px;
  object-fit: cover;
  border-radius: 12px;
  background: linear-gradient(135deg, #1d4ed8, #06b6d4);
}

.compact-movie strong,
.compact-movie em {
  display: block;
}

.compact-movie strong {
  color: #111827;
  line-height: 1.35;
}

.compact-movie em {
  margin-top: 4px;
  color: #64748b;
  font-style: normal;
  font-size: 13px;
}

.compact-rank {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: #ffffff;
  font-weight: 900;
}

.search-box {
  max-width: 820px;
  margin: -34px auto 40px;
  position: relative;
  z-index: 3;
  display: flex;
  gap: 12px;
  border-radius: 24px;
  padding: 14px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  padding: 0 16px;
  font-size: 17px;
  outline: none;
}

.search-box button {
  border: 0;
  border-radius: 16px;
  padding: 0 24px;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #111827);
  padding: 44px 0 24px;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
}

.footer-inner strong {
  display: block;
  color: #67e8f9;
  font-size: 24px;
  margin-bottom: 10px;
}

.footer-inner p {
  margin: 0;
  max-width: 640px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-content: start;
}

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

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
  text-align: center;
  color: #94a3b8;
}

.empty-result {
  display: none;
  padding: 48px 24px;
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--small-shadow);
  text-align: center;
  color: #64748b;
  font-weight: 800;
}

@media (max-width: 1040px) {
  .header-search {
    display: none;
  }

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

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

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

@media (max-width: 760px) {
  .header-inner {
    min-height: 62px;
  }

  .logo {
    font-size: 22px;
  }

  .menu-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 70px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    padding: 12px;
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.94);
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 12px 14px;
    border-bottom: 0;
  }

  .hero-shell {
    min-height: auto;
    padding: 48px 0 72px;
  }

  .hero-slide.active {
    display: block;
  }

  .hero-card {
    margin-top: 28px;
    border-radius: 24px;
  }

  .hero-card img {
    height: 420px;
  }

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

  .section,
  .section-soft,
  .section-green {
    padding: 52px 0;
  }

  .page-hero {
    padding: 54px 0;
  }

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

  .search-box {
    margin-left: 16px;
    margin-right: 16px;
    flex-direction: column;
  }

  .search-box input,
  .search-box button {
    min-height: 48px;
  }
}

@media (max-width: 520px) {
  .grid-4,
  .grid-3,
  .grid-2,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary,
  .btn-light {
    width: 100%;
  }

  .content-card,
  .sidebar-card {
    padding: 20px;
  }
}
