* {
  box-sizing: border-box;
}

:root {
  --teal: #0d9488;
  --cyan: #0891b2;
  --emerald: #10b981;
  --orange: #f97316;
  --rose: #f43f5e;
  --amber: #f59e0b;
  --dark: #111827;
  --muted: #6b7280;
  --soft: #f3f4f6;
  --line: #e5e7eb;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

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(--dark);
  background: #f8fafc;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  box-shadow: 0 10px 28px rgba(8, 145, 178, 0.28);
}

.header-inner {
  max-width: 1180px;
  height: 68px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #7c2d12;
  background: #fbbf24;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(251, 191, 36, 0.36);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: rotate(12deg) scale(1.05);
}

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

.nav-link,
.mobile-link {
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: #fde68a;
  background: rgba(255, 255, 255, 0.12);
}

.top-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-search input,
.mobile-search input,
.search-box input,
.search-box select {
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--dark);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.top-search input {
  width: 220px;
}

.top-search button,
.mobile-search button,
.primary-button,
.secondary-button,
.search-box button,
.page-button {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 800;
  color: #713f12;
  background: #fbbf24;
  box-shadow: 0 12px 26px rgba(251, 191, 36, 0.32);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.primary-button:hover,
.secondary-button:hover,
.search-box button:hover,
.page-button:hover {
  transform: translateY(-2px);
  background: #fcd34d;
  box-shadow: 0 18px 34px rgba(251, 191, 36, 0.42);
}

.secondary-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(16px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 22px;
}

.mobile-panel {
  display: none;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 18px;
}

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

.mobile-panel nav {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.hero {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(100deg, #f97316 0%, #ec4899 48%, #e11d48 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 78% 24%, rgba(255, 255, 255, 0.28), transparent 30%),
    radial-gradient(circle at 18% 80%, rgba(20, 184, 166, 0.34), transparent 34%),
    rgba(0, 0, 0, 0.30);
}

.hero-slider {
  position: relative;
  max-width: 1180px;
  min-height: 540px;
  margin: 0 auto;
  padding: 58px 20px;
}

.hero-slide {
  display: none;
  min-height: 424px;
  grid-template-columns: minmax(0, 1fr) 410px;
  gap: 44px;
  align-items: center;
}

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

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

.hero-kicker,
.section-kicker,
.page-kicker {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fde68a;
}

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

.hero p {
  margin: 0 0 28px;
  max-width: 640px;
  font-size: clamp(17px, 2vw, 23px);
  color: rgba(255, 255, 255, 0.92);
}

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

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags a,
.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
  color: #0f766e;
  background: #ccfbf1;
}

.hero-tags a {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.hero-visual {
  position: relative;
}

.hero-poster {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 30px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.78), rgba(8, 145, 178, 0.72));
  box-shadow: 0 35px 80px rgba(15, 23, 42, 0.34);
  transform: rotate(2deg);
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.72));
}

.hero-poster-title {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 20px;
  z-index: 2;
  font-size: 23px;
  font-weight: 900;
}

.hero-controls {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 28px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.hero-arrows,
.hero-dots {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 22px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  padding: 0;
}

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

.hero-arrow:hover,
.hero-dot:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.30);
}

.content-section,
.page-section,
.detail-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 20px;
}

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

.section-head h2,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: #1f2937;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 900;
}

.section-kicker,
.page-kicker {
  color: var(--teal);
}

.section-more {
  color: var(--teal);
  font-weight: 900;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

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

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

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
  background: var(--orange);
  box-shadow: 0 8px 18px rgba(249, 115, 22, 0.32);
}

.play-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: var(--white);
  background: rgba(0, 0, 0, 0.56);
  border-radius: 50%;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.86);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 0 0 10px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h3 a:hover,
.wide-content h3 a:hover {
  color: var(--teal);
}

.card-body p,
.wide-content p,
.page-hero p,
.detail-copy p {
  color: var(--muted);
}

