* {
  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%, #f3f4f6 100%);
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  color: #ffffff;
  background: linear-gradient(90deg, #065f46 0%, #0f766e 52%, #155e75 100%);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
}

.top-nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #064e3b;
  background: #ecfdf5;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  transform: translateZ(0);
  transition: transform 0.24s ease;
}

.brand:hover .brand-icon {
  transform: scale(1.08);
}

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

.brand-text strong {
  font-size: clamp(20px, 2.8vw, 28px);
  letter-spacing: 0.02em;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #d1fae5;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 999px;
  background: currentColor;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

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

.mobile-panel-inner {
  padding: 12px 0 18px;
  display: grid;
  gap: 8px;
}

.mobile-link {
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 700;
}

.mobile-link:hover,
.mobile-link.active {
  background: rgba(255, 255, 255, 0.12);
}

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

.hero-carousel {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #020617;
}

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

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.64) 48%, rgba(0, 0, 0, 0.18) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #ffffff;
  max-width: 760px;
}

.hero-badge,
.page-hero span,
.section-heading span,
.detail-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: #10b981;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 18px 0 18px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-content p {
  max-width: 650px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2.4vw, 22px);
  line-height: 1.75;
}

.hero-tags,
.tag-row,
.meta-pills,
.tag-links,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.hero-tags span,
.tag-row span,
.meta-pills span {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #ecfdf5;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
}

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

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

.primary-btn {
  color: #ffffff;
  background: #10b981;
  box-shadow: 0 16px 34px rgba(16, 185, 129, 0.34);
}

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

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

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

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

.hero-dot {
  width: 28px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 44px;
  background: #10b981;
}

