* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #172033;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 38%, #f1f5f9 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #1e293b, #334155, #1e293b);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
}

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

.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #064e3b;
  background: linear-gradient(135deg, #34d399, #a7f3d0);
  box-shadow: 0 10px 24px rgba(16, 185, 129, 0.35);
  font-size: 18px;
}

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

.brand-text strong {
  font-size: 22px;
  letter-spacing: 0.04em;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 18px;
  font-weight: 600;
  font-size: 15px;
}

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

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #6ee7b7;
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.mobile-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  background: #ffffff;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 12px 16px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

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

.mobile-nav a {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
}

.hero-section {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  display: grid;
  align-items: center;
  color: #ffffff;
  background: #0f172a;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.hero-tile {
  position: relative;
  overflow: hidden;
  min-height: 100%;
  background: linear-gradient(135deg, #0f172a, #064e3b);
}

.hero-tile img {
  width: 100%;
  height: 100%;
  min-height: 78vh;
  object-fit: cover;
  transform: scale(1.02);
  opacity: 0.82;
  transition: transform 0.7s ease, opacity 0.7s ease;
}

.hero-tile:hover img {
  transform: scale(1.1);
  opacity: 1;
}

.hero-tile span {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 22px;
  z-index: 2;
  padding: 10px 12px;
  border-radius: 14px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(12px);
  font-weight: 700;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.hero-tile:hover span {
  opacity: 1;
  transform: translateY(0);
}

.hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.42), rgba(15, 23, 42, 0.22) 42%, rgba(15, 23, 42, 0.78));
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 96px 0;
  text-align: center;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #34d399;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(48px, 8vw, 92px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.hero-content p {
  max-width: 760px;
  margin: 24px auto 0;
  color: #e2e8f0;
  font-size: clamp(18px, 3vw, 26px);
  line-height: 1.8;
}

.hero-search {
  display: flex;
  width: min(680px, 100%);
  margin: 34px auto 0;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 14px 20px;
  color: #ffffff;
  background: transparent;
}

.hero-search input::placeholder {
  color: #cbd5e1;
}

.hero-search button {
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  color: #064e3b;
  background: linear-gradient(135deg, #34d399, #a7f3d0);
  font-weight: 800;
  cursor: pointer;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.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.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
  color: #064e3b;
  background: linear-gradient(135deg, #34d399, #a7f3d0);
  box-shadow: 0 14px 34px rgba(16, 185, 129, 0.34);
}

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

.section {
  padding: 72px 0;
  background: #ffffff;
}

.section-alt {
  background: linear-gradient(135deg, #f1f5f9, #f8fafc);
}

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

.section-head h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.15;
  font-weight: 900;
}

.section-head p,
.page-hero p {
  margin: 10px 0 0;
  color: #64748b;
  line-height: 1.8;
}

.section-link,
.text-link {
  color: #059669;
  font-weight: 800;
}

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

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

.listing-grid {
  margin-top: 28px;
}

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: radial-gradient(circle at 20% 10%, #34d399, transparent 28%), linear-gradient(135deg, #0f172a, #1e293b 48%, #064e3b);
}

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

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

.poster-frame.fallback::after,
.hero-tile.fallback::after,
.rank-poster.fallback::after {
  content: attr(data-fallback-title);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  color: #ffffff;
  text-align: center;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.year-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(5, 150, 105, 0.92);
  font-size: 12px;
  font-weight: 800;
}

.play-hover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.42);
  font-weight: 900;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
}

.card-content {
  padding: 18px;
}

.card-content h3 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

.card-content h3 a:hover {
  color: #059669;
}

.card-content p {
  display: -webkit-box;
  margin: 10px 0 14px;
  overflow: hidden;
  color: #64748b;
  font-size: 14px;
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.compact-card .card-content {
  padding: 14px;
}

.compact-card .card-content h3 {
  font-size: 15px;
}

.compact-card .card-content p,
.compact-card .tag-row {
  display: none;
}

.card-meta,
.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
}

.card-meta span,
.detail-meta span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #f1f5f9;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #047857;
  background: #d1fae5;
  font-size: 12px;
  font-weight: 700;
}

.category-stack {
  display: grid;
  gap: 38px;
}

.category-strip {
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 16px 44px rgba(15, 23, 42, 0.08);
}

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

.strip-head h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #0f172a;
  font-size: 24px;
  font-weight: 900;
}

.strip-head h3 span {
  width: 5px;
  height: 28px;
  border-radius: 999px;
  background: #059669;
}

.strip-head a {
  color: #059669;
  font-weight: 800;
}

.page-hero {
  position: relative;
  color: #ffffff;
  background: radial-gradient(circle at 15% 20%, rgba(52, 211, 153, 0.22), transparent 28%), linear-gradient(135deg, #0f172a, #1e293b 60%, #064e3b);
}

.page-hero .container {
  padding: 84px 0;
}

.page-hero h1,
.page-hero p {
  color: #ffffff;
}

.page-hero p {
  max-width: 760px;
  color: #dbeafe;
}

.slim-hero .container {
  padding: 64px 0;
}

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

.category-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-cover-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  min-height: 220px;
  background: #0f172a;
}

