:root {
  --teal: #14b8a6;
  --teal-dark: #0f766e;
  --cyan: #06b6d4;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #f8fafc;
  --line: #e2e8f0;
  --card: #ffffff;
  --radius: 1.25rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

img {
  max-width: 100%;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(226, 232, 240, 0.82);
  backdrop-filter: blur(16px);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 72px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-text {
  font-size: 1.35rem;
  background: linear-gradient(90deg, var(--teal-dark), var(--cyan));
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 16px 30px rgba(20, 184, 166, 0.24);
  font-size: 0.8rem;
}

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

.nav-link,
.mobile-link {
  font-weight: 700;
  color: #334155;
  transition: color 0.2s ease;
}

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

.header-search,
.mobile-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select,
.search-panel input {
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 11px 16px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus,
.search-panel input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

.header-search button,
.mobile-search button,
.search-panel button {
  border: 0;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  cursor: pointer;
}

.menu-button {
  display: none;
  border: 0;
  border-radius: 12px;
  width: 42px;
  height: 42px;
  color: var(--ink);
  background: #ecfeff;
  font-size: 1.4rem;
}

.mobile-menu {
  display: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px 18px;
  gap: 14px;
  flex-direction: column;
}

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

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

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  transition: opacity 1s ease;
}

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

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1280px) / 2 + 24px));
  right: 24px;
  bottom: 76px;
  max-width: 720px;
  color: white;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.9);
  font-weight: 800;
  box-shadow: 0 18px 36px rgba(20, 184, 166, 0.28);
}

.hero-content h1 {
  margin: 0;
  max-width: 12em;
  font-size: clamp(2.5rem, 6vw, 5.6rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

.hero-content p {
  margin: 22px 0 0;
  max-width: 620px;
  color: #e2e8f0;
  font-size: 1.12rem;
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}

.hero-meta span,
.detail-meta span,
.page-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-button,
.ghost-button,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  padding: 14px 30px;
  color: white;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  box-shadow: 0 20px 42px rgba(20, 184, 166, 0.28);
}

.ghost-button {
  padding: 13px 26px;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.small-button {
  padding: 10px 16px;
  color: var(--teal-dark);
  background: #ccfbf1;
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(2, 6, 23, 0.56);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 2rem;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

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

.hero-dot.is-active {
  width: 36px;
  background: white;
}

.hero-rail {
  position: absolute;
  right: max(24px, calc((100vw - 1280px) / 2 + 24px));
  bottom: 76px;
  width: 310px;
  display: grid;
  gap: 12px;
}

.hero-thumb {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  color: white;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  opacity: 0.72;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.hero-thumb.is-active,
.hero-thumb:hover {
  opacity: 1;
  transform: translateX(-4px);
}

.hero-thumb img {
  width: 72px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  background: linear-gradient(135deg, #0f766e, #0891b2);
}

.hero-thumb span {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-weight: 800;
}

.page-section,
.page-hero,
.detail-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px;
}

.page-hero {
  padding-top: 64px;
}

.page-hero-card {
  border-radius: 32px;
  padding: clamp(28px, 5vw, 60px);
  color: white;
  background: radial-gradient(circle at 18% 20%, rgba(34, 211, 238, 0.32), transparent 30%), linear-gradient(135deg, #0f766e, #0f172a 58%, #0891b2);
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.18);
}

.page-hero-card h1,
.section-heading h2,
.detail-title h1 {
  margin: 0;
  letter-spacing: -0.04em;
}

.page-hero-card h1 {
  font-size: clamp(2rem, 4vw, 4.5rem);
}

.page-hero-card p {
  max-width: 760px;
  margin-top: 16px;
  color: #dffafe;
  line-height: 1.9;
}

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

.section-heading h2 {
  font-size: clamp(1.6rem, 2.5vw, 2.25rem);
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.feature-panel {
  padding: 34px;
  border-radius: 32px;
  background: linear-gradient(135deg, #f1f5f9, #ecfeff);
}

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: var(--card);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-card-large {
  grid-column: span 2;
}

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

.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: radial-gradient(circle at 20% 20%, rgba(20, 184, 166, 0.46), transparent 35%), linear-gradient(135deg, #0f172a, #155e75);
}

.movie-card-large .poster {
  aspect-ratio: 16 / 9;
}

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

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

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.78));
  opacity: 0.82;
}

.poster-year,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  border-radius: 999px;
  padding: 5px 10px;
  color: white;
  font-size: 0.78rem;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(6px);
}

.poster-year {
  left: 12px;
}

.rank-badge {
  right: 12px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-style: normal;
}

.poster-play {
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  color: white;
  background: rgba(20, 184, 166, 0.92);
  box-shadow: 0 12px 28px rgba(20, 184, 166, 0.28);
}

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

.movie-card-body h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.movie-meta {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.movie-one-line {
  margin: 10px 0 0;
  min-height: 42px;
  color: #475569;
  line-height: 1.55;
  font-size: 0.92rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row span,
.category-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--teal-dark);
  background: #ccfbf1;
  font-size: 0.78rem;
  font-weight: 800;
}

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

.category-card {
  min-height: 180px;
  padding: 24px;
  border-radius: 28px;
  color: white;
  background: linear-gradient(135deg, #0f766e, #0f172a);
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.16);
  transition: transform 0.2s ease;
}

.category-card:nth-child(3n + 2) {
  background: linear-gradient(135deg, #0891b2, #0f172a);
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, #155e75, #134e4a);
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 1.45rem;
}

.category-card p {
  margin: 0;
  color: #e0f2fe;
  line-height: 1.75;
}

.category-card strong {
  display: inline-flex;
  margin-top: 18px;
  font-size: 0.95rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
}

.filter-bar input {
  min-width: min(340px, 100%);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--teal-dark);
  background: #ccfbf1;
  font-weight: 900;
}

.pagination span {
  color: white;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
}

.detail-hero {
  background: #020617;
}

.detail-wrap {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.86fr);
  gap: 28px;
}

.player-card,
.detail-card,
.side-card,
.search-panel {
  border-radius: 28px;
  background: white;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.1);
  overflow: hidden;
}

