:root {
  color-scheme: light;
  --brand: #0f766e;
  --brand-strong: #0d9488;
  --brand-soft: #ccfbf1;
  --blue: #2563eb;
  --orange: #ea580c;
  --ink: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --paper: #ffffff;
  --soft: #f8fafc;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 1.25rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #ffffff;
  background: linear-gradient(90deg, #0f766e 0%, #0891b2 52%, #2563eb 100%);
  box-shadow: 0 12px 30px rgba(15, 118, 110, 0.24);
}

.nav-wrap {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #0f766e;
  background: #ffffff;
  box-shadow: inset 0 0 0 2px rgba(15, 118, 110, 0.12);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

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

.nav-links a:hover,
.nav-links a.is-active {
  color: #ffffff;
  transform: translateY(-1px);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 14rem;
  padding: 0.35rem 0.45rem 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.nav-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #ffffff;
  background: transparent;
}

.nav-search input::placeholder {
  color: rgba(255, 255, 255, 0.75);
}

.nav-search button,
.nav-toggle {
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: transparent;
}

.nav-toggle {
  display: none;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.16);
}

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

.hero-slider {
  position: relative;
  min-height: 680px;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.9), rgba(15, 118, 110, 0.58), rgba(37, 99, 235, 0.36)), var(--hero-image);
  background-size: cover;
  background-position: center;
  transition: opacity 0.6s ease;
}

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

.hero-content {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.7fr);
  gap: 2rem;
  align-items: center;
  padding: 7rem 0 5.5rem;
}

.hero-copy {
  max-width: 760px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  color: #ecfeff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
  font-weight: 700;
  font-size: 0.88rem;
}

.hero-copy h1 {
  margin: 0 0 1rem;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.hero-copy h2 {
  margin: 0 0 1rem;
  color: #99f6e4;
  font-size: clamp(1.5rem, 3vw, 2.3rem);
  font-weight: 800;
}

.hero-copy p {
  margin: 0 0 1.4rem;
  max-width: 720px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.12rem;
  line-height: 1.8;
}

.hero-actions,
.action-row,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.8rem;
  padding: 0.75rem 1.25rem;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: var(--brand);
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.22);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: var(--brand-strong);
  box-shadow: 0 18px 34px rgba(15, 118, 110, 0.28);
}

.btn-light {
  color: var(--brand);
  background: #ffffff;
}

.btn-ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.hero-panel {
  padding: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 2rem;
  background: rgba(15, 23, 42, 0.38);
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(14px);
}

.hero-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.12);
}

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

.hero-panel:hover img {
  transform: scale(1.05);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  color: #0f766e;
  background: #ccfbf1;
  font-size: 0.8rem;
  font-weight: 800;
}

.badge.dark {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  z-index: 3;
  display: flex;
  gap: 0.65rem;
  transform: translateX(-50%);
}

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

.hero-dot.is-active {
  width: 2.2rem;
  background: #ffffff;
}

.quick-search {
  display: flex;
  max-width: 680px;
  margin: 1.5rem 0 0;
  padding: 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(12px);
}

.quick-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 1rem;
  color: #ffffff;
  background: transparent;
}

.quick-search input::placeholder {
  color: rgba(255, 255, 255, 0.74);
}

.section {
  padding: 4.5rem 0;
}

.section.compact {
  padding: 2.5rem 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.section-title {
  margin: 0;
  color: #1f2937;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.15;
}

.section-desc {
  max-width: 780px;
  margin: 0.55rem 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 10px 26px 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(20, 184, 166, 0.45);
  box-shadow: var(--shadow);
}

.poster-link,
.poster-frame {
  display: block;
}

.poster-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #ccfbf1, #dbeafe);
}

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

.movie-card:hover .poster-frame img {
  transform: scale(1.06);
}

.rank-ribbon {
  position: absolute;
  left: 0.8rem;
  top: 0.8rem;
  z-index: 2;
  min-width: 2.2rem;
  padding: 0.32rem 0.55rem;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-weight: 900;
  text-align: center;
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.28);
}

.movie-card-body {
  padding: 1rem;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 700;
}

.movie-card h3 {
  margin: 0 0 0.55rem;
  color: #111827;
  font-size: 1.08rem;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--brand);
}

