:root {
  --color-text: #111827;
  --color-muted: #6b7280;
  --color-soft: #f8fafc;
  --color-line: #e5e7eb;
  --color-blue: #2563eb;
  --color-blue-dark: #1d4ed8;
  --color-cyan: #06b6d4;
  --color-green: #16a34a;
  --shadow-card: 0 10px 25px rgba(15, 23, 42, 0.08);
  --shadow-card-hover: 0 24px 60px rgba(15, 23, 42, 0.16);
  --radius-lg: 18px;
  --radius-xl: 24px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--color-line);
  box-shadow: 0 2px 14px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(12px);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-blue), var(--color-cyan));
  border-radius: 12px;
  box-shadow: 0 12px 25px rgba(37, 99, 235, 0.22);
  transition: transform 0.24s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.06);
}

.brand-text {
  font-size: 20px;
  background: linear-gradient(90deg, var(--color-blue), var(--color-cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #374151;
  font-size: 15px;
  font-weight: 650;
}

.desktop-nav a {
  transition: color 0.2s ease;
}

.desktop-nav a:hover {
  color: var(--color-blue);
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: #111827;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px 16px;
  border-top: 1px solid var(--color-line);
}

.mobile-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #374151;
  font-weight: 650;
}

.mobile-nav a:hover {
  color: var(--color-blue);
  background: #eff6ff;
}

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

.page-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px 20px 64px;
}

.hero-carousel {
  position: relative;
  height: 500px;
  margin-bottom: 48px;
  overflow: hidden;
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28);
  background: #111827;
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.65s ease, visibility 0.65s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.44), rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 0;
  width: min(680px, 88%);
  padding: 0 68px;
  color: #ffffff;
  transform: translateY(-50%);
}

.hero-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 13px;
  margin-bottom: 16px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--color-blue);
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-content p {
  margin: 0 0 20px;
  color: #e5e7eb;
  font-size: 18px;
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  color: #2563eb;
  background: #eff6ff;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

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

.primary-button {
  color: #ffffff;
  background: var(--color-blue);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.primary-button:hover {
  background: var(--color-blue-dark);
  transform: translateY(-1px);
}

.ghost-button {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.ghost-button.dark {
  color: #2563eb;
  background: #eff6ff;
}

.outline-button {
  color: var(--color-blue);
  border: 1px solid #bfdbfe;
  background: #ffffff;
}

.outline-button:hover {
  color: #ffffff;
  background: var(--color-blue);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.28);
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.46);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

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

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

.home-search-strip,
.page-hero,
.filter-panel,
.text-panel,
.category-showcase {
  border: 1px solid var(--color-line);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.home-search-strip {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 460px);
  gap: 22px;
  align-items: center;
  margin-bottom: 54px;
  padding: 24px;
  border-radius: var(--radius-xl);
}

.home-search-strip h2,
.category-showcase-head h2,
.page-hero h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.18;
}

.home-search-strip p,
.category-showcase-head p,
.page-hero p {
  margin: 8px 0 0;
  color: var(--color-muted);
}

.hero-search-form,
.search-box,
.select-box {
  display: flex;
  align-items: center;
}

.hero-search-form {
  overflow: hidden;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #ffffff;
}

.hero-search-form input {
  flex: 1;
  min-width: 0;
  height: 48px;
  border: 0;
  padding: 0 16px;
  outline: none;
  font-size: 15px;
}

.hero-search-form button {
  height: 48px;
  border: 0;
  padding: 0 18px;
  color: #ffffff;
  background: var(--color-blue);
  font-weight: 750;
  cursor: pointer;
}

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

.section-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-size: 30px;
}

.section-heading span {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-blue), transparent);
}

.section-heading.cyan span {
  background: linear-gradient(90deg, var(--color-cyan), transparent);
}

.section-heading.green span {
  background: linear-gradient(90deg, var(--color-green), transparent);
}

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

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-link {
  display: block;
}

.poster-frame {
  position: relative;
  height: 250px;
  overflow: hidden;
  background: #e5e7eb;
}

.movie-card.large .poster-frame {
  height: 330px;
}

.movie-card.compact .poster-frame {
  height: 210px;
}

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

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

.poster-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 18px;
  color: #ffffff;
  text-align: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.84));
  opacity: 0;
  transition: opacity 0.28s ease;
}

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

.play-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 999px;
  color: var(--color-blue);
  background: rgba(255, 255, 255, 0.92);
  font-size: 24px;
}

.rank-badge,
.score-badge {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 9px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  top: 12px;
  left: 12px;
}

.score-badge {
  top: 12px;
  right: 12px;
}

.card-body {
  padding: 16px;
}

.card-title {
  display: block;
  overflow: hidden;
  margin-bottom: 8px;
  color: #111827;
  font-size: 16px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.movie-card:hover .card-title,
.rank-title:hover {
  color: var(--color-blue);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--color-muted);
  font-size: 13px;
}

