* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f8fafc;
  color: #0f172a;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.container-custom {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

.nav-bar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  color: #0f172a;
}

.logo-mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #0d9488, #0891b2);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(13, 148, 136, 0.28);
}

.logo-text {
  font-size: 1.18rem;
  letter-spacing: 0.03em;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link {
  padding: 0.7rem 0.95rem;
  border-radius: 0.75rem;
  color: #475569;
  font-weight: 600;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: #0f766e;
  background: #ccfbf1;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0.75rem;
  background: #f1f5f9;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: #0f172a;
}

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

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

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(20, 184, 166, 0.3), transparent 32%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.72) 45%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.08) 62%);
}

.hero-content {
  position: relative;
  z-index: 3;
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding-top: 7rem;
  padding-bottom: 8.25rem;
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 1rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid rgba(94, 234, 212, 0.35);
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.22);
  color: #5eead4;
  font-size: 0.9rem;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.hero-content h1,
.hero-content h2 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5.5rem);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-content .hero-movie-title {
  margin-top: 0.85rem;
  font-size: clamp(1.7rem, 4vw, 3.25rem);
  color: #f8fafc;
}

.hero-subtitle {
  margin: 0.75rem 0 0;
  color: #99f6e4;
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 700;
}

.hero-content p {
  max-width: 720px;
  margin: 1rem 0 0;
  color: #cbd5e1;
  font-size: 1.1rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.35rem;
  color: #e2e8f0;
}

.hero-meta span {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.7rem;
}

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.68rem 1.35rem;
  border-radius: 0.75rem;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: #0d9488;
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(13, 148, 136, 0.32);
}

.btn-primary:hover {
  background: #0f766e;
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(13, 148, 136, 0.42);
}

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

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 6;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 2.3rem;
  line-height: 1;
  backdrop-filter: blur(10px);
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.24);
  transform: translateY(-50%) scale(1.05);
}

.hero-prev {
  left: 1.5rem;
}

.hero-next {
  right: 1.5rem;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #ffffff;
}

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 1.75rem;
  z-index: 8;
  display: flex;
  width: min(680px, calc(100% - 2rem));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

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

.hero-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.hero-search button {
  border: 0;
  padding: 0 1.35rem;
  background: #0d9488;
  color: #ffffff;
  font-weight: 800;
}

.hero-category-strip {
  position: absolute;
  right: max(1rem, calc((100vw - 1280px) / 2 + 1rem));
  bottom: 7.9rem;
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  max-width: 420px;
}

.hero-category-strip a {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
}