.card-body p {
  min-height: 48px;
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.feature-band {
  background: linear-gradient(90deg, #ecfdf5, #f0fdfa);
}

.category-band {
  color: var(--white);
  background: linear-gradient(135deg, #3b82f6, #06b6d4 48%, #14b8a6);
}

.category-band .section-kicker,
.category-band h2 {
  color: var(--white);
}

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

.category-tile {
  min-height: 130px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 24px;
  color: var(--white);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.96), rgba(249, 115, 22, 0.92));
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:nth-child(4n + 2) {
  background: linear-gradient(135deg, #34d399, #0d9488);
}

.category-tile:nth-child(4n + 3) {
  background: linear-gradient(135deg, #60a5fa, #0891b2);
}

.category-tile:nth-child(4n + 4) {
  background: linear-gradient(135deg, #fb7185, #e11d48);
}

.category-tile:hover {
  transform: translateY(-7px) rotate(-1deg);
  box-shadow: 0 30px 62px rgba(15, 23, 42, 0.28);
}

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

.category-tile small {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.86);
}

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

.wide-card {
  display: grid;
  grid-template-columns: auto 180px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.wide-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.rank-number {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--white);
  font-weight: 900;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--orange), var(--rose));
}

.wide-poster {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  background: linear-gradient(135deg, #ccfbf1, #cffafe);
}

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

.wide-content h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.wide-content p {
  margin: 0 0 12px;
}

.page-hero {
  padding: 70px 20px;
  color: var(--white);
  background: linear-gradient(120deg, #0d9488, #0891b2 48%, #10b981);
}

.page-hero-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.page-hero h1,
.page-hero p,
.page-hero .page-kicker {
  color: var(--white);
}

.page-hero p {
  max-width: 820px;
  font-size: 19px;
}

.split-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

.side-panel {
  position: sticky;
  top: 90px;
  padding: 22px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.side-panel h2 {
  margin: 0 0 16px;
}

.side-panel a {
  display: block;
  padding: 10px 0;
  color: var(--muted);
  font-weight: 800;
  border-bottom: 1px solid var(--line);
}

.side-panel a:hover {
  color: var(--teal);
}

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

.page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  color: var(--dark);
}

.page-button.active {
  color: var(--white);
  background: linear-gradient(90deg, var(--teal), var(--cyan));
  box-shadow: 0 15px 30px rgba(8, 145, 178, 0.25);
}

.search-panel {
  max-width: 1180px;
  margin: -34px auto 0;
  padding: 0 20px 58px;
  position: relative;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px 140px auto;
  gap: 12px;
  padding: 22px;
  margin-bottom: 32px;
  border-radius: 26px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.search-status {
  margin: 0 0 20px;
  color: var(--muted);
  font-weight: 800;
}

.detail-hero {
  color: var(--white);
  background: linear-gradient(115deg, #111827, #0f766e 54%, #0891b2);
}

.detail-hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 20px 52px;
}

.detail-title {
  max-width: 840px;
}

.detail-title h1,
.detail-title p {
  color: var(--white);
}

.detail-title p {
  font-size: 19px;
  color: rgba(255, 255, 255, 0.86);
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 26px 70px rgba(2, 6, 23, 0.34);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.70));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-overlay span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
  font-size: 34px;
  border-radius: 50%;
  background: rgba(251, 191, 36, 0.96);
  box-shadow: 0 18px 42px rgba(251, 191, 36, 0.38);
}

.play-overlay strong {
  display: block;
  font-size: 18px;
}

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

.player-message {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 4;
  color: #fecaca;
  font-weight: 800;
}

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

.detail-card {
  padding: 26px;
  border-radius: 26px;
  background: var(--white);
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
}

.detail-card h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.detail-copy p {
  margin: 0 0 18px;
}

.poster-panel img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 22px;
  background: linear-gradient(135deg, #ccfbf1, #cffafe);
}

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

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

.info-list span:first-child {
  color: var(--muted);
}

.site-footer {
  color: #d1d5db;
  background: linear-gradient(180deg, #1f2937, #111827);
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 20px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
}

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

.site-footer p {
  margin: 0;
  color: #9ca3af;
}

.site-footer a {
  display: block;
  margin: 8px 0;
  color: #d1d5db;
}

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

.footer-bottom {
  padding: 18px 20px;
  text-align: center;
  color: #9ca3af;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

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

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

  .header-inner {
    gap: 12px;
  }

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

  .hero-visual {
    max-width: 360px;
  }

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

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

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

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

  .hero-slider {
    min-height: auto;
    padding: 42px 18px 82px;
  }

  .hero-slide {
    min-height: auto;
    gap: 26px;
  }

  .hero-controls {
    bottom: 22px;
  }

  .movie-grid,
  .category-grid,
  .footer-inner,
  .search-box {
    grid-template-columns: 1fr;
  }

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

  .wide-poster {
    grid-column: 1 / -1;
  }

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

  .content-section,
  .page-section,
  .detail-section {
    padding: 42px 18px;
  }

  .side-panel {
    position: static;
  }
}