.card-summary {
  display: -webkit-box;
  min-height: 42px;
  margin: 0 0 12px;
  overflow: hidden;
  color: #4b5563;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.category-showcase {
  padding: 30px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.category-showcase-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.category-showcase-block {
  margin-top: 34px;
}

.category-title-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.category-title-line h3 {
  margin: 0;
  font-size: 22px;
}

.category-title-line a {
  color: var(--color-blue);
  font-weight: 750;
}

.page-hero {
  margin-bottom: 28px;
  padding: 36px;
  border-radius: var(--radius-xl);
}

.light-hero {
  background: linear-gradient(135deg, #ffffff, #eff6ff 55%, #ecfeff);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: var(--color-muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--color-blue);
}

.inline-actions {
  margin-top: 20px;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
  margin-bottom: 24px;
  padding: 18px;
  border-radius: 18px;
}

.search-box,
.select-box {
  gap: 10px;
  color: #374151;
  font-weight: 750;
}

.search-box input,
.select-box select {
  width: 100%;
  height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 0 12px;
  background: #ffffff;
  color: #111827;
  font: inherit;
  outline: none;
}

.search-box input:focus,
.select-box select:focus {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.empty-message {
  padding: 22px;
  margin: 0 0 24px;
  border-radius: 14px;
  color: #1d4ed8;
  background: #eff6ff;
  font-weight: 700;
}

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

.category-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.category-card-link {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  padding: 18px;
}

.category-mosaic {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  overflow: hidden;
  border-radius: 14px;
}

.category-mosaic img {
  width: 100%;
  height: 84px;
  object-fit: cover;
}

.category-card-body h2 {
  margin: 0 0 10px;
}

.category-card-body p {
  margin: 0;
  color: var(--color-muted);
}

.category-sample-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 18px;
}

.category-sample-links a {
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--color-blue);
  background: #eff6ff;
  font-size: 12px;
  font-weight: 700;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 92px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--color-blue), var(--color-cyan));
  font-weight: 900;
}

.rank-cover {
  display: block;
  overflow: hidden;
  border-radius: 12px;
}

.rank-cover img {
  width: 92px;
  height: 122px;
  object-fit: cover;
}

.rank-title {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
  font-weight: 850;
}

.rank-content p {
  margin: 0 0 10px;
  color: #4b5563;
}

.detail-shell {
  padding-top: 26px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 32px;
}

.player-panel,
.detail-info,
.text-panel {
  border-radius: var(--radius-xl);
  background: #ffffff;
  box-shadow: var(--shadow-card);
}

.player-panel {
  position: relative;
  overflow: hidden;
  padding: 18px;
}

.movie-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  background: #020617;
  object-fit: cover;
}

.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  height: 46px;
  margin-top: 16px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: var(--color-blue);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.26);
}

.play-button:hover {
  background: var(--color-blue-dark);
}

.player-status {
  margin: 12px 0 0;
  color: var(--color-muted);
  font-size: 14px;
}

.detail-info {
  padding: 28px;
}

.detail-info h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.18;
}

.detail-one-line {
  margin: 0 0 18px;
  color: #374151;
  font-size: 17px;
}

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

.detail-meta span {
  padding: 5px 10px;
  border-radius: 10px;
  color: #374151;
  background: #f3f4f6;
  font-size: 13px;
  font-weight: 750;
}

.large-tags span {
  font-size: 13px;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 56px;
}

.text-panel {
  padding: 28px;
}

.text-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.text-panel p {
  margin: 0;
  color: #374151;
  font-size: 16px;
}

.site-footer {
  border-top: 1px solid var(--color-line);
  background: linear-gradient(180deg, #f8fafc, #eef2ff);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) 1.15fr;
  gap: 30px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 42px 20px;
}

.footer-brand p {
  max-width: 560px;
  color: var(--color-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: flex-start;
}

.footer-links a {
  padding: 7px 11px;
  border-radius: 999px;
  color: #374151;
  background: #ffffff;
  font-weight: 650;
  box-shadow: 0 5px 15px rgba(15, 23, 42, 0.05);
}

.footer-links a:hover {
  color: var(--color-blue);
}

[hidden],
.movie-card.hidden-by-filter,
.rank-item.hidden-by-filter {
  display: none !important;
}

@media (max-width: 1080px) {
  .desktop-nav {
    gap: 12px;
    font-size: 14px;
  }

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

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

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

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

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

  .page-shell {
    padding: 18px 14px 44px;
  }

  .hero-carousel {
    height: 450px;
    border-radius: 18px;
  }

  .hero-content {
    width: 92%;
    padding: 0 28px;
  }

  .hero-arrow {
    display: none;
  }

  .home-search-strip,
  .filter-panel,
  .category-card-link,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .category-grid,
  .feature-grid,
  .movie-grid,
  .latest-grid,
  .compact-grid,
  .category-movie-grid,
  .search-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rank-item {
    grid-template-columns: 42px 82px 1fr;
  }

  .rank-item .outline-button {
    grid-column: 2 / 4;
  }
}

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

  .hero-carousel {
    height: 410px;
  }

  .hero-content h1 {
    font-size: 30px;
  }

  .hero-content p {
    font-size: 15px;
  }

  .hero-actions,
  .detail-actions {
    gap: 8px;
  }

  .primary-button,
  .ghost-button,
  .outline-button {
    min-height: 40px;
    padding: 0 14px;
    font-size: 14px;
  }

  .page-hero,
  .category-showcase,
  .detail-info,
  .text-panel {
    padding: 22px;
  }

  .movie-grid,
  .latest-grid,
  .compact-grid,
  .category-movie-grid,
  .search-grid {
    gap: 14px;
  }

  .poster-frame,
  .movie-card.compact .poster-frame {
    height: 210px;
  }

  .card-body {
    padding: 13px;
  }

  .card-summary,
  .tag-row {
    display: none;
  }

  .rank-item {
    gap: 12px;
    padding: 12px;
  }

  .rank-cover img {
    width: 82px;
    height: 108px;
  }
}
