:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #059669;
  --primary-strong: #047857;
  --accent: #14b8a6;
  --dark: #0f172a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

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

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

img {
  max-width: 100%;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 10px 24px rgba(20, 184, 166, 0.32);
  font-size: 16px;
}

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

.desktop-nav a,
.mobile-nav a {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 650;
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

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

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  gap: 14px;
  flex-wrap: wrap;
}

.mobile-nav.is-open {
  display: flex;
}

.hero-section {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #0f172a;
}

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

.hero-slide {
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.6s ease, transform 0.8s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.52;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 18%, rgba(20, 184, 166, 0.48), transparent 34%), linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.68) 46%, rgba(15, 23, 42, 0.28));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 72vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.62fr);
  align-items: center;
  gap: 42px;
  color: #ffffff;
  padding-top: 34px;
  padding-bottom: 34px;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #ccfbf1;
  background: rgba(20, 184, 166, 0.18);
  border: 1px solid rgba(94, 234, 212, 0.32);
  font-weight: 700;
}

.hero-content h1 {
  margin: 22px 0 8px;
  font-size: clamp(36px, 5vw, 70px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-content h2 {
  margin: 0 0 16px;
  color: #d1fae5;
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 850;
}

.hero-content p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
  line-height: 1.8;
}

.hero-actions,
.section-head,
.filter-row,
.detail-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 16px 30px rgba(5, 150, 105, 0.32);
}

.btn-ghost {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.10);
}

.btn-light {
  color: var(--primary-strong);
  background: #ffffff;
  border-color: var(--line);
}

.hero-panel {
  padding: 24px;
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel h3 {
  margin: 0 0 18px;
  font-size: 18px;
  color: #ccfbf1;
}

.hero-mini-list {
  display: grid;
  gap: 12px;
}

.hero-mini-list a {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-mini-cover {
  width: 64px;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f766e, #134e4a);
}

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

.hero-mini-list strong {
  display: block;
  color: #ffffff;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.hero-mini-list span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.hero-controls {
  position: absolute;
  z-index: 4;
  right: max(16px, calc((100vw - 1180px) / 2));
  bottom: 34px;
  display: flex;
  gap: 12px;
}

.hero-controls button {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.58);
  font-size: 22px;
}

.hero-dots {
  position: absolute;
  z-index: 4;
  left: max(16px, calc((100vw - 1180px) / 2));
  bottom: 46px;
  display: flex;
  gap: 9px;
}

.hero-dot {
  width: 28px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

.hero-dot.is-active {
  background: #34d399;
}

.section {
  padding: 70px 0;
}

.section-compact {
  padding: 38px 0;
}

.section-head {
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-title {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-subtitle {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.8;
}

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

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

.movie-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(226, 232, 240, 0.86);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(20, 184, 166, 0.36);
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.14);
}

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

.movie-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #0f766e, #0f172a);
}

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

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

.movie-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 65%;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.88), transparent);
}

.movie-cover-name {
  position: absolute;
  z-index: 2;
  left: 14px;
  right: 14px;
  bottom: 12px;
  color: #ffffff;
  font-weight: 850;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.34);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-badge,
.rank-badge {
  position: absolute;
  z-index: 3;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #064e3b;
  background: #a7f3d0;
  font-size: 12px;
  font-weight: 850;
}

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

.movie-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 750;
}

.movie-card h3 {
  margin: 9px 0 8px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 850;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.movie-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
  min-height: 46px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

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

.tag-row span,
.detail-tags span,
.filter-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #d1fae5;
  font-size: 12px;
  font-weight: 750;
}

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

.category-card {
  min-height: 188px;
  padding: 24px;
  border-radius: var(--radius);
  color: #ffffff;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.26), transparent 30%), linear-gradient(135deg, #059669, #0f766e 52%, #0f172a);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 900;
}

.category-card p {
  color: rgba(255, 255, 255, 0.80);
  line-height: 1.7;
  margin: 12px 0 0;
}

.page-hero {
  padding: 72px 0 56px;
  color: #ffffff;
  background: radial-gradient(circle at 18% 20%, rgba(20, 184, 166, 0.35), transparent 28%), linear-gradient(135deg, #0f172a, #064e3b);
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 4vw, 56px);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 17px;
  line-height: 1.85;
}

.filter-panel,
.search-panel,
.detail-card,
.rank-list,
.about-card {
  padding: 24px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.filter-row {
  margin-bottom: 22px;
}

.search-input,
.filter-select {
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  outline: none;
  background: #ffffff;
  color: var(--ink);
}

.search-input {
  min-width: min(420px, 100%);
  flex: 1;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

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

.rank-item h2,
.rank-item h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 850;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.detail-hero {
  padding: 54px 0;
  color: #ffffff;
  background: radial-gradient(circle at 22% 22%, rgba(20, 184, 166, 0.34), transparent 28%), linear-gradient(135deg, #0f172a, #134e4a);
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.4fr);
  gap: 36px;
  align-items: center;
}

.detail-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, #0f766e, #0f172a);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.26);
}

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

.detail-cover-title {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  color: #ffffff;
  font-size: 28px;
  font-weight: 900;
  z-index: 2;
}

.detail-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 70%;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.92), transparent);
}

.detail-hero h1 {
  margin: 12px 0 14px;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.1;
  font-weight: 900;
}

.detail-hero p {
  color: rgba(255, 255, 255, 0.80);
  line-height: 1.85;
  font-size: 17px;
}

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

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #ccfbf1;
  background: rgba(20, 184, 166, 0.16);
  border: 1px solid rgba(94, 234, 212, 0.28);
  font-weight: 750;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 24px 55px rgba(15, 23, 42, 0.26);
}

.player-wrap video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-mask {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(20, 184, 166, 0.24), rgba(2, 6, 23, 0.72)), rgba(2, 6, 23, 0.36);
  transition: opacity 0.25s ease;
}

.player-wrap.is-playing .player-mask {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #059669, #14b8a6);
  box-shadow: 0 18px 36px rgba(20, 184, 166, 0.36);
  font-size: 30px;
  padding-left: 4px;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 28px;
  align-items: start;
}

.detail-card h2,
.about-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
  font-weight: 900;
}

.detail-card p,
.about-card p {
  color: #334155;
  line-height: 1.9;
  margin: 0 0 18px;
}

.detail-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

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

.side-list a {
  padding: 14px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.side-list strong {
  display: block;
  margin-bottom: 6px;
}

.side-list span {
  color: var(--muted);
  font-size: 13px;
}

.empty-state {
  display: none;
  padding: 30px;
  border-radius: var(--radius);
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.empty-state.is-visible {
  display: block;
}

.site-footer {
  color: rgba(255, 255, 255, 0.78);
  background: #0f172a;
  padding: 52px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.7fr;
  gap: 34px;
}

.site-footer h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 17px;
}

.site-footer p {
  max-width: 560px;
  line-height: 1.8;
}

.site-footer a:not(.footer-logo) {
  display: block;
  margin: 8px 0;
  color: rgba(255, 255, 255, 0.72);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.56);
  font-size: 14px;
}

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

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

  .hero-panel {
    display: none;
  }
}

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

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

  .hero-section,
  .hero-content {
    min-height: 76vh;
  }

  .hero-controls,
  .hero-dots {
    bottom: 18px;
  }

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

  .section {
    padding: 46px 0;
  }

  .rank-item {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .rank-item .btn {
    grid-column: 1 / -1;
  }
}
