:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --cyan: #06b6d4;
  --teal: #14b8a6;
  --yellow: #facc15;
  --slate: #0f172a;
  --text: #1f2937;
  --muted: #64748b;
  --soft: #f8fafc;
  --line: #e5e7eb;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 1rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #eef7ff 42%, #f8fafc 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  color: #fff;
  background: linear-gradient(90deg, #2563eb 0%, #06b6d4 50%, #14b8a6 100%);
  box-shadow: 0 12px 32px rgba(14, 116, 144, 0.26);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}

.site-logo {
  flex: 0 0 auto;
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

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

.desktop-nav a,
.mobile-nav a {
  font-weight: 700;
  opacity: 0.92;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
  color: var(--yellow);
  opacity: 1;
}

.search-form,
.mobile-search {
  display: flex;
  align-items: stretch;
}

.search-form input,
.mobile-search input {
  width: 180px;
  border: 0;
  outline: 0;
  padding: 10px 12px;
  color: #0f172a;
  background: #fff;
}

.search-form input {
  border-radius: 12px 0 0 12px;
}

.search-form button,
.mobile-search button {
  border: 0;
  padding: 10px 14px;
  color: #1e40af;
  background: var(--yellow);
  font-weight: 900;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.search-form button {
  border-radius: 0 12px 12px 0;
}

.search-form button:hover,
.mobile-search button:hover {
  filter: brightness(1.05);
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 1.8rem;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
}

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

.mobile-search input {
  flex: 1;
  border-radius: 12px 0 0 12px;
}

.mobile-search button {
  border-radius: 0 12px 12px 0;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 650px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #0891b2 48%, #0f766e 100%);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  width: 28rem;
  height: 28rem;
  border-radius: 999px;
  filter: blur(48px);
  opacity: 0.3;
  animation: pulse 5s ease-in-out infinite;
}

.hero::before {
  top: -8rem;
  left: -6rem;
  background: #67e8f9;
}

.hero::after {
  right: -8rem;
  bottom: -6rem;
  background: #fde047;
  animation-delay: 1s;
}

.hero-slider {
  position: relative;
  z-index: 2;
  min-height: 650px;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 48px;
  align-items: center;
  min-height: 650px;
  padding: 64px 0 84px;
}

.hero-slide.active {
  display: grid;
  animation: fadeUp 0.55s ease both;
}

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

.hero-copy .eyebrow {
  display: inline-flex;
  width: fit-content;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
  font-weight: 900;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 5.9rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 720px;
  margin: 0;
  color: #dff7ff;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  line-height: 1.8;
}

.hero-tags,
.detail-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: inherit;
  font-size: 0.85rem;
  font-weight: 800;
}

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

.btn-primary,
.btn-ghost,
.btn-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  padding: 14px 24px;
  color: #1e3a8a;
  background: #fde047;
  box-shadow: 0 16px 28px rgba(250, 204, 21, 0.28);
}

.btn-ghost {
  padding: 14px 24px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(16px);
}

.btn-small {
  padding: 10px 16px;
  color: #fff;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
}

.btn-primary:hover,
.btn-ghost:hover,
.btn-small:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 30px rgba(15, 23, 42, 0.18);
}

.hero-visual {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  min-height: 430px;
  box-shadow: 0 34px 80px rgba(15, 23, 42, 0.34);
  background: #0f172a;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  min-height: 430px;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 12%, rgba(15, 23, 42, 0.76) 100%);
}

.hero-caption {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
  display: grid;
  gap: 8px;
}

.hero-caption strong {
  font-size: 1.5rem;
}

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

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

.hero-dot.active {
  width: 34px;
  background: #fde047;
}

.page-hero {
  padding: 72px 0;
  color: #fff;
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 55%, #14b8a6 100%);
}

.page-hero h1 {
  max-width: 900px;
  margin: 0 0 16px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.08;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: #e0f7ff;
  line-height: 1.8;
  font-size: 1.1rem;
}

.content-section {
  padding: 64px 0;
}