.stats-section {
  padding: 36px 0;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

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

.stat-card {
  min-height: 150px;
  padding: 26px;
  border-radius: 22px;
  background: linear-gradient(135deg, #ecfdf5 0%, #ecfeff 100%);
}

.stat-card:nth-child(2) {
  background: linear-gradient(135deg, #eff6ff 0%, #ecfeff 100%);
}

.stat-card:nth-child(3) {
  background: linear-gradient(135deg, #fffbeb 0%, #fff7ed 100%);
}

.stat-card:nth-child(4) {
  background: linear-gradient(135deg, #fff1f2 0%, #fdf2f8 100%);
}

.stat-card strong {
  display: block;
  margin-bottom: 12px;
  font-size: 22px;
}

.stat-card p {
  margin: 0;
  color: #4b5563;
  line-height: 1.7;
}

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

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

.section-heading.light {
  color: #ffffff;
  text-align: center;
}

.section-heading h2,
.page-hero h1 {
  margin: 12px 0 10px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.15;
}

.section-heading p,
.page-hero p {
  max-width: 720px;
  margin: 0;
  color: #64748b;
  line-height: 1.8;
}

.section-heading.light p {
  margin-left: auto;
  margin-right: auto;
  color: rgba(255, 255, 255, 0.78);
}

.search-panel {
  margin: 0 0 30px;
  padding: 18px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.search-box {
  display: grid;
  gap: 8px;
  color: #0f172a;
  font-weight: 800;
}

.search-box input {
  width: 100%;
  height: 50px;
  border: 1px solid #d1d5db;
  border-radius: 16px;
  padding: 0 16px;
  outline: none;
  color: #0f172a;
  background: #f9fafb;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus {
  border-color: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

.filter-row {
  margin-top: 16px;
}

.filter-pill {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  color: #374151;
  background: #f3f4f6;
  font-weight: 800;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.filter-pill:hover,
.filter-pill.active {
  color: #ffffff;
  background: #059669;
  transform: translateY(-1px);
}

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.09);
  transform: translateZ(0);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.16);
}

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

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

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

.poster-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: rgba(0, 0, 0, 0);
  opacity: 0;
  transition: background 0.25s ease, opacity 0.25s ease;
}

.poster-mask i {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-style: normal;
  font-weight: 900;
  background: #10b981;
  box-shadow: 0 12px 26px rgba(16, 185, 129, 0.35);
}

.movie-card:hover .poster-mask {
  opacity: 1;
  background: rgba(0, 0, 0, 0.32);
}

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  padding: 6px 9px;
  border-radius: 10px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.7);
}

.year-badge {
  right: 10px;
  top: 10px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  background: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
}

.movie-card-body {
  padding: 16px;
}

.movie-type {
  margin: 0 0 7px;
  color: #059669;
  font-size: 12px;
  font-weight: 900;
}

.movie-card h2 {
  margin: 0 0 9px;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card h2 a:hover,
.rank-info strong a:hover,
.footer-grid a:hover,
.breadcrumb a:hover {
  color: #059669;
}

.movie-line {
  display: -webkit-box;
  min-height: 46px;
  margin: 0 0 12px;
  overflow: hidden;
  color: #64748b;
  font-size: 13px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row span {
  color: #374151;
  background: #f3f4f6;
}

.category-band {
  padding: 76px 0;
  color: #ffffff;
  background: linear-gradient(90deg, #064e3b 0%, #115e59 52%, #164e63 100%);
}

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

.category-tile {
  position: relative;
  min-height: 188px;
  padding: 28px;
  overflow: hidden;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  transition: transform 0.25s ease, background 0.25s ease;
}

.overview-grid .category-tile {
  color: #ffffff;
  background: linear-gradient(135deg, #047857 0%, #0e7490 100%);
}

.category-tile:hover {
  transform: translateY(-6px);
  background: rgba(255, 255, 255, 0.2);
}

.category-tile span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  margin-bottom: 18px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #064e3b;
  background: #ccfbf1;
  font-size: 13px;
  font-weight: 900;
}

.category-tile strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
}

.category-tile p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.7;
}

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

.rank-grid-wide {
  grid-template-columns: repeat(2, 1fr);
}

.rank-item {
  display: flex;
  gap: 18px;
  overflow: hidden;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.09);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.rank-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.14);
}

.rank-cover {
  position: relative;
  flex: 0 0 128px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #111827;
}

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

.rank-cover span {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316 0%, #ef4444 100%);
  font-weight: 900;
}

.rank-info {
  min-width: 0;
  padding: 18px 18px 18px 0;
}

.rank-info strong {
  display: block;
  margin-bottom: 10px;
  font-size: 20px;
}

.rank-info p {
  display: -webkit-box;
  margin: 0 0 12px;
  overflow: hidden;
  color: #64748b;
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-info em {
  color: #059669;
  font-style: normal;
  font-weight: 800;
}

.center-actions {
  justify-content: center;
}

.page-hero {
  padding: 72px 0;
  color: #ffffff;
  background: linear-gradient(90deg, #065f46 0%, #0f766e 52%, #155e75 100%);
}

.page-hero .container {
  text-align: center;
}

.page-hero span {
  margin: 0 auto;
}

.page-hero p {
  margin-left: auto;
  margin-right: auto;
  color: rgba(255, 255, 255, 0.78);
}

.rank-hero {
  background: linear-gradient(90deg, #0f172a 0%, #164e63 100%);
}

.search-hero {
  background: linear-gradient(90deg, #0e7490 0%, #2563eb 100%);
}

.player-section {
  padding: 24px 0 0;
  background: #020617;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: #cbd5e1;
  font-size: 14px;
}

.breadcrumb strong {
  color: #ffffff;
}

.player-shell {
  position: relative;
  width: min(980px, 100%);
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 18px;
  background: #000000;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.movie-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: contain;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.28));
  cursor: pointer;
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.play-circle {
  width: 78px;
  height: 78px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #10b981;
  box-shadow: 0 18px 44px rgba(16, 185, 129, 0.36);
  font-size: 30px;
  transition: transform 0.22s ease;
}

.player-cover:hover .play-circle {
  transform: scale(1.06);
}

.player-cover strong {
  max-width: min(720px, calc(100% - 40px));
  font-size: clamp(22px, 4vw, 40px);
  line-height: 1.2;
}

.detail-main {
  background: #f3f4f6;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 30px;
  padding-top: 42px;
  padding-bottom: 72px;
}

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

.detail-card {
  margin-bottom: 24px;
  padding: 26px;
}

.intro-card {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 26px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 18px;
  background: #111827;
}

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

.detail-copy h1 {
  margin: 16px 0 12px;
  font-size: clamp(30px, 4.6vw, 50px);
  line-height: 1.12;
}

.lead-text {
  margin: 0 0 18px;
  color: #475569;
  font-size: 18px;
  line-height: 1.8;
}

.meta-pills span {
  color: #065f46;
  background: #d1fae5;
}

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

.detail-card p {
  margin: 0;
  color: #374151;
  line-height: 1.95;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.info-grid div {
  padding: 16px;
  border-radius: 16px;
  background: #f8fafc;
}

.info-grid span {
  display: block;
  margin-bottom: 6px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.info-grid strong {
  color: #111827;
}

.tag-links a {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  color: #374151;
  background: #f3f4f6;
  font-weight: 800;
}

.tag-links a:hover {
  color: #065f46;
  background: #d1fae5;
}

.side-card {
  position: sticky;
  top: 96px;
  padding: 22px;
}

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

.movie-card-compact {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  border-radius: 16px;
  box-shadow: none;
  background: #f8fafc;
}

.movie-card-compact:hover {
  transform: none;
  box-shadow: none;
  background: #f1f5f9;
}

.movie-card-compact .poster-link {
  aspect-ratio: 3 / 4;
  border-radius: 16px 0 0 16px;
}

.movie-card-compact .movie-card-body {
  padding: 12px;
}

.movie-card-compact .movie-line,
.movie-card-compact .tag-row,
.movie-card-compact .year-badge {
  display: none;
}

.movie-card-compact h2 {
  font-size: 15px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 34px;
  padding: 54px 0 34px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  color: #ffffff;
  font-size: 20px;
}

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

.footer-grid p {
  max-width: 390px;
  margin: 0;
  color: #9ca3af;
  line-height: 1.8;
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid li + li {
  margin-top: 10px;
}

.footer-bottom {
  padding: 22px 0 32px;
  border-top: 1px solid #1f2937;
  color: #9ca3af;
}

.footer-bottom p {
  margin: 0;
}

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

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

  .category-grid,
  .overview-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

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

  .side-card {
    position: static;
  }
}

@media (max-width: 760px) {
  .top-nav {
    min-height: 68px;
  }

  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: inline-block;
  }

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

  .brand-text small {
    display: none;
  }

  .hero-carousel {
    height: 560px;
  }

  .hero-overlay {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.34) 100%);
  }

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 86px;
  }

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

  .stats-grid,
  .rank-grid,
  .rank-grid-wide,
  .footer-grid,
  .intro-card,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .movie-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

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

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

  .rank-cover {
    flex-basis: 104px;
  }

  .rank-info strong {
    font-size: 17px;
  }

  .detail-card,
  .side-card {
    padding: 18px;
  }

  .detail-poster {
    max-width: 210px;
  }

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

@media (max-width: 430px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .movie-card-body {
    padding: 12px;
  }

  .movie-card h2 {
    font-size: 15px;
  }

  .movie-line {
    min-height: 42px;
    font-size: 12px;
  }

  .hero-actions {
    width: 100%;
  }

  .primary-btn,
  .ghost-btn {
    flex: 1 1 auto;
    padding: 0 18px;
  }
}
