:root {
  --teal-50: #f0fdfa;
  --teal-100: #ccfbf1;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --teal-700: #0f766e;
  --cyan-900: #164e63;
  --slate-950: #020617;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #ffffff;
  --shadow-sm: 0 8px 20px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 14px 36px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 24px 70px rgba(15, 23, 42, 0.22);
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--teal-500), #06b6d4);
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(20, 184, 166, 0.28);
  font-size: 15px;
}

.main-nav,
.mobile-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  padding: 9px 14px;
  color: var(--gray-600);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--teal-700);
  background: var(--teal-50);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  color: var(--gray-900);
  background: var(--gray-100);
  border: 0;
  border-radius: 12px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  flex-wrap: wrap;
}

.hero {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: linear-gradient(135deg, #134e4a, var(--cyan-900));
}

.hero-bg,
.detail-hero-bg {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.4), rgba(2, 6, 23, 0.76)), var(--hero-image);
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
}

.hero-bg::after,
.detail-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(20, 184, 166, 0.36), transparent 36%), linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.38));
}

.hero-inner {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 720px;
  color: var(--white);
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  margin-bottom: 18px;
  color: var(--white);
  background: rgba(20, 184, 166, 0.92);
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 16px 30px rgba(20, 184, 166, 0.24);
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.hero-lead,
.page-hero p,
.detail-copy p {
  max-width: 720px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-meta,
.detail-meta-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.hero-meta span,
.detail-meta-list li {
  padding: 7px 12px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(15, 23, 42, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.detail-meta-list span {
  opacity: 0.72;
  margin-right: 6px;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.hero-tags span,
.tag-row em,
.detail-tags span {
  padding: 6px 10px;
  color: var(--gray-700);
  background: var(--gray-100);
  border-radius: 999px;
  font-size: 13px;
  font-style: normal;
  font-weight: 700;
}

.hero-tags span,
.detail-tags span {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.16);
}

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

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

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

.primary-button:hover,
.quick-search-form button:hover,
.search-hero-form button:hover {
  background: var(--teal-700);
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(13, 148, 136, 0.34);
}

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

.quick-search-section {
  background: var(--white);
}

.quick-search-box {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 28px;
  align-items: center;
  margin-top: -56px;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 22px;
  box-shadow: var(--shadow-md);
}

.quick-search-box h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 34px);
}

.quick-search-box p {
  margin: 0;
  color: var(--gray-600);
}

.quick-search-form,
.search-hero-form {
  display: flex;
  gap: 10px;
}

.quick-search-form input,
.search-hero-form input,
.filter-panel input,
.filter-panel select,
.search-tools input,
.search-tools select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: var(--gray-900);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.quick-search-form input:focus,
.search-hero-form input:focus,
.filter-panel input:focus,
.filter-panel select:focus,
.search-tools input:focus,
.search-tools select:focus {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

.content-section {
  padding: 70px 0;
  background: var(--white);
}

.section-accent,
.ranking-slice,
.category-entry-section {
  background: linear-gradient(135deg, var(--gray-50), var(--gray-100));
}

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

.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title-wrap h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.section-icon {
  color: var(--teal-600);
  font-size: 21px;
}

.section-more {
  color: var(--teal-700);
  font-weight: 800;
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(229, 231, 235, 0.88);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(20, 184, 166, 0.34);
  box-shadow: var(--shadow-md);
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
}

.compact-card .poster-wrap {
  aspect-ratio: 16 / 11;
}

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

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

.poster-year,
.poster-play {
  position: absolute;
  color: var(--white);
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
}

.poster-year {
  top: 10px;
  right: 10px;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.poster-play {
  left: 50%;
  top: 50%;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 999px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

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

.movie-card-body h3 {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 9px;
  overflow: hidden;
  color: var(--gray-900);
  font-size: 17px;
  line-height: 1.4;
  font-weight: 800;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card:hover h3 {
  color: var(--teal-700);
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--gray-600);
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--gray-500);
  font-size: 13px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, #134e4a, var(--cyan-900));
}

.compact-page-hero {
  padding: 82px 0 74px;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 20%, rgba(20, 184, 166, 0.38), transparent 34%), radial-gradient(circle at 85% 30%, rgba(6, 182, 212, 0.2), transparent 30%);
}

.page-hero .container {
  position: relative;
}

.breadcrumb {
  display: inline-flex;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
}

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

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

.category-card {
  display: block;
  min-height: 170px;
  padding: 24px;
  color: var(--gray-900);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(20, 184, 166, 0.34);
  box-shadow: var(--shadow-md);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 24px;
}

.category-card p {
  margin: 0 0 16px;
  color: var(--gray-600);
}

.category-card span {
  color: var(--teal-700);
  font-weight: 800;
}

.filter-panel,
.search-tools {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 28px;
  padding: 18px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
}

.empty-state {
  display: none;
  padding: 30px;
  margin-top: 22px;
  color: var(--gray-600);
  text-align: center;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
}

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

.editor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.editor-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.editor-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.editor-poster {
  position: relative;
  height: 250px;
  background: var(--gray-100);
}

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

.editor-poster span {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  color: var(--white);
  background: var(--teal-500);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.editor-body {
  padding: 20px;
}

.editor-body h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

.editor-body p {
  display: -webkit-box;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--gray-600);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.rank-item {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(20, 184, 166, 0.34);
}

.rank-item strong,
.ranking-number {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--teal-500), #06b6d4);
  border-radius: 11px;
}

.rank-item span {
  font-weight: 800;
}

.rank-item em {
  color: var(--gray-500);
  font-style: normal;
  font-size: 13px;
}

.ranking-grid {
  display: grid;
  gap: 16px;
}

.ranking-card a {
  display: grid;
  grid-template-columns: 52px 118px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.ranking-card a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.ranking-card img {
  width: 118px;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 12px;
  background: var(--gray-100);
}

.ranking-info h2 {
  margin: 0 0 8px;
  font-size: 21px;
}

.ranking-info p {
  display: -webkit-box;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--gray-600);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.detail-hero {
  min-height: 560px;
}

.detail-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 44px;
  align-items: center;
  min-height: 560px;
  padding: 64px 0;
}

.detail-cover {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 24px;
  box-shadow: var(--shadow-xl);
}

.detail-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.12);
}

.breadcrumb-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

.player-section {
  padding: 58px 0;
  background: var(--slate-950);
}

.player-card {
  position: relative;
  overflow: hidden;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  box-shadow: var(--shadow-xl);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.78));
  border: 0;
  text-align: center;
}

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

