:root {
  --blue: #2563eb;
  --cyan: #06b6d4;
  --teal: #14b8a6;
  --yellow: #facc15;
  --slate: #0f172a;
  --text: #1f2937;
  --muted: #6b7280;
  --surface: #ffffff;
  --soft: #f8fafc;
  --ring: rgba(6, 182, 212, 0.28);
  --shadow: 0 22px 55px rgba(15, 23, 42, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #eff6ff 0%, #ecfeff 46%, #f0fdfa 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

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

.logo {
  flex: 0 0 auto;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

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

.nav-link {
  font-weight: 650;
  opacity: 0.95;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fef08a;
  opacity: 1;
}

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

.top-search input,
.mobile-search input {
  width: 190px;
  border: 0;
  outline: 0;
  padding: 10px 14px;
  border-radius: 12px 0 0 12px;
}

.top-search button,
.mobile-search button,
.search-panel button {
  border: 0;
  cursor: pointer;
  padding: 10px 15px;
  color: #1e3a8a;
  font-weight: 800;
  background: var(--yellow);
  border-radius: 0 12px 12px 0;
  transition: transform 0.2s ease, background 0.2s ease;
}

.top-search button:hover,
.mobile-search button:hover,
.search-panel button:hover {
  background: #fde047;
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  font-size: 28px;
  background: transparent;
}

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

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

.mobile-search {
  margin-bottom: 12px;
}

.mobile-search input {
  flex: 1;
  width: auto;
}

.mobile-link {
  display: block;
  padding: 10px 0;
  font-weight: 700;
}

.mobile-link.active,
.mobile-link:hover {
  color: #fef08a;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  color: #ffffff;
  background: #020617;
}

.hero-track,
.hero-slide {
  min-height: 640px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.8s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) brightness(0.72);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(6, 182, 212, 0.55), transparent 34%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.66) 45%, rgba(2, 6, 23, 0.84));
}

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

.hero-kicker {
  display: inline-flex;
  padding: 8px 16px;
  margin-bottom: 18px;
  color: #e0f2fe;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.hero h1 {
  margin: 0 0 18px;
  max-width: 780px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  background: #e0f2fe;
  border-radius: 999px;
}

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

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 22px;
  border-radius: 14px;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  box-shadow: 0 14px 28px rgba(6, 182, 212, 0.24);
}

.primary-button:hover,
.ghost-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.24);
}

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

.hero-poster {
  display: block;
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, 0.15);
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  transform: rotate(2deg);
}

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

.hero-control {
  position: absolute;
  right: 0;
  bottom: 46px;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  font-size: 32px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.48);
  border-radius: 999px;
}

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

.hero-thumbs {
  position: absolute;
  right: 0;
  bottom: 112px;
  left: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.hero-thumbs a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  backdrop-filter: blur(14px);
}

.hero-thumbs img {
  width: 42px;
  height: 54px;
  object-fit: cover;
  border-radius: 10px;
}