.content-section {
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-title {
  margin: 0;
  color: #1e293b;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.2;
  font-weight: 900;
}

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

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

.video-card {
  overflow: hidden;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-poster {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #134e4a);
}

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

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

.card-type,
.card-rating,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.card-type {
  left: 0.75rem;
  top: 0.75rem;
  padding: 0.28rem 0.62rem;
  background: rgba(15, 23, 42, 0.66);
  color: #ffffff;
}

.card-rating {
  right: 0.75rem;
  top: 0.75rem;
  padding: 0.28rem 0.62rem;
  background: #f59e0b;
  color: #111827;
}

.rank-badge {
  left: 0.75rem;
  bottom: 0.75rem;
  min-width: 34px;
  height: 34px;
  background: #0d9488;
  color: #ffffff;
}

.card-body {
  padding: 1rem;
}

.card-body h3 {
  margin: 0;
  color: #0f172a;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 900;
}

.card-body p {
  display: -webkit-box;
  min-height: 3em;
  margin: 0.55rem 0 0;
  overflow: hidden;
  color: #64748b;
  font-size: 0.92rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-top: 0.85rem;
  color: #475569;
  font-size: 0.82rem;
}

.card-meta span {
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: #f1f5f9;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.card-tags span,
.tag-badge {
  display: inline-flex;
  border-radius: 999px;
  background: #ccfbf1;
  color: #0f766e;
  font-size: 0.76rem;
  font-weight: 700;
}

.card-tags span {
  padding: 0.18rem 0.5rem;
}

.tag-badge {
  padding: 0.28rem 0.68rem;
}

.category-strip-section {
  padding: 3.5rem 0;
  background: linear-gradient(135deg, #f0fdfa, #ecfeff);
}

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

.category-card {
  position: relative;
  min-height: 118px;
  overflow: hidden;
  border-radius: 1rem;
  background: #0f172a;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 118px;
  object-fit: cover;
  opacity: 0.54;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.category-card span {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 900;
  text-align: center;
}

.category-card:hover img {
  opacity: 0.72;
  transform: scale(1.08);
}

.page-hero {
  padding: 5rem 0 3.5rem;
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 20%, rgba(20, 184, 166, 0.32), transparent 34%),
    linear-gradient(135deg, #0f172a, #134e4a 58%, #0e7490);
}

.page-hero h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 1rem 0 0;
  color: #ccfbf1;
  font-size: 1.05rem;
}

.category-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.5rem;
}

.category-pill-list a {
  padding: 0.45rem 0.78rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
  font-weight: 700;
}

.category-nav-list {
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.category-nav-list a {
  background: #ccfbf1;
  color: #0f766e;
}

.category-nav-list a.is-active {
  background: #0d9488;
  color: #ffffff;
}

.toolbar {
  display: flex;
  margin-bottom: 1.4rem;
}

.catalog-search {
  width: min(100%, 560px);
  border: 1px solid #cbd5e1;
  border-radius: 0.85rem;
  outline: 0;
  padding: 0.88rem 1rem;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.catalog-search:focus {
  border-color: #14b8a6;
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

.empty-state {
  display: none;
  padding: 3rem 0;
  color: #64748b;
  font-size: 1.1rem;
  text-align: center;
}

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

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

.compact-card {
  display: grid;
  grid-template-columns: auto 128px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem;
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.compact-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.compact-card img {
  width: 128px;
  aspect-ratio: 16 / 9;
  border-radius: 0.75rem;
  object-fit: cover;
  background: #0f172a;
}

.compact-card h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
}

.compact-card p {
  display: -webkit-box;
  margin: 0.25rem 0;
  overflow: hidden;
  color: #64748b;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.compact-card span {
  color: #64748b;
  font-size: 0.88rem;
}

.compact-card strong {
  color: #f59e0b;
  font-size: 1.1rem;
}

.compact-rank {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #0d9488;
  color: #ffffff !important;
  font-weight: 900;
}

.detail-main {
  background: #f8fafc;
}

.detail-top {
  padding: 2rem 0;
  background: linear-gradient(135deg, #0f172a, #134e4a);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
  gap: 1.5rem;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 1.2rem;
  background: #020617;
  box-shadow: 0 22px 52px rgba(2, 6, 23, 0.35);
  aspect-ratio: 16 / 9;
}

.movie-player {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  border: 0;
  background: radial-gradient(circle at center, rgba(15, 118, 110, 0.18), rgba(2, 6, 23, 0.58));
  color: #ffffff;
}

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

.player-overlay span {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #0d9488;
  color: #ffffff;
  font-size: 2rem;
  box-shadow: 0 18px 40px rgba(13, 148, 136, 0.34);
}

.player-overlay strong {
  font-size: 1.2rem;
}

.detail-side-card {
  overflow: hidden;
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.24);
}

.detail-side-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #0f172a;
}

.detail-side-card div {
  padding: 1.2rem;
}

.detail-side-card h1 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.25;
  font-weight: 900;
}

.detail-side-card p {
  margin: 0.8rem 0 0;
  color: #475569;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
}

.detail-content {
  padding-top: 2rem;
}

.detail-article {
  padding: 1.5rem;
  border-radius: 1.2rem;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.3rem;
}

.detail-meta-grid a,
.detail-meta-grid span {
  padding: 0.75rem;
  border-radius: 0.9rem;
  background: #f1f5f9;
  color: #0f766e;
  font-weight: 800;
  text-align: center;
}

.detail-article h2 {
  margin: 1.5rem 0 0.6rem;
  color: #0f172a;
  font-size: 1.35rem;
  font-weight: 900;
}

.detail-article h2:first-of-type {
  margin-top: 0;
}

.detail-article p {
  margin: 0;
  color: #334155;
  font-size: 1.03rem;
}

.site-footer {
  margin-top: 2rem;
  background: #0f172a;
  color: #cbd5e1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  padding-top: 3rem;
  padding-bottom: 2.4rem;
}

.footer-logo {
  color: #ffffff;
}

.site-footer p {
  max-width: 520px;
  margin: 1rem 0 0;
}

.site-footer h2 {
  margin: 0 0 1rem;
  color: #ffffff;
  font-size: 1rem;
}

.footer-links {
  display: grid;
  gap: 0.55rem;
}

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

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

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

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

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

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: 72px;
    left: 1rem;
    right: 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.14);
  }

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

  .hero-arrow {
    display: none;
  }

  .hero-category-strip {
    display: none;
  }

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

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

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

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

@media (max-width: 620px) {
  .container-custom {
    padding-left: 0.9rem;
    padding-right: 0.9rem;
  }

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

  .hero-content {
    padding-bottom: 8.7rem;
  }

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

  .hero-actions {
    width: 100%;
  }

  .btn-primary,
  .btn-ghost {
    flex: 1 1 100%;
  }

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

  .compact-card {
    grid-template-columns: auto 96px minmax(0, 1fr);
  }

  .compact-card strong {
    display: none;
  }

  .compact-card img {
    width: 96px;
  }

  .detail-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
