* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: #111827;
  background: #f8fafc;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #e5e7eb;
  backdrop-filter: blur(14px);
}

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

.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #0f172a;
}

.logo-mark {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: #475569;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #0891b2;
  background: #ecfeff;
}

.mobile-toggle {
  display: none;
  border: 0;
  background: #eff6ff;
  color: #2563eb;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
}

.hero-carousel {
  position: relative;
  height: 520px;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

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

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

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

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.84), rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2));
  top: 50%;
  width: min(680px, calc(100% - 48px));
  transform: translateY(-50%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: #2563eb;
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
  margin: 18px 0 14px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-line {
  margin: 0 0 18px;
  max-width: 640px;
  color: #e5e7eb;
  font-size: 19px;
  line-height: 1.7;
}

.hero-meta {
  color: #cbd5e1;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-tags,
.detail-tags,
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags span,
.card-tags span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.hero-tags span {
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.34);
  border: 1px solid rgba(191, 219, 254, 0.28);
}

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

.primary-btn,
.ghost-btn,
.quick-search button,
.search-panel button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.quick-search button,
.search-panel button {
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #0891b2);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.24);
}

.primary-btn:hover,
.quick-search button:hover,
.search-panel button:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 36px rgba(37, 99, 235, 0.32);
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.32);
}

.ghost-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 8;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.45);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

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

.hero-dot.active {
  width: 36px;
  background: #ffffff;
}

.search-strip {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.search-strip-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
  padding: 34px 0;
}

.search-strip h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.search-strip p {
  margin: 0;
  color: #64748b;
  line-height: 1.8;
}

.quick-search,
.search-panel {
  display: flex;
  gap: 10px;
}

.quick-search input,
.search-panel input,
.search-panel select {
  min-width: 0;
  height: 48px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 0 14px;
  background: #ffffff;
  color: #111827;
  outline: none;
}

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

.quick-search input {
  flex: 1;
}

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

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

.section-heading h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.03em;
}

.section-heading p {
  margin: 0;
  color: #64748b;
  line-height: 1.8;
}

.section-more {
  flex-shrink: 0;
  color: #0891b2;
  font-weight: 800;
}

.movie-grid,
.category-grid {
  display: grid;
  gap: 20px;
}

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

.compact-grid,
.preview-grid,
.category-page-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

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

.movie-card,
.category-tile,
.detail-article,
.player-card,
.search-panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.07);
}

.movie-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #e5e7eb;
}

.poster-link img,
.category-tile img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.movie-card:hover .poster-link img,
.category-tile:hover img {
  transform: scale(1.07);
}

.card-label {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 8px;
  color: #ffffff;
  background: #2563eb;
  font-size: 12px;
  font-weight: 800;
}

.play-float {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #2563eb;
  background: rgba(255, 255, 255, 0.92);
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.card-body {
  padding: 16px;
}

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

.card-body h3 a:hover {
  color: #0891b2;
}

.card-meta,
.card-desc {
  margin: 0;
  color: #64748b;
  line-height: 1.65;
  font-size: 14px;
}

.card-desc {
  min-height: 46px;
  margin-top: 8px;
}

.card-tags {
  margin-top: 12px;
}

.card-tags span {
  color: #0891b2;
  background: #ecfeff;
}

.category-tile {
  position: relative;
  min-height: 190px;
  color: #ffffff;
  isolation: isolate;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.84));
}

.category-tile span,
.category-tile strong {
  position: absolute;
  z-index: 2;
  left: 18px;
  right: 18px;
}

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

.category-tile strong {
  bottom: 18px;
  font-size: 13px;
  line-height: 1.5;
  color: #dbeafe;
}

.ranking-panel {
  padding-bottom: 70px;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.full-rank-list {
  grid-template-columns: 1fr;
}

.rank-row {
  display: grid;
  grid-template-columns: 52px 56px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.1);
}

.rank-no {
  color: #2563eb;
  font-weight: 900;
  font-size: 20px;
}

.rank-row img {
  width: 56px;
  height: 76px;
  object-fit: cover;
  border-radius: 10px;
}

.rank-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 800;
}

.rank-meta {
  color: #64748b;
  font-size: 14px;
}

.page-main {
  min-height: 60vh;
}

.page-hero,
.detail-hero {
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 0%, rgba(37, 99, 235, 0.36), transparent 36%),
    linear-gradient(135deg, #0f172a, #1e293b 52%, #0e7490);
}

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

.small-hero {
  padding: 58px 0;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.detail-hero {
  padding: 42px 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  aspect-ratio: 2 / 3;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 28px 50px rgba(0, 0, 0, 0.34);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #cbd5e1;
  font-size: 14px;
}

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

.detail-info h1 {
  margin-top: 16px;
}

.detail-one-line {
  max-width: 760px;
  color: #e2e8f0;
  font-size: 19px;
  line-height: 1.8;
}

.detail-meta,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 16px;
}

.detail-meta span {
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.detail-tags span {
  color: #ecfeff;
  background: rgba(6, 182, 212, 0.24);
}

.player-section {
  padding-top: 44px;
}

.player-card {
  position: relative;
  background: #000000;
  border: 0;
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.62));
  cursor: pointer;
}

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

.big-play {
  display: inline-flex;
  width: 78px;
  height: 78px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #2563eb;
  background: rgba(255, 255, 255, 0.94);
  font-size: 34px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

.detail-article {
  padding: 30px;
}

.detail-article h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.detail-article h2:not(:first-child) {
  margin-top: 28px;
}

.detail-article p {
  margin: 0;
  color: #334155;
  line-height: 2;
  font-size: 17px;
}

.search-page {
  padding-bottom: 70px;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 160px 140px 110px 110px;
  gap: 12px;
  padding: 16px;
  margin-bottom: 24px;
}

.site-footer {
  color: #cbd5e1;
  background: #111827;
}

.footer-shell {
  padding: 44px 0 30px;
}

.footer-brand p {
  max-width: 720px;
  margin: 12px 0 22px;
  color: #cbd5e1;
  line-height: 1.8;
}

.footer-logo {
  color: #ffffff;
  font-size: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 12px 0;
}

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

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

.footer-bottom {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid #1f2937;
  color: #94a3b8;
  font-size: 14px;
}

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

@media (max-width: 820px) {
  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.16);
  }

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

  .hero-carousel {
    height: 560px;
  }

  .hero-arrow {
    display: none;
  }

  .search-strip-inner,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .quick-search {
    flex-direction: column;
  }

  .movie-grid,
  .compact-grid,
  .preview-grid,
  .category-page-grid,
  .category-grid,
  .rank-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-poster {
    width: min(280px, 80vw);
  }

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

  .rank-row {
    grid-template-columns: 42px 48px minmax(0, 1fr);
  }

  .rank-meta {
    grid-column: 3;
  }
}

@media (max-width: 560px) {
  .nav-shell,
  .content-shell,
  .footer-shell {
    width: min(100% - 22px, 1180px);
  }

  .site-logo span:last-child {
    max-width: 220px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .hero-content {
    left: 16px;
    width: calc(100% - 32px);
  }

  .hero-line,
  .detail-one-line {
    font-size: 16px;
  }

  .movie-grid,
  .compact-grid,
  .preview-grid,
  .category-page-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-list {
    grid-template-columns: 1fr;
  }

  .player-card {
    border-radius: 14px;
  }
}
