* {
  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: #111827;
  background: linear-gradient(180deg, #f9fafb 0%, #ffffff 48%, #f3f4f6 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;
  border-bottom: 1px solid rgba(229, 231, 235, 0.95);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #059669, #065f46);
  box-shadow: 0 12px 24px rgba(5, 150, 105, 0.25);
  transition: transform 0.24s ease;
}

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

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

.brand-text strong {
  color: #111827;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

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

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

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

.nav-link:hover,
.nav-link.active {
  color: #059669;
}

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

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

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

.mobile-link {
  display: block;
  padding: 12px 14px;
  border-radius: 10px;
  color: #374151;
}

.mobile-link:hover,
.mobile-link.active {
  color: #047857;
  background: #ecfdf5;
}

.mobile-link.muted {
  color: #6b7280;
}

.hero-carousel {
  position: relative;
  height: 68vh;
  min-height: 520px;
  overflow: hidden;
  background: #000000;
}

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

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

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.52;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.48) 50%, rgba(0, 0, 0, 0.14));
}

.hero-content {
  position: absolute;
  inset: 0;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 1180px;
  color: #ffffff;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: #059669;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.section-kicker {
  margin-bottom: 10px;
}

.hero-content h1 {
  max-width: 760px;
  margin: 18px 0 16px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 24px;
  color: #d1d5db;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-tags,
.meta-pills,
.tag-row,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.hero-tags span,
.meta-pills span {
  padding: 7px 11px;
  border-radius: 9px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-size: 14px;
}

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

.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: 800;
  transition: transform 0.22s ease, background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.primary-button {
  color: #ffffff;
  background: #059669;
  box-shadow: 0 14px 30px rgba(5, 150, 105, 0.28);
}

.primary-button:hover {
  background: #047857;
  transform: translateY(-2px) scale(1.02);
}

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

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

.outline-button {
  color: #047857;
  border: 1px solid #a7f3d0;
  background: #ecfdf5;
}

.outline-button:hover {
  color: #ffffff;
  border-color: #059669;
  background: #059669;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
  transition: background 0.2s ease;
}

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

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

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

.home-search-panel,
.content-section,
.page-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.home-search-panel {
  margin-top: -46px;
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(280px, 1.1fr);
  gap: 20px;
  align-items: center;
  padding: 26px;
  border: 1px solid rgba(229, 231, 235, 0.86);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.13);
  backdrop-filter: blur(16px);
}

.home-search-panel h2,
.section-head h2,
.page-hero h1,
.detail-side-card h1,
.story-card h2,
.related-panel h2 {
  margin: 0;
  letter-spacing: -0.025em;
}

.home-search-panel h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.search-box {
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 15px;
  background: #ffffff;
}

.search-box input,
.filter-grid input,
.filter-grid select {
  width: 100%;
  border: 0;
  outline: 0;
  color: #111827;
  background: transparent;
}

.search-box input {
  min-height: 44px;
  padding: 0 12px;
}

.search-box button {
  border: 0;
  border-radius: 11px;
  padding: 0 20px;
  color: #ffffff;
  background: #059669;
  cursor: pointer;
  font-weight: 800;
}

.quick-links {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  font-size: 14px;
  font-weight: 700;
}

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

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

.section-head h2 {
  color: #111827;
  font-size: clamp(26px, 3vw, 38px);
}

.section-head a {
  color: #059669;
  font-size: 15px;
  font-weight: 800;
}

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

.category-card {
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.1);
}

.category-card > a {
  display: block;
  padding: 24px;
}

.category-icon {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: #ffffff;
  background: linear-gradient(135deg, #059669, #065f46);
}

.category-card h2 {
  margin: 16px 0 8px;
  font-size: 21px;
}

.category-card p {
  margin: 0;
  color: #6b7280;
  line-height: 1.7;
}

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

.mini-card {
  position: relative;
  min-height: 84px;
  overflow: hidden;
  border-radius: 12px;
  background: #111827;
}

.mini-card img {
  width: 100%;
  height: 84px;
  object-fit: cover;
  opacity: 0.72;
  transition: transform 0.25s ease;
}

.mini-card:hover img {
  transform: scale(1.08);
}

.mini-card span {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 7px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

.archive-grid {
  padding-bottom: 50px;
}

.movie-card {
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 28%, rgba(0, 0, 0, 0.74));
}

.type-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 8px;
  color: #ffffff;
  background: #059669;
  font-size: 12px;
  font-weight: 800;
}

