* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1f2937;
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 48%, #f9fafb 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(240, 249, 255, 0.94), rgba(239, 246, 255, 0.94));
  border-bottom: 1px solid #bae6fd;
  box-shadow: 0 8px 26px rgba(14, 165, 233, 0.08);
  backdrop-filter: blur(14px);
}

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

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  box-shadow: 0 12px 24px rgba(2, 132, 199, 0.25);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 20px;
  color: #1f2937;
}

.brand-text small {
  font-size: 12px;
  color: #6b7280;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 600;
  color: #374151;
}

.nav-links a,
.mobile-menu a {
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active,
.mobile-menu a:hover {
  color: #0284c7;
}

.mobile-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
  color: #374151;
  background: rgba(224, 242, 254, 0.8);
  cursor: pointer;
}

.mobile-menu {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 10px 0 16px;
  border-top: 1px solid #bae6fd;
}

.mobile-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
}

.main-shell {
  min-height: 70vh;
  padding: 32px 0 56px;
}

.hero-card {
  position: relative;
  height: 500px;
  overflow: hidden;
  margin-bottom: 48px;
  border-radius: 28px;
  box-shadow: 0 26px 60px rgba(15, 23, 42, 0.28);
  background: #0f172a;
}

.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.42) 48%, rgba(2, 6, 23, 0.08));
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 46px;
  color: #ffffff;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  margin-bottom: 16px;
  border-radius: 999px;
  background: #0ea5e9;
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1 {
  max-width: 820px;
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.1;
}

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

.hero-tags,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hero-tags {
  margin-bottom: 22px;
}

.hero-tags a,
.tag-list a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 13px;
  font-weight: 700;
}

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

.primary-btn {
  color: #ffffff;
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  box-shadow: 0 14px 26px rgba(14, 165, 233, 0.28);
}

.hero-card .primary-btn {
  color: #0284c7;
  background: #ffffff;
}

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(14, 165, 233, 0.26);
}

.panel,
.detail-panel,
.side-card {
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.quick-search {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  margin-bottom: 44px;
}

.quick-search h2,
.page-hero h1 {
  margin: 0 0 8px;
  color: #1f2937;
}

.quick-search p,
.page-hero p {
  margin: 0;
  color: #6b7280;
  line-height: 1.8;
}

.search-line input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #bae6fd;
  border-radius: 14px;
  padding: 0 14px;
  color: #1f2937;
  background: #f8fafc;
  outline: none;
}

.search-line input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.14);
}

.search-line {
  width: min(420px, 100%);
}

.content-section {
  margin-bottom: 58px;
}

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

.section-head h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: #1f2937;
  font-size: clamp(24px, 3vw, 34px);
}

.section-head h2 span {
  width: 5px;
  height: 34px;
  border-radius: 999px;
  background: #0284c7;
}

.section-more {
  color: #0284c7;
  font-weight: 800;
}

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

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

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

.six-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

.movie-card-small .poster-link {
  aspect-ratio: 16 / 9;
}

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

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

.poster-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.12));
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-mask {
  opacity: 1;
}

.play-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  color: #0284c7;
  background: rgba(255, 255, 255, 0.92);
  font-weight: 900;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 10px;
  color: #1f2937;
  font-size: 17px;
  line-height: 1.4;
}

.card-body h3 a:hover {
  color: #0284c7;
}

.card-body p {
  min-height: 44px;
  margin: 0 0 14px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-line,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  color: #6b7280;
  font-size: 13px;
}

.meta-line span,
.detail-meta span {
  padding: 5px 10px;
  border-radius: 999px;
  background: #f3f4f6;
}

.hot-panel {
  padding: 30px;
  border-radius: 24px;
  background: linear-gradient(90deg, #e0f2fe, #dbeafe);
  box-shadow: 0 20px 48px rgba(14, 165, 233, 0.16);
}

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

.category-grid.wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 54px;
}

.category-card {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  border-radius: 20px;
  background: #0f172a;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 150px;
  object-fit: cover;
  opacity: 0.62;
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.category-card:hover img {
  opacity: 0.74;
  transform: scale(1.06);
}

.category-card span {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent);
}