.category-cover-grid img {
  width: 100%;
  height: 100%;
  min-height: 109px;
  object-fit: cover;
}

.category-card-body {
  padding: 26px;
}

.category-card-body h2 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 26px;
  font-weight: 900;
}

.category-card-body p {
  margin: 0 0 12px;
  color: #64748b;
  line-height: 1.8;
}

.category-samples {
  font-size: 14px;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  outline: 0;
  padding: 13px 14px;
  color: #0f172a;
  background: #f8fafc;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.14);
}

.empty-state {
  margin-top: 24px;
  padding: 30px;
  border-radius: 24px;
  color: #64748b;
  text-align: center;
  background: #f8fafc;
}

.rank-list {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.rank-card {
  display: grid;
  grid-template-columns: 64px 180px 1fr 110px;
  align-items: center;
  gap: 20px;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 26px;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.07);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.13);
}

.rank-number {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  color: #064e3b;
  background: linear-gradient(135deg, #34d399, #a7f3d0);
  font-weight: 900;
}

.rank-poster {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 18px;
  background: linear-gradient(135deg, #0f172a, #064e3b);
}

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

.rank-info h2 {
  margin: 0;
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
}

.rank-info p {
  margin: 8px 0 12px;
  color: #64748b;
  line-height: 1.7;
}

.rank-action {
  justify-self: end;
  display: inline-grid;
  place-items: center;
  min-width: 88px;
  min-height: 42px;
  border-radius: 999px;
  color: #ffffff;
  background: #059669;
  font-weight: 800;
}

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

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.36;
  filter: blur(8px);
  transform: scale(1.05);
}

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

.detail-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 42px;
  align-items: center;
  padding: 72px 0;
}

.detail-poster {
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

.detail-info h1 {
  color: #ffffff;
  font-size: clamp(38px, 6vw, 72px);
}

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

.breadcrumb a:hover {
  color: #6ee7b7;
}

.detail-one-line {
  max-width: 800px;
  margin: 20px 0 22px;
  color: #e2e8f0;
  font-size: 20px;
  line-height: 1.8;
}

.detail-meta span {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.13);
}

.detail-tags span {
  color: #064e3b;
  background: #a7f3d0;
}

.detail-actions {
  justify-content: flex-start;
}

.player-section {
  background: #0f172a;
}

.player-section .section-head h2 {
  color: #ffffff;
}

.compact-head {
  margin-bottom: 20px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(5, 150, 105, 0.44), rgba(15, 23, 42, 0.72));
  cursor: pointer;
}

.player-overlay.is-hidden {
  display: none;
}

.play-circle {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  color: #064e3b;
  background: linear-gradient(135deg, #34d399, #a7f3d0);
  box-shadow: 0 18px 46px rgba(16, 185, 129, 0.34);
  font-size: 28px;
}

.player-overlay strong {
  font-size: 22px;
}

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

.detail-article article {
  padding: 32px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.08);
}

.detail-article h2 {
  margin: 0 0 14px;
  color: #0f172a;
  font-size: 28px;
  font-weight: 900;
}

.detail-article p {
  margin: 0;
  color: #475569;
  line-height: 2;
}

.site-footer {
  color: #cbd5e1;
  background: linear-gradient(180deg, #1e293b, #0f172a);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 34px;
  padding: 50px 0;
}

.footer-brand {
  color: #ffffff;
  font-size: 20px;
}

.site-footer p {
  color: #94a3b8;
  line-height: 1.8;
}

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

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

.site-footer li {
  margin: 10px 0;
}

.site-footer a:hover {
  color: #6ee7b7;
}

.footer-bottom {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  font-size: 14px;
}

[hidden] {
  display: none !important;
}

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

  .mobile-toggle {
    display: block;
  }

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

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

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

  .rank-card {
    grid-template-columns: 54px 140px 1fr;
  }

  .rank-action {
    grid-column: 3;
    justify-self: start;
  }

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

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

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

  .header-inner {
    min-height: 66px;
  }

  .brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
  }

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

  .brand-text small {
    display: none;
  }

  .hero-section {
    min-height: 82vh;
  }

  .hero-backdrop {
    grid-template-columns: 1fr;
  }

  .hero-tile:nth-child(n + 2) {
    display: none;
  }

  .hero-search {
    flex-direction: column;
    border-radius: 24px;
  }

  .hero-search button {
    min-height: 46px;
  }

  .section {
    padding: 52px 0;
  }

  .section-head,
  .strip-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .card-content {
    padding: 14px;
  }

  .card-content h3 {
    font-size: 16px;
  }

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

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

  .category-cover-grid {
    min-height: 180px;
  }

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

  .rank-card {
    grid-template-columns: 48px 1fr;
    align-items: start;
  }

  .rank-poster {
    grid-column: 1 / -1;
    order: -1;
  }

  .rank-info {
    grid-column: 2;
  }

  .rank-action {
    grid-column: 2;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    padding: 48px 0;
  }

  .detail-poster {
    width: min(360px, 100%);
  }

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

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

  .footer-bottom {
    flex-direction: column;
    align-items: center;
  }
}

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

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

  .rank-number,
  .rank-info,
  .rank-action {
    grid-column: 1;
  }
}
