:root {
  --teal-950: #042f2e;
  --teal-900: #134e4a;
  --teal-800: #115e59;
  --teal-700: #0f766e;
  --teal-600: #0d9488;
  --teal-500: #14b8a6;
  --teal-100: #ccfbf1;
  --amber-500: #f59e0b;
  --red-600: #dc2626;
  --gray-950: #030712;
  --gray-900: #111827;
  --gray-800: #1f2937;
  --gray-700: #374151;
  --gray-600: #4b5563;
  --gray-500: #6b7280;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --white: #ffffff;
  --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 55px rgba(15, 23, 42, 0.16);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--gray-800);
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 42%, #f8fafc 100%);
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--white);
  background: linear-gradient(90deg, var(--teal-700), var(--teal-900));
  box-shadow: 0 10px 35px rgba(4, 47, 46, 0.24);
}

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

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: var(--teal-900);
  background: var(--teal-100);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

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

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

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

.menu-button {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  color: inherit;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.menu-button span {
  width: 20px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
}

.mobile-menu {
  display: none;
  padding: 0 16px 16px;
}

.mobile-menu.open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
}

.mobile-link:hover,
.mobile-link.active {
  background: rgba(255, 255, 255, 0.12);
}

.top-category-strip {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(4, 47, 46, 0.2);
}

.top-category-inner {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 10px 0;
  font-size: 14px;
  scrollbar-width: none;
}

.top-category-inner::-webkit-scrollbar {
  display: none;
}

.top-category-inner a {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.88);
}

.top-category-inner a:hover {
  color: var(--white);
}

.main-wrap {
  padding: 32px 0 0;
}

.hero {
  position: relative;
  height: 560px;
  margin-bottom: 28px;
  overflow: hidden;
  border-radius: 28px;
  background: var(--gray-900);
  box-shadow: var(--shadow-lg);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.48) 48%, rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  left: clamp(22px, 6vw, 72px);
  bottom: clamp(36px, 9vw, 86px);
  width: min(650px, calc(100% - 44px));
  color: var(--white);
}

.hero-kicker,
.hero-tags,
.card-meta,
.detail-meta,
.tag-row,
.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.hero-kicker span,
.hero-tags span,
.tag-row span,
.detail-tags a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.hero h1 {
  margin: 18px 0 16px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 620px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.primary-button,
.ghost-button,
.home-search button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-button,
.home-search button {
  color: var(--white);
  background: var(--teal-600);
  box-shadow: 0 14px 28px rgba(13, 148, 136, 0.28);
}

.primary-button:hover,
.home-search button:hover {
  transform: translateY(-1px);
  background: var(--teal-700);
}

.ghost-button {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.22);
}

.hero-dots {
  position: absolute;
  right: 28px;
  bottom: 28px;
  display: flex;
  gap: 9px;
}

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

.hero-dot.active {
  width: 34px;
  background: var(--white);
}

.home-search,
.filter-panel,
.page-hero,
.detail-card,
.side-info,
.category-card {
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.home-search {
  margin-bottom: 48px;
  padding: 18px;
}

.home-search form,
.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-search input,
.search-box input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 0 20px;
  outline: none;
  color: var(--gray-800);
  background: #f9fafb;
}

.home-search input:focus,
.search-box input:focus {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.content-section {
  margin-bottom: 56px;
}

.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-title h2,
.page-hero h1,
.detail-card h1 {
  margin: 0;
  color: var(--gray-800);
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.section-title a,
.text-link {
  color: var(--teal-700);
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--gray-200);
}

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.7));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-gradient {
  opacity: 1;
}

