* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  color: #111827;
  background: #f8fafc;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.28);
}

.nav-shell {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 26px;
}

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

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(135deg, #14b8a6, #22d3ee);
  box-shadow: 0 14px 28px rgba(20, 184, 166, 0.28);
}

.brand-text,
.footer-brand div {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-text strong,
.footer-brand strong {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand-text small,
.footer-brand small {
  margin-top: 4px;
  color: #94a3b8;
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.nav-link {
  color: #e5e7eb;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #2dd4bf;
}

.header-search,
.mobile-search,
.hero-search-form,
.search-panel form {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.hero-search-form input,
.search-panel input {
  min-width: 240px;
  border: 0;
  outline: 0;
  border-radius: 999px;
  padding: 11px 16px;
  color: #ffffff;
  background: rgba(51, 65, 85, 0.92);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.2);
}

.header-search input::placeholder,
.mobile-search input::placeholder,
.hero-search-form input::placeholder,
.search-panel input::placeholder {
  color: #cbd5e1;
}

.header-search button,
.mobile-search button,
.hero-search-form button,
.search-panel button {
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  color: #ffffff;
  cursor: pointer;
  background: #14b8a6;
  transition: transform 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.hero-search-form button:hover,
.search-panel button:hover {
  transform: translateY(-1px);
  background: #0d9488;
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: #ffffff;
  font-size: 24px;
  background: transparent;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.mobile-menu.is-open {
  display: block;
}

.mobile-menu-inner {
  padding: 18px 0;
}

.mobile-nav-links,
.mobile-cat-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 16px;
}

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 540px;
  overflow: hidden;
  color: #ffffff;
  background: #000000;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.18));
}

.hero-content {
  position: absolute;
  inset: auto 0 0 0;
  padding-bottom: 86px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  background: rgba(20, 184, 166, 0.88);
  box-shadow: 0 18px 36px rgba(20, 184, 166, 0.2);
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 7vw, 72px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 700px;
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.7;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}

.hero-meta span,
.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(14px);
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

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

.primary-btn {
  color: #ffffff;
  background: #14b8a6;
  box-shadow: 0 18px 40px rgba(20, 184, 166, 0.34);
}

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

.ghost-btn {
  color: #ffffff;
  background: rgba(15, 23, 42, 0.55);
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.25);
  backdrop-filter: blur(12px);
}

.ghost-btn:hover {
  transform: translateY(-2px);
  background: rgba(15, 23, 42, 0.78);
}

.hero-control {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.48);
  transform: translateY(-50%);
  transition: background 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.72);
}

.hero-control.prev {
  left: 22px;
}

.hero-control.next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 34px;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

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

.hero-dot.is-active {
  width: 32px;
  background: #14b8a6;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  margin-top: -38px;
  padding: 28px;
  position: relative;
  z-index: 3;
  border-radius: 24px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #115e59);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
}

.search-panel h2,
.search-panel p {
  margin: 0;
}

.search-panel h2 {
  font-size: 28px;
}

.search-panel p {
  margin-top: 8px;
  color: #cbd5e1;
}

.section-block {
  margin-top: 58px;
}

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

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

.section-heading a {
  color: #0d9488;
  font-weight: 800;
}

.section-heading.light h2,
.section-heading.light a {
  color: #ffffff;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 45px rgba(15, 23, 42, 0.15);
}

.card-cover {
  display: block;
  position: relative;
  height: 220px;
  overflow: hidden;
  background: #0f172a;
}

.movie-card.compact .card-cover {
  height: 185px;
}

.movie-card.feature .card-cover {
  height: 250px;
}

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

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

.duration-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
}

.duration-badge {
  right: 10px;
  top: 10px;
  padding: 6px 9px;
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: #64748b;
  font-size: 13px;
}

.card-meta a {
  padding: 5px 9px;
  border-radius: 8px;
  color: #0f766e;
  background: #ccfbf1;
}

.movie-card h2 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h2 a:hover {
  color: #0d9488;
}

