* {
  box-sizing: border-box;
}

:root {
  --emerald: #10b981;
  --emerald-dark: #059669;
  --emerald-soft: #d1fae5;
  --blue-soft: #eff6ff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --page: #f9fafb;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.08);
}

html {
  scroll-behavior: smooth;
}

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

body.menu-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.82);
  box-shadow: 0 8px 25px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(16px);
}

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

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  position: relative;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--emerald), #22d3ee);
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.28);
}

.brand-mark span {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid #ffffff;
}

.brand-text {
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link {
  position: relative;
  color: #374151;
  font-size: 15px;
  font-weight: 700;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 3px;
  border-radius: 99px;
  background: var(--emerald);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--emerald-dark);
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  background: #f3f4f6;
  cursor: pointer;
}

.menu-button span {
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: #374151;
}

.mobile-nav {
  display: none;
  width: min(100% - 32px, 1280px);
  margin: 0 auto;
  padding: 0 0 18px;
}

.mobile-nav.open {
  display: grid;
  gap: 8px;
}

.mobile-nav .nav-link {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f9fafb;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: #111827;
}

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

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

.hero-bg {
  position: absolute;
  inset: -22px;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.42);
  transform: scale(1.1);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.96) 0%, rgba(17, 24, 39, 0.48) 56%, rgba(17, 24, 39, 0.18) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100% - 32px, 1280px);
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
  color: #ffffff;
}

.hero-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.hero-kicker span,
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--emerald);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-kicker em {
  color: #d1d5db;
  font-style: normal;
  font-size: 14px;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.06;
  letter-spacing: -0.055em;
}

.hero p {
  max-width: 680px;
  margin: 20px 0 0;
  color: #e5e7eb;
  font-size: clamp(18px, 2vw, 24px);
}

.hero-actions,
.intro-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: 48px;
  padding: 0 24px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #ffffff;
  background: var(--emerald-dark);
  box-shadow: 0 14px 28px rgba(5, 150, 105, 0.25);
}

.primary-button:hover,
.ghost-button:hover,
.outline-button:hover {
  transform: translateY(-2px);
}

.primary-button:hover {
  background: #047857;
  box-shadow: 0 18px 34px rgba(5, 150, 105, 0.34);
}

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

.outline-button {
  color: var(--emerald-dark);
  border: 1px solid rgba(16, 185, 129, 0.38);
  background: #ffffff;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 34px;
  display: flex;
  align-items: center;
  gap: 18px;
  transform: translateX(-50%);
}

.hero-arrow {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

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

.hero-dots {
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  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: 34px;
  background: #ffffff;
}

.page-shell,
.detail-shell,
.footer-inner {
  width: min(100% - 32px, 1280px);
  margin: 0 auto;
}

.home-shell {
  padding: 72px 0 88px;
}

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

.page-hero {
  position: relative;
  color: #ffffff;
  background: radial-gradient(circle at 15% 18%, rgba(16, 185, 129, 0.55), transparent 28%), linear-gradient(135deg, #111827 0%, #064e3b 58%, #0f172a 100%);
}

.compact-hero {
  min-height: 320px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 60px 20px;
}

.compact-hero > div {
  width: min(760px, 100%);
}

.compact-hero .eyebrow {
  margin: 0 auto 16px;
}

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

.compact-hero p {
  margin: 18px auto 0;
  color: #d1d5db;
  font-size: 18px;
}

.content-section {
  margin: 0 0 72px;
}

.intro-card,
.soft-block {
  border-radius: 32px;
  padding: clamp(28px, 5vw, 52px);
  background: linear-gradient(135deg, #ecfdf5 0%, #eff6ff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), var(--shadow-soft);
}

.intro-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.intro-card h2 {
  margin: 14px 0 10px;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.intro-card p:not(.eyebrow) {
  max-width: 740px;
  margin: 0;
  color: #4b5563;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading::after {
  content: "";
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--emerald), rgba(16, 185, 129, 0));
}

.section-heading a {
  color: var(--emerald-dark);
  font-weight: 800;
  white-space: nowrap;
}

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

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

.library-grid {
  align-items: start;
}

.movie-card {
  min-width: 0;
}

.card-link {
  display: block;
  height: 100%;
}

.card-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 18px;
  background: #111827;
  box-shadow: var(--shadow-soft);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.wide-card .card-cover,
.wide-layout .card-cover {
  aspect-ratio: 16 / 10;
}

.card-cover img,
.category-visual,
.compact-cover img,
.detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(0, 0, 0, 0.72) 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.card-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(16, 185, 129, 0.9);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.card-body {
  padding-top: 14px;
}

.card-body h3,
.compact-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.35;
  transition: color 0.2s ease;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.card-body p,
.compact-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: #6b7280;
  font-size: 13px;
}

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

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

.movie-card:hover .card-cover::after {
  opacity: 1;
}

.movie-card:hover h3,
.compact-card:hover h3 {
  color: var(--emerald-dark);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.72fr);
  gap: 32px;
}