.category-card strong {
  font-size: 20px;
}

.category-card em {
  color: #d1d5db;
  font-size: 13px;
  font-style: normal;
  line-height: 1.6;
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  gap: 28px;
}

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

.rank-list a {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.rank-list span,
.rank-num {
  color: #0284c7;
  font-size: 22px;
  font-weight: 900;
}

.rank-list strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-list em {
  color: #6b7280;
  font-style: normal;
  font-size: 13px;
}

.mini-grid,
.side-list {
  display: grid;
  gap: 14px;
}

.mini-card {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.mini-card img {
  width: 118px;
  height: 76px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.mini-card span {
  min-width: 0;
  padding: 10px 10px 10px 0;
}

.mini-card strong {
  display: block;
  overflow: hidden;
  margin-bottom: 8px;
  color: #1f2937;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mini-card em {
  color: #6b7280;
  font-size: 12px;
  font-style: normal;
}

.page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px;
  margin-bottom: 32px;
  background: linear-gradient(90deg, #ffffff, #eff6ff);
}

.page-hero h1 {
  font-size: clamp(30px, 4vw, 48px);
}

.crumb {
  margin: 0 0 12px;
  color: #6b7280;
  font-size: 14px;
}

.crumb a {
  color: #0284c7;
  font-weight: 700;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(140px, 190px) minmax(150px, 210px);
  gap: 16px;
  padding: 18px;
  margin-bottom: 28px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.filter-bar label {
  display: grid;
  gap: 8px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.rank-cards {
  display: grid;
  gap: 18px;
}

.rank-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
}

.rank-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 16px;
  transition: transform 0.35s ease;
}

.rank-card h2 {
  margin: 8px 0 10px;
  font-size: 22px;
}

.rank-card h2 a:hover {
  color: #0284c7;
}

.rank-card p {
  margin: 0 0 14px;
  color: #4b5563;
  line-height: 1.8;
}

.detail-container {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 0.8fr);
  gap: 30px;
}

.player-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  background: #020617;
  box-shadow: 0 28px 58px rgba(15, 23, 42, 0.32);
}

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020617;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.2));
  cursor: pointer;
}

.play-overlay span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 78px;
  border-radius: 999px;
  color: #0284c7;
  background: rgba(255, 255, 255, 0.95);
  font-size: 28px;
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.22);
}

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

.player-box.playing .play-overlay {
  display: none;
}

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.82);
}

.detail-panel {
  padding: 28px;
  margin-top: 28px;
}

.detail-panel h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 42px);
}

.detail-panel h2,
.side-card h2 {
  margin: 28px 0 12px;
  color: #1f2937;
  font-size: 22px;
}

.detail-panel p {
  color: #374151;
  line-height: 1.95;
}

.lead-text {
  padding: 18px;
  border-radius: 16px;
  color: #075985;
  background: linear-gradient(90deg, #e0f2fe, #dbeafe);
  font-weight: 700;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.side-card {
  padding: 18px;
  margin-bottom: 22px;
}

.cover-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 16px;
}

.primary-btn.full {
  width: 100%;
}

.site-footer {
  padding: 32px 0;
  color: #6b7280;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-inner p {
  margin: 6px 0 0;
}

.footer-inner a {
  color: #0284c7;
  font-weight: 800;
}

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

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

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

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

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

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

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

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

@media (max-width: 720px) {
  .nav-wrap,
  .container,
  .mobile-menu {
    width: min(100% - 22px, 1180px);
  }

  .brand-text small {
    display: none;
  }

  .main-shell {
    padding-top: 18px;
  }

  .hero-card {
    height: 460px;
    border-radius: 20px;
  }

  .hero-content {
    padding: 28px;
  }

  .quick-search,
  .page-hero,
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-bar,
  .rank-card {
    grid-template-columns: 1fr;
  }

  .movie-grid,
  .three-grid,
  .four-grid,
  .six-grid,
  .category-grid,
  .category-grid.wide {
    grid-template-columns: 1fr;
  }

  .rank-list a {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .rank-list em {
    grid-column: 2;
  }

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

  .mini-card img {
    width: 104px;
  }
}