.movie-card p {
  min-height: 44px;
  margin: 0 0 12px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.card-tags span,
.detail-tags span {
  padding: 5px 8px;
  border-radius: 999px;
  color: #475569;
  font-size: 12px;
  background: #f1f5f9;
}

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

.category-tile,
.category-card-large a {
  display: block;
  min-height: 132px;
  padding: 20px;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #0f172a, #0f766e);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover,
.category-card-large a:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 42px rgba(15, 23, 42, 0.18);
}

.category-tile span,
.category-card-large span {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.category-tile strong,
.category-card-large p {
  display: block;
  color: #d1fae5;
  line-height: 1.6;
}

.category-card-large h2 {
  margin: 6px 0 10px;
  font-size: 26px;
}

.ranking-strip {
  padding: 32px;
  border-radius: 24px;
  background: linear-gradient(135deg, #111827, #0f766e);
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 52px 96px 1fr auto 70px;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 16px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.2s ease, transform 0.2s ease;
}

.ranking-row:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.18);
}

.ranking-row img {
  width: 96px;
  height: 62px;
  border-radius: 10px;
  object-fit: cover;
}

.ranking-no {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 900;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.ranking-title {
  font-weight: 800;
}

.ranking-meta {
  color: #cbd5e1;
}

.page-hero {
  padding: 84px 0 72px;
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(20, 184, 166, 0.36), transparent 36%), linear-gradient(135deg, #0f172a, #1e293b);
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.8;
}

.category-hero {
  background: radial-gradient(circle at 75% 0%, rgba(34, 211, 238, 0.28), transparent 30%), linear-gradient(135deg, #0f172a, #134e4a);
}

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

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.32;
  filter: blur(4px);
}

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

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #020617, rgba(2, 6, 23, 0.52));
}

.detail-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 38px;
  align-items: end;
  padding: 76px 0;
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.45);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: #cbd5e1;
}

.breadcrumbs a:hover {
  color: #2dd4bf;
}

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

.player-section {
  margin-top: 44px;
}

.video-player-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.22);
}

.movie-video {
  width: 100%;
  min-height: 520px;
  max-height: 76vh;
  display: block;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.2));
}

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

.play-icon {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 32px;
  background: #14b8a6;
  box-shadow: 0 18px 42px rgba(20, 184, 166, 0.38);
}

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

.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 24px;
  margin-top: 32px;
}

.content-panel {
  padding: 28px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.content-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.content-panel p {
  margin: 0;
  color: #475569;
  line-height: 1.9;
}

.site-footer {
  margin-top: 72px;
  color: #cbd5e1;
  background: linear-gradient(180deg, #0f172a, #020617);
}

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

.footer-grid p {
  max-width: 560px;
  color: #94a3b8;
  line-height: 1.8;
}

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

.footer-grid a {
  display: block;
  margin: 9px 0;
  color: #cbd5e1;
}

.footer-grid a:hover {
  color: #2dd4bf;
}

.footer-bottom {
  padding: 20px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  color: #64748b;
  text-align: center;
}

.search-results-section {
  min-height: 420px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 48px;
  border-radius: 22px;
  text-align: center;
  color: #64748b;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

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

  .header-search {
    display: none;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .hero-carousel {
    min-height: 620px;
  }

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

  .hero-control {
    display: none;
  }

  .search-panel {
    grid-template-columns: 1fr;
    margin-top: 20px;
  }

  .search-panel form,
  .hero-search-form,
  .mobile-search {
    width: 100%;
  }

  .search-panel input,
  .hero-search-form input,
  .mobile-search input {
    min-width: 0;
    width: 100%;
  }

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

  .ranking-row {
    grid-template-columns: 42px 72px 1fr 56px;
  }

  .ranking-row img {
    width: 72px;
    height: 52px;
  }

  .ranking-meta {
    display: none;
  }

  .detail-shell {
    grid-template-columns: 1fr;
    padding: 52px 0;
  }

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

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

  .movie-video {
    min-height: 320px;
  }
}

@media (max-width: 560px) {
  .site-shell {
    width: min(100% - 22px, 1180px);
  }

  .nav-shell {
    height: 62px;
  }

  .brand-text small {
    display: none;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

  .hero-copy p,
  .detail-one-line {
    font-size: 16px;
  }

  .feature-grid,
  .compact-grid,
  .category-grid,
  .category-large-grid {
    grid-template-columns: 1fr;
  }

  .card-cover,
  .movie-card.compact .card-cover,
  .movie-card.feature .card-cover {
    height: 230px;
  }

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

  .page-hero {
    padding: 58px 0;
  }

  .ranking-strip {
    padding: 18px;
  }

  .ranking-row {
    grid-template-columns: 38px 1fr 48px;
  }

  .ranking-row img {
    display: none;
  }
}