.player-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: radial-gradient(circle at 20% 20%, rgba(20, 184, 166, 0.35), transparent 35%), #020617;
}

.player-frame video {
  width: 100%;
  height: 100%;
  background: #020617;
}

.watch-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background-position: center;
  background-size: cover;
  cursor: pointer;
}

.watch-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.78));
}

.watch-cover span {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--teal), var(--cyan));
  font-size: 2.2rem;
  box-shadow: 0 24px 50px rgba(20, 184, 166, 0.3);
}

.watch-cover.is-hidden {
  display: none;
}

.detail-title,
.detail-card,
.side-card,
.search-panel {
  padding: 24px;
}

.detail-title h1 {
  font-size: clamp(2rem, 4vw, 4rem);
  color: white;
}

.detail-title p {
  margin: 18px 0 0;
  color: #cbd5e1;
  line-height: 1.8;
}

.detail-card h2,
.side-card h2,
.search-panel h1,
.search-panel h2 {
  margin: 0 0 16px;
  font-size: 1.45rem;
}

.detail-card p {
  color: #334155;
  line-height: 1.95;
}

.detail-card + .detail-card {
  margin-top: 18px;
}

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

.side-item {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 12px;
  align-items: center;
}

.side-item img {
  width: 86px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  background: linear-gradient(135deg, #0f766e, #155e75);
}

.side-item h3 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.35;
}

.side-item p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.search-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 24px;
}

.search-panel form {
  display: flex;
  gap: 12px;
}

.search-panel input {
  flex: 1;
}

.search-results {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.search-result-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 16px;
  border-radius: 22px;
  background: white;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
}

.search-result-card img {
  width: 120px;
  height: 78px;
  border-radius: 16px;
  object-fit: cover;
  background: linear-gradient(135deg, #0f766e, #0891b2);
}

.search-result-card h3 {
  margin: 0 0 8px;
}

.search-result-card p {
  margin: 0;
  color: #475569;
  line-height: 1.65;
}

.site-footer {
  margin-top: 48px;
  padding: 50px 24px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
}

.footer-brand {
  color: white;
  font-size: 1.25rem;
}

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

.site-footer h3 {
  margin: 0 0 14px;
  color: white;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin: 8px 0;
  color: #cbd5e1;
}

.site-footer a:hover {
  color: #5eead4;
}

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

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

  .hero-rail {
    display: none;
  }
}

@media (max-width: 900px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-button {
    display: grid;
    place-items: center;
    margin-left: auto;
  }

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

  .hero-content {
    left: 24px;
    bottom: 84px;
  }

  .hero-arrow {
    display: none;
  }

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

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

@media (max-width: 640px) {
  .header-inner {
    min-height: 64px;
    padding: 0 16px;
  }

  .brand-text {
    font-size: 1.05rem;
  }

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

  .hero-content {
    left: 18px;
    right: 18px;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero-actions,
  .search-panel form {
    flex-direction: column;
  }

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

  .page-section,
  .page-hero,
  .detail-wrap,
  .search-page {
    padding-left: 16px;
    padding-right: 16px;
  }

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

  .movie-card-large {
    grid-column: span 2;
  }

  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-bar input,
  .filter-bar select {
    width: 100%;
  }

  .search-result-card {
    grid-template-columns: 90px 1fr;
  }

  .search-result-card img {
    width: 90px;
    height: 66px;
  }
}