.card-play,
.poster-badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.card-play {
  left: 50%;
  top: 50%;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  color: var(--white);
  background: rgba(13, 148, 136, 0.92);
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.poster-badge {
  right: 12px;
  top: 12px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(17, 24, 39, 0.72);
  font-size: 13px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.card-body {
  padding: 16px;
}

.movie-card h2 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.movie-card h2 a:hover,
.rank-content h2 a:hover {
  color: var(--teal-700);
}

.movie-card p,
.rank-content p,
.category-card p,
.page-hero p,
.detail-card p,
.side-info p,
.site-footer p {
  color: var(--gray-600);
  line-height: 1.75;
}

.movie-card p {
  min-height: 3.4em;
  margin: 0 0 12px;
  font-size: 14px;
}

.card-meta {
  gap: 8px 12px;
  color: var(--gray-500);
  font-size: 13px;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  min-height: 24px;
  color: var(--teal-800);
  background: #ecfeff;
  font-size: 12px;
}

.compact .card-body {
  padding: 13px;
}

.compact h2 {
  font-size: 15px;
}

.compact p {
  font-size: 13px;
}

.category-grid,
.category-overview-grid {
  display: grid;
  gap: 18px;
}

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

.category-tile {
  display: grid;
  gap: 10px;
  min-height: 130px;
  padding: 22px;
  border-radius: 22px;
  color: var(--white);
  background: linear-gradient(135deg, var(--teal-700), var(--teal-950));
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.category-tile span {
  font-size: 22px;
  font-weight: 900;
}

.category-tile strong {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.6;
}

.page-hero {
  display: grid;
  gap: 14px;
  margin-bottom: 26px;
  padding: clamp(26px, 5vw, 44px);
  background: linear-gradient(135deg, #ffffff 0%, #ecfeff 100%);
}

.slim-hero {
  min-height: 190px;
  align-items: center;
}

.category-hero {
  min-height: 220px;
}

.breadcrumb {
  margin: 0 0 18px;
  color: var(--gray-500);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--teal-700);
}

.filter-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 26px;
  padding: 18px;
}

.search-box span {
  width: 40px;
  text-align: center;
  font-size: 20px;
}

.filter-chips button {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: var(--gray-700);
  background: var(--gray-100);
  cursor: pointer;
}

.filter-chips button.active,
.filter-chips button:hover {
  color: var(--white);
  background: var(--teal-700);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 96px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.compact-rank .rank-item:nth-child(n + 7) {
  display: none;
}

.rank-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: var(--white);
  background: linear-gradient(135deg, var(--teal-600), var(--teal-900));
  font-size: 20px;
  font-weight: 900;
}

.rank-thumb {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
  background: var(--gray-200);
}

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

.rank-content h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.rank-content p {
  margin: 0 0 8px;
  font-size: 14px;
}

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

.category-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
}

.category-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-card-posters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.category-card-posters img {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  object-fit: cover;
  background: var(--gray-200);
}

.detail-wrap {
  padding-top: 28px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--shadow-lg);
}

.movie-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.62));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-play {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  color: var(--white);
  background: var(--teal-600);
  box-shadow: 0 18px 36px rgba(20, 184, 166, 0.32);
  font-size: 28px;
}

.detail-card {
  margin-top: 22px;
  padding: clamp(22px, 4vw, 34px);
}

.detail-meta {
  margin: 14px 0 20px;
}

.detail-meta span {
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--gray-700);
  background: var(--gray-100);
  font-size: 14px;
  font-weight: 700;
}

.lead-text {
  padding: 18px;
  border-radius: 18px;
  color: var(--teal-900) !important;
  background: #ecfeff;
  font-size: 18px;
  font-weight: 700;
}

.detail-card h2,
.side-info h2 {
  margin: 28px 0 10px;
  font-size: 22px;
  color: var(--gray-800);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}

.detail-tags a {
  color: var(--teal-800);
  background: #ecfeff;
}

.side-poster {
  display: block;
  overflow: hidden;
  border-radius: 22px;
  background: var(--gray-200);
  box-shadow: var(--shadow-md);
}

.side-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.side-info {
  margin-top: 20px;
  padding: 22px;
}

.side-info h2 {
  margin-top: 0;
}

.full-button {
  width: 100%;
  margin-top: 14px;
}

.site-footer {
  margin-top: 72px;
  color: #d1d5db;
  background: var(--gray-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 34px;
  padding: 44px 0;
}

.footer-brand {
  color: var(--white);
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 18px;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a:hover {
  color: var(--teal-100);
}

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: #9ca3af;
  font-size: 14px;
}

.hidden-by-filter {
  display: none !important;
}

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

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

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

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

  .detail-side {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
  }

  .side-info {
    margin-top: 0;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .nav-links {
    display: none;
  }

  .menu-button {
    display: flex;
  }

  .hero {
    height: 620px;
    border-radius: 22px;
  }

  .hero-shade {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.86));
  }

  .hero-content {
    left: 20px;
    right: 20px;
    bottom: 58px;
    width: auto;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-dots {
    left: 20px;
    right: auto;
    bottom: 22px;
  }

  .home-search form {
    flex-direction: column;
  }

  .home-search button {
    width: 100%;
  }

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

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

  .category-card {
    grid-template-columns: 1fr;
  }

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

  .rank-item .text-link {
    grid-column: 2 / -1;
    justify-content: flex-start;
    padding-left: 0;
  }

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

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

@media (max-width: 480px) {
  .brand {
    font-size: 19px;
  }

  .hero {
    height: 580px;
  }

  .hero-actions a {
    width: 100%;
  }

  .movie-grid,
  .small-grid,
  .category-movie-grid,
  .category-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 40px 72px minmax(0, 1fr);
    gap: 12px;
  }
}