.movie-line {
  margin: 0;
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.tag {
  border-radius: 999px;
  padding: 0.22rem 0.55rem;
  color: #0f766e;
  background: #f0fdfa;
  font-size: 0.76rem;
  font-weight: 700;
}

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

.category-card {
  min-height: 13rem;
  padding: 1.35rem;
  border-radius: var(--radius);
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #0891b2 55%, #2563eb);
  box-shadow: 0 16px 40px rgba(15, 118, 110, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 54px rgba(37, 99, 235, 0.22);
}

.category-card h3 {
  margin: 0 0 0.8rem;
  font-size: 1.35rem;
}

.category-card p {
  margin: 0 0 1.1rem;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.75;
}

.rank-list {
  display: grid;
  gap: 0.85rem;
}

.rank-item {
  display: grid;
  grid-template-columns: 4rem 5rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.8rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.rank-index {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e, #2563eb);
  font-weight: 900;
}

.rank-thumb {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 0.8rem;
  background: #ccfbf1;
}

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

.rank-info h3 {
  margin: 0 0 0.3rem;
  font-size: 1.08rem;
}

.rank-info p {
  margin: 0;
  color: #64748b;
  line-height: 1.6;
}

.page-hero {
  color: #ffffff;
  background: linear-gradient(135deg, #0f766e 0%, #0891b2 45%, #2563eb 100%);
}

.page-hero-inner {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 4.5rem 0;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.92rem;
}

.breadcrumbs a:hover {
  color: #ffffff;
}

.page-hero h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.08;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.1rem;
  line-height: 1.8;
}

.filter-panel {
  margin-bottom: 1.6rem;
  padding: 1rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.filter-panel input,
.filter-panel select,
.search-page-form input {
  min-height: 2.8rem;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 0 1rem;
  outline: 0;
  background: #ffffff;
}

.filter-panel input {
  flex: 1 1 18rem;
}

.filter-panel select {
  flex: 0 1 12rem;
}

.filter-panel input:focus,
.filter-panel select:focus,
.search-page-form input:focus {
  border-color: #14b8a6;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.13);
}

.search-page-form {
  display: flex;
  gap: 0.7rem;
  max-width: 760px;
  margin-top: 1.5rem;
}

.search-page-form input {
  flex: 1;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 118, 110, 0.62), rgba(37, 99, 235, 0.34)), var(--detail-image);
  background-size: cover;
  background-position: center;
}

.detail-hero-inner {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 4.5rem 0 4rem;
}

.detail-hero h1 {
  max-width: 860px;
  margin: 0 0 1rem;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1.08;
}

.detail-hero p {
  max-width: 860px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.1rem;
  line-height: 1.8;
}

.player-section {
  margin-top: -2.4rem;
  position: relative;
  z-index: 2;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  background: #020617;
  box-shadow: 0 28px 70px rgba(2, 6, 23, 0.38);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 0.6rem;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.55));
  cursor: pointer;
  transition: opacity 0.25s ease;
}

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

.play-icon {
  width: 5rem;
  height: 5rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #0f766e;
  background: #ffffff;
  font-size: 2rem;
  box-shadow: 0 18px 36px rgba(2, 6, 23, 0.32);
}

.detail-layout {
  display: grid;
  grid-template-columns: 18rem minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
  padding-top: 2.2rem;
}

.detail-cover {
  overflow: hidden;
  border-radius: 1.2rem;
  background: #ccfbf1;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.14);
}

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

.detail-card {
  padding: 1.5rem;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 1.2rem;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.detail-card h2 {
  margin: 0 0 1rem;
  color: #111827;
  font-size: 1.45rem;
}

.detail-card p {
  margin: 0 0 1rem;
  color: #475569;
  line-height: 1.9;
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0 0 1.2rem;
  padding: 0;
  list-style: none;
}

.info-list li {
  padding: 0.8rem;
  border-radius: 0.9rem;
  background: #f8fafc;
  color: #475569;
}

.info-list strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #0f172a;
}

.site-footer {
  margin-top: 4rem;
  color: #cbd5e1;
  background: #111827;
}

.footer-inner {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 2rem;
  padding: 3rem 0;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 1rem;
  color: #5eead4;
}

.site-footer p,
.site-footer li {
  color: #cbd5e1;
  line-height: 1.8;
}

.footer-links {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem 0;
  text-align: center;
  color: #94a3b8;
}

.empty-state {
  display: none;
  padding: 2.4rem;
  border-radius: 1.2rem;
  color: #64748b;
  background: #ffffff;
  text-align: center;
}

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

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

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

  .hero-panel {
    max-width: 360px;
  }
}

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-wrap {
    align-items: flex-start;
  }

  .nav-links {
    position: absolute;
    left: 1rem;
    right: 1rem;
    top: 4.8rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(15, 118, 110, 0.96);
    box-shadow: var(--shadow);
  }

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

  .nav-search {
    width: 100%;
  }

  .hero-slider {
    min-height: 760px;
  }

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

  .rank-item {
    grid-template-columns: 3rem 4.5rem minmax(0, 1fr);
  }

  .rank-item .btn {
    grid-column: 2 / -1;
    justify-self: start;
  }

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

  .detail-cover {
    max-width: 320px;
  }
}

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

  .hero-copy h1,
  .page-hero h1,
  .detail-hero h1 {
    font-size: 2.4rem;
  }

  .quick-search,
  .search-page-form {
    flex-direction: column;
    border-radius: 1.2rem;
  }

  .quick-search input,
  .search-page-form input {
    width: 100%;
    min-height: 2.8rem;
  }

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