.compact-grid {
  display: grid;
  gap: 16px;
}

.compact-card {
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.compact-card a {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 16px;
  padding: 14px;
}

.compact-cover {
  position: relative;
  height: 108px;
  overflow: hidden;
  border-radius: 14px;
  background: #111827;
}

.rank-num {
  position: absolute;
  top: 8px;
  left: 8px;
  min-width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: var(--emerald-dark);
  font-size: 13px;
  font-weight: 900;
}

.compact-card span:not(.rank-num) {
  display: inline-block;
  margin-top: 8px;
  color: #6b7280;
  font-size: 13px;
}

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

.category-card {
  overflow: hidden;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.category-visual {
  height: 170px;
  background-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.18) 100%), var(--category-image);
  background-size: cover;
  background-position: center;
}

.category-info {
  padding: 22px;
}

.category-info span {
  color: var(--emerald-dark);
  font-size: 13px;
  font-weight: 900;
}

.category-info h2 {
  margin: 8px 0 8px;
  font-size: 24px;
  letter-spacing: -0.03em;
}

.category-info p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.filter-panel {
  margin: 56px 0 32px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.search-box {
  display: grid;
  gap: 8px;
}

.search-box span,
.filter-row span {
  color: #374151;
  font-size: 13px;
  font-weight: 900;
}

.search-box input,
.filter-row select {
  width: 100%;
  min-height: 48px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  color: var(--ink);
  background: #ffffff;
  outline: 0;
}

.search-box input {
  padding: 0 16px;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.filter-row label {
  display: grid;
  gap: 8px;
}

.filter-row select {
  padding: 0 12px;
}

.detail-main {
  background: #f3f4f6;
  min-height: 70vh;
  padding: 32px 0 88px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  color: #6b7280;
  font-size: 14px;
}

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

.player-card,
.text-panel {
  overflow: hidden;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.72));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-ring {
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.95);
  box-shadow: 0 20px 46px rgba(16, 185, 129, 0.38);
}

.play-ring span {
  width: 0;
  height: 0;
  margin-left: 6px;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid #ffffff;
}

.player-overlay strong {
  font-size: 18px;
  letter-spacing: 0.02em;
}

.player-error {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 6;
  max-width: min(520px, calc(100% - 32px));
  transform: translateX(-50%);
  padding: 10px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(220, 38, 38, 0.92);
  font-size: 14px;
  text-align: center;
  display: none;
}

.player-error.show {
  display: block;
}

.detail-info {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  padding: 32px;
}

.detail-cover {
  overflow: hidden;
  border-radius: 20px;
  aspect-ratio: 3 / 4;
  background: #111827;
  box-shadow: var(--shadow-soft);
}

.detail-copy h1 {
  margin: 12px 0 12px;
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.052em;
}

.detail-one-line {
  max-width: 850px;
  margin: 0 0 18px;
  color: #4b5563;
  font-size: 18px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-meta span,
.tag-list span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag-list span {
  color: var(--emerald-dark);
  background: var(--emerald-soft);
}

.text-panel {
  margin-top: 24px;
  padding: 32px;
}

.text-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
  letter-spacing: -0.035em;
}

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

.related-section {
  margin-top: 40px;
}

.ranking-list {
  padding-bottom: 88px;
}

[data-movie-card].is-hidden {
  display: none;
}

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

  .split-section {
    grid-template-columns: 1fr;
  }
}

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

  .menu-button {
    display: inline-flex;
  }

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

  .hero-content {
    align-items: flex-end;
    padding-bottom: 108px;
  }

  .intro-card {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .filter-row,
  .detail-info {
    grid-template-columns: 1fr;
  }

  .detail-cover {
    width: min(260px, 100%);
  }
}

@media (max-width: 560px) {
  .site-nav,
  .page-shell,
  .detail-shell,
  .footer-inner,
  .hero-content {
    width: min(100% - 24px, 1280px);
  }

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

  .hero {
    min-height: 620px;
  }

  .hero-actions,
  .intro-actions {
    width: 100%;
  }

  .primary-button,
  .ghost-button,
  .outline-button {
    width: 100%;
  }

  .hero-controls {
    width: calc(100% - 32px);
    justify-content: center;
  }

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

  .compact-card a {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .compact-cover {
    height: 96px;
  }

  .player-card,
  .text-panel,
  .filter-panel,
  .intro-card,
  .soft-block {
    border-radius: 20px;
  }

  .detail-info,
  .text-panel {
    padding: 22px;
  }

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

  .section-heading::after {
    width: 100%;
    flex: none;
  }
}

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

.footer-inner {
  padding: 48px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 28px;
}

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

.footer-brand p,
.site-footer p,
.site-footer a,
.footer-bottom {
  color: #9ca3af;
}

.site-footer h3 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 16px;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

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

.footer-bottom {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid #1f2937;
  text-align: center;
  font-size: 14px;
}

@media (max-width: 820px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