.poster-meta {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

.card-body {
  padding: 14px;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  color: #111827;
  font-weight: 800;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  transition: color 0.2s ease;
}

.movie-card:hover .card-title,
.card-title:hover {
  color: #059669;
}

.card-body p,
.wide-info p,
.rank-info p {
  display: -webkit-box;
  overflow: hidden;
  margin: 8px 0 12px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-row span {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  font-size: 12px;
  font-weight: 700;
}

.ranking-strip {
  padding-top: 76px;
}

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

.movie-card-wide {
  display: grid;
  grid-template-columns: 160px 1fr;
  min-height: 112px;
}

.movie-card-wide:hover {
  transform: translateY(-3px);
}

.wide-cover {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  background: #111827;
}

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

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(5, 150, 105, 0.9);
  transform: translate(-50%, -50%);
}

.wide-info {
  padding: 14px 16px;
  min-width: 0;
}

.meta-row {
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}

.meta-row span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: #9ca3af;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 42px;
  background: radial-gradient(circle at 18% 18%, rgba(16, 185, 129, 0.28), transparent 32%), linear-gradient(135deg, #0f172a, #064e3b);
  color: #ffffff;
}

.slim-hero {
  padding: 74px max(16px, calc((100vw - 1180px) / 2)) 72px;
}

.page-hero h1 {
  font-size: clamp(36px, 5vw, 58px);
}

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

.filter-panel {
  margin-bottom: 26px;
  padding: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.filter-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(160px, 0.35fr) minmax(160px, 0.35fr);
  gap: 16px;
}

.filter-grid label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #4b5563;
  font-size: 13px;
  font-weight: 800;
}

.filter-grid input,
.filter-grid select {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #ffffff;
}

.rank-page-list {
  display: grid;
  gap: 14px;
  padding-bottom: 52px;
}

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

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

.rank-cover {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 12px;
  background: #d1d5db;
}

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

.rank-info p {
  max-width: 740px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: #020617;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
  filter: blur(3px);
  transform: scale(1.04);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.56), #020617);
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 58px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  margin: 10px 0 24px;
  color: #a7f3d0;
  font-size: 14px;
  font-weight: 700;
}

.breadcrumb span:last-child {
  color: #d1d5db;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(320px, 0.8fr);
  gap: 26px;
  align-items: stretch;
}

.player-panel,
.detail-side-card,
.story-card,
.related-panel {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000000;
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
}

.player-toggle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 76px;
  height: 76px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(5, 150, 105, 0.92);
  box-shadow: 0 18px 40px rgba(5, 150, 105, 0.34);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.player-toggle span {
  display: inline-block;
  margin-left: 4px;
  font-size: 32px;
  line-height: 1;
}

.video-shell.playing .player-toggle {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.92);
}

.video-shell:hover .player-toggle,
.video-shell.paused .player-toggle {
  opacity: 1;
  pointer-events: auto;
}

.detail-side-card {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 18px;
  padding: 18px;
}

.detail-side-card img {
  width: 128px;
  height: 178px;
  border-radius: 16px;
  object-fit: cover;
}

.detail-side-card h1 {
  margin-bottom: 12px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.18;
}

.detail-side-card p {
  color: #d1d5db;
  line-height: 1.7;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 26px;
  padding: 46px 0 74px;
}

.story-card,
.related-panel {
  border-color: #e5e7eb;
  color: #111827;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.06);
  backdrop-filter: none;
}

.story-card {
  padding: 30px;
}

.section-head.inside {
  align-items: flex-start;
  margin-bottom: 16px;
}

.story-card h2 {
  margin-top: 26px;
  color: #111827;
  font-size: 22px;
}

.story-card p {
  color: #374151;
  line-height: 1.92;
  font-size: 16px;
}

.detail-tags {
  margin: 12px 0 8px;
}

.related-panel {
  padding: 22px;
  align-self: start;
}

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

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

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 34px;
  padding: 48px 0;
}

.footer-logo .brand-text strong {
  color: #ffffff;
}

.footer-logo .brand-text small {
  color: #9ca3af;
}

.footer-brand p {
  max-width: 520px;
  color: #9ca3af;
  line-height: 1.8;
}

.footer-links h2 {
  margin: 0 0 16px;
  color: #ffffff;
  font-size: 18px;
}

.footer-links div {
  display: grid;
  gap: 9px;
}

.footer-links a {
  color: #9ca3af;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #34d399;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  border-top: 1px solid #1f2937;
  color: #9ca3af;
  text-align: center;
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

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

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

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

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

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

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

  .hero-carousel {
    min-height: 560px;
    height: 72vh;
  }

  .hero-content {
    padding-top: 50px;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

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

  .rank-item .outline-button {
    grid-column: 2 / -1;
    width: max-content;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .home-search-panel,
  .content-section,
  .page-section,
  .detail-hero-inner,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

  .brand-text strong {
    font-size: 18px;
  }

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

  .hero-tags span {
    font-size: 12px;
  }

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

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

  .card-body {
    padding: 11px;
  }

  .detail-side-card {
    grid-template-columns: 96px 1fr;
  }

  .detail-side-card img {
    width: 96px;
    height: 134px;
  }

  .story-card,
  .related-panel {
    padding: 18px;
  }

  .movie-card-wide {
    grid-template-columns: 118px 1fr;
  }
}