.hero-thumbs span {
  overflow: hidden;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.page-section {
  padding: 72px 0;
}

.wide-section {
  padding: 72px 0;
}

.warm-bg {
  background: linear-gradient(90deg, #ffedd5, #fee2e2);
}

.green-bg {
  background: linear-gradient(90deg, #dcfce7, #d1fae5);
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.03em;
}

.section-heading p {
  max-width: 740px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

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

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

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

.movie-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

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

.featured-card .poster-link img {
  aspect-ratio: 16 / 11;
}

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

.play-mark {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: grid;
  width: 44px;
  height: 44px;
  color: #ffffff;
  place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(6, 182, 212, 0.32);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: grid;
  width: 38px;
  height: 38px;
  color: #ffffff;
  font-weight: 900;
  place-items: center;
  background: linear-gradient(135deg, #ef4444, #f97316);
  border-radius: 12px;
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: #0891b2;
  font-size: 13px;
  font-weight: 800;
}

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

.card-body h3 a:hover {
  color: var(--blue);
}

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

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

.category-card {
  display: block;
  min-height: 184px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(6, 182, 212, 0.14);
  border-radius: 22px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
  color: #0e7490;
}

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

.mini-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-list span {
  padding: 6px 10px;
  color: #075985;
  font-size: 12px;
  font-weight: 800;
  background: #e0f2fe;
  border-radius: 999px;
}

.center-actions {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.page-hero {
  padding: 82px 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 18% 16%, rgba(250, 204, 21, 0.22), transparent 30%),
    linear-gradient(90deg, #1d4ed8, #06b6d4, #0f766e);
}

.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 6vw, 62px);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: #dbeafe;
  font-size: 20px;
  line-height: 1.75;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: #e0f2fe;
  font-weight: 700;
}

.breadcrumb a:hover {
  color: #fef08a;
}

.inline-filter {
  max-width: 520px;
  margin-top: 26px;
}

.inline-filter input,
.search-panel input,
.search-panel select {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 14px 16px;
  border-radius: 16px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.18);
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 120px;
  gap: 12px;
  max-width: 780px;
  margin-top: 28px;
}

.search-panel button {
  border-radius: 16px;
}

.detail-topbar {
  color: #ffffff;
  background: linear-gradient(90deg, #0f172a, #1e293b);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
}

.detail-topbar .container {
  padding: 18px 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  padding: 36px 0 76px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000000;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.main-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.74));
  border: 0;
  text-align: center;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  color: #ffffff;
  font-size: 31px;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 999px;
  box-shadow: 0 18px 44px rgba(6, 182, 212, 0.36);
}

.player-overlay strong {
  max-width: 720px;
  font-size: clamp(22px, 4vw, 40px);
  line-height: 1.25;
}

.detail-card,
.side-card {
  margin-top: 24px;
  padding: 26px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

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

.detail-meta span {
  padding: 7px 12px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  border-radius: 999px;
}

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 5vw, 48px);
  letter-spacing: -0.03em;
}

.detail-card h2,
.side-card h2 {
  margin: 26px 0 12px;
  font-size: 24px;
}

.detail-card p,
.side-card p {
  color: #374151;
  font-size: 16px;
  line-height: 1.9;
}

.detail-line {
  color: #4b5563;
  font-size: 19px;
  font-style: italic;
}

.detail-side {
  align-self: start;
  position: sticky;
  top: 88px;
}

.side-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 20px;
}

.full {
  width: 100%;
}

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

.related-item {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: #f8fafc;
  border-radius: 16px;
  transition: background 0.2s ease, transform 0.2s ease;
}

.related-item:hover {
  background: #e0f2fe;
  transform: translateX(3px);
}

.related-item img {
  width: 68px;
  height: 88px;
  object-fit: cover;
  border-radius: 12px;
}

.related-item span {
  overflow: hidden;
  font-weight: 800;
  line-height: 1.45;
}

.site-footer {
  color: #ffffff;
  background: linear-gradient(90deg, #1e293b, #334155, #1e293b);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 28px;
  padding: 52px 0 34px;
}

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

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

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

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

.footer-bottom {
  padding: 20px 16px;
  color: #cbd5e1;
  text-align: center;
  border-top: 1px solid rgba(203, 213, 225, 0.18);
}

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

.empty-result {
  grid-column: 1 / -1;
  padding: 40px;
  color: #475569;
  text-align: center;
  background: #ffffff;
  border-radius: 24px;
}

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

  .menu-button {
    display: block;
  }

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

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

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

  .detail-side {
    position: static;
  }
}

@media (max-width: 760px) {
  .hero,
  .hero-track,
  .hero-slide {
    min-height: 760px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    min-height: 760px;
    padding: 52px 0 180px;
  }

  .hero-poster {
    width: min(260px, 74vw);
    margin: 0 auto;
  }

  .hero-thumbs {
    grid-template-columns: 1fr;
    bottom: 88px;
  }

  .hero-thumbs a:nth-child(n+3) {
    display: none;
  }

  .hero-control {
    bottom: 34px;
  }

  .featured-grid,
  .movie-grid,
  .rank-grid,
  .large-rank,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .page-section,
  .wide-section {
    padding: 52px 0;
  }

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

  .search-panel button {
    border-radius: 16px;
  }

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