.play-circle {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  color: var(--white);
  background: var(--teal-600);
  border-radius: 999px;
  box-shadow: 0 18px 40px rgba(13, 148, 136, 0.36);
  font-size: 28px;
}

.player-overlay strong {
  max-width: min(680px, 90%);
  font-size: clamp(22px, 3vw, 34px);
}

.detail-content-section {
  padding: 70px 0 20px;
  background: var(--white);
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 34px;
}

.detail-main-content,
.detail-side {
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.detail-main-content h2,
.detail-side h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.detail-main-content p {
  margin: 0 0 24px;
  color: var(--gray-700);
  font-size: 17px;
}

.side-meta {
  padding: 0;
  margin: 0 0 18px;
  list-style: none;
}

.side-meta li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-200);
}

.side-meta span {
  color: var(--gray-500);
}

.side-link {
  display: flex;
  justify-content: center;
  padding: 12px 16px;
  color: var(--teal-700);
  background: var(--teal-50);
  border-radius: 12px;
  font-weight: 800;
}

.search-hero-form {
  max-width: 680px;
}

.site-footer {
  color: rgba(255, 255, 255, 0.76);
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 1.2fr;
  gap: 28px;
  padding: 42px 0;
}

.footer-brand {
  color: var(--white);
  margin-bottom: 12px;
}

.footer-grid p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

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

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

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

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

  .menu-toggle {
    display: grid;
    place-items: center;
  }

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

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

  .detail-cover {
    width: min(320px, 100%);
  }

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

  .filter-panel,
  .search-tools {
    grid-template-columns: 1fr;
  }

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

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

  .header-inner {
    height: 64px;
  }

  .brand {
    font-size: 18px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .hero,
  .hero-inner,
  .detail-hero,
  .detail-hero-inner {
    min-height: auto;
  }

  .hero-inner,
  .detail-hero-inner {
    padding: 88px 0 68px;
  }

  .hero-meta,
  .detail-meta-list {
    gap: 8px;
  }

  .quick-search-box {
    margin-top: -32px;
    padding: 20px;
  }

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

  .content-section {
    padding: 46px 0;
  }

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

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

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

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

  .movie-card-body h3 {
    font-size: 15px;
  }

  .movie-card-body p {
    font-size: 13px;
  }

  .ranking-card a {
    grid-template-columns: 42px 90px 1fr;
    gap: 12px;
    padding: 12px;
  }

  .ranking-card img {
    width: 90px;
  }

  .ranking-info h2 {
    font-size: 17px;
  }

  .ranking-info p {
    display: none;
  }

  .detail-main-content,
  .detail-side {
    padding: 20px;
  }

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