.content-section.tint-orange {
  background: linear-gradient(90deg, #fff7ed 0%, #fee2e2 100%);
}

.content-section.tint-green {
  background: linear-gradient(90deg, #ecfdf5 0%, #d1fae5 100%);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  color: #111827;
}

.section-heading p {
  max-width: 580px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.movie-grid,
.featured-grid,
.category-grid,
.info-grid {
  display: grid;
  gap: 24px;
}

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

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

.movie-card,
.featured-card,
.category-card,
.info-card,
.rank-card,
.compact-card {
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.featured-card:hover,
.category-card:hover,
.info-card:hover,
.rank-card:hover,
.compact-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.movie-card {
  display: block;
  overflow: hidden;
  border-radius: 18px;
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
}

.poster-wrap img,
.featured-card img,
.compact-card img,
.rank-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-card:hover .poster-wrap img,
.featured-card:hover img,
.compact-card:hover img,
.rank-card:hover .rank-thumb img {
  transform: scale(1.08);
}

.year-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  border-radius: 8px;
  color: #fff;
  background: rgba(15, 23, 42, 0.74);
  font-size: 0.78rem;
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  color: #2563eb;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-row b {
  padding: 5px 9px;
  border-radius: 7px;
  color: #fff;
  font-size: 0.75rem;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
}

.meta-row b:nth-child(2n) {
  background: linear-gradient(90deg, #16a34a, #10b981);
}

.card-body strong {
  color: #111827;
  font-size: 1.06rem;
  line-height: 1.35;
}

.card-body em {
  min-height: 42px;
  color: var(--muted);
  font-style: normal;
  line-height: 1.6;
}

.card-body .tag-row span {
  background: #f1f5f9;
  color: #475569;
}

.featured-card {
  position: relative;
  display: block;
  min-height: 430px;
  overflow: hidden;
  border-radius: 28px;
  color: #fff;
}

.featured-card img {
  height: 430px;
}

.featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.06) 0%, rgba(0, 0, 0, 0.78) 100%);
}

.badge-row {
  position: absolute;
  left: 22px;
  top: 22px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge-row b {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.9);
  font-size: 0.75rem;
}

.badge-row b:first-child {
  background: rgba(239, 68, 68, 0.92);
}

.featured-copy {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 2;
  display: grid;
  gap: 10px;
}

.featured-copy strong {
  font-size: 1.6rem;
}

.featured-copy em {
  color: #e5e7eb;
  font-style: normal;
  line-height: 1.65;
}

.featured-copy small {
  color: #cffafe;
}

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

.category-card,
.info-card {
  display: grid;
  gap: 14px;
  border-radius: 22px;
  padding: 24px;
}

.category-card {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #06b6d4 58%, #14b8a6);
}

.category-card strong,
.info-card strong {
  font-size: 1.25rem;
}

.category-card p,
.info-card p {
  margin: 0;
  line-height: 1.75;
}

.category-card span {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 900;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 72px 160px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 18px;
}

.rank-index {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  font-size: 1.25rem;
  font-weight: 900;
}

.rank-thumb {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  background: #dbeafe;
}

.rank-copy {
  display: grid;
  gap: 8px;
}

.rank-copy strong {
  font-size: 1.12rem;
}

.rank-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.rank-copy small {
  color: #0891b2;
  font-weight: 800;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 26px 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.breadcrumb a {
  color: #2563eb;
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.85fr);
  gap: 28px;
  align-items: start;
  padding-bottom: 64px;
}

.player-card,
.detail-card,
.sidebar-card,
.article-card {
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
  margin-bottom: 24px;
  background: #000;
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}

.player-frame video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.35));
  pointer-events: none;
}

.play-button {
  pointer-events: auto;
  border: 0;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  color: #2563eb;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.3);
  font-size: 2rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.play-button:hover {
  transform: scale(1.06);
}

.player-overlay.hidden {
  display: none;
}

.detail-card,
.sidebar-card,
.article-card {
  padding: 26px;
}

.detail-card h1 {
  margin: 12px 0 16px;
  color: #111827;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.15;
}

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

.detail-meta span {
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
  font-weight: 900;
}

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

.detail-lead {
  margin: 0 0 22px;
  color: #475569;
  font-size: 1.1rem;
  line-height: 1.8;
  font-style: italic;
}

.detail-card h2,
.sidebar-card h2,
.article-card h2 {
  margin: 26px 0 12px;
  color: #111827;
}

.detail-card p,
.article-card p,
.sidebar-card p {
  color: #374151;
  line-height: 1.86;
}

.detail-tags span {
  background: #f1f5f9;
  color: #475569;
}

.sidebar-card {
  position: sticky;
  top: 92px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
}

.compact-card img {
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: #dbeafe;
}

.compact-card span {
  display: grid;
  gap: 6px;
}

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

.compact-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.88rem;
}

.next-prev {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
}

.next-prev a {
  flex: 1;
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  color: #2563eb;
  font-weight: 900;
}

.search-panel {
  border-radius: 24px;
  padding: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}

.search-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 20px;
}

.search-inline input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}

.search-inline button {
  border: 0;
  border-radius: 14px;
  padding: 14px 24px;
  color: #fff;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
  font-weight: 900;
  cursor: pointer;
}

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

.info-card {
  min-height: 180px;
}

.site-footer {
  color: #e5e7eb;
  background: linear-gradient(90deg, #1e293b 0%, #334155 50%, #1e293b 100%);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
  padding: 48px 0;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 14px;
  color: #67e8f9;
}

.site-footer p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.8;
}

.site-footer section {
  display: grid;
  gap: 10px;
  align-content: start;
}

.site-footer a {
  color: #cbd5e1;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: #67e8f9;
}

.footer-bottom {
  border-top: 1px solid rgba(226, 232, 240, 0.18);
  padding: 18px 0;
  text-align: center;
  color: #94a3b8;
}

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

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

@media (max-width: 1050px) {
  .desktop-nav,
  .search-form {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

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

  .hero-visual {
    min-height: 340px;
  }

  .hero-visual img {
    min-height: 340px;
  }

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

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

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

  .site-logo {
    font-size: 1.25rem;
  }

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

  .hero-slide {
    padding: 44px 0 78px;
  }

  .hero-copy h1 {
    font-size: 2.8rem;
  }

  .hero-visual {
    border-radius: 24px;
  }

  .section-heading {
    display: grid;
  }

  .movie-grid,
  .featured-grid,
  .category-grid,
  .info-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-card {
    grid-template-columns: 54px 96px minmax(0, 1fr);
  }

  .rank-card .btn-small {
    grid-column: 1 / -1;
  }

  .compact-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .next-prev {
    flex-direction: column;
  }

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