:root {
  --teal-900: #0f3f3f;
  --teal-800: #115e59;
  --teal-700: #0f766e;
  --teal-600: #0d9488;
  --teal-500: #14b8a6;
  --amber: #f59e0b;
  --red: #ef4444;
  --ink: #172033;
  --muted: #64748b;
  --line: #e5e7eb;
  --soft: #f8fafc;
  --white: #ffffff;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

button,
input,
select {
  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 30px rgba(15, 63, 63, 0.25);
}

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

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

.brand {
  font-size: 22px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: var(--teal-900);
  background: linear-gradient(135deg, #ffffff, #99f6e4);
  box-shadow: inset 0 -6px 14px rgba(13, 148, 136, 0.24);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-weight: 700;
}

.nav-links a,
.category-strip a,
.mobile-panel a {
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.category-strip a:hover,
.mobile-panel a:hover {
  color: #bff7ef;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 2px;
  background: var(--white);
}

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

.category-strip-inner {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 10px 0;
  font-size: 14px;
  white-space: nowrap;
}

.mobile-panel {
  display: none;
}

.hero {
  padding: 30px 0 0;
}

.hero-frame {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
  background: radial-gradient(circle at 15% 20%, rgba(20, 184, 166, 0.45), transparent 30%), linear-gradient(135deg, #062826, #111827);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: saturate(1.08);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.58) 45%, rgba(0, 0, 0, 0.18) 100%), radial-gradient(circle at 70% 30%, rgba(20, 184, 166, 0.32), transparent 34%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 720px;
  min-height: 560px;
  padding: 58px;
  color: var(--white);
}

.eyebrow,
.hero-tags,
.detail-meta,
.movie-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.eyebrow span,
.hero-tags span,
.tag-row span,
.detail-meta span,
.detail-meta a,
.movie-meta span,
.movie-meta a {
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 13px;
}

.eyebrow span:first-child {
  color: var(--white);
  background: var(--teal-600);
}

.eyebrow span:last-child {
  color: #111827;
  background: var(--amber);
}

.hero-copy h1 {
  margin: 18px 0 16px;
  max-width: 680px;
  font-size: clamp(34px, 7vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero-copy p {
  max-width: 660px;
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: 18px;
}

.hero-tags span {
  color: #ecfeff;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.hero-actions,
.section-head,
.search-entry,
.filter-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.hero-actions {
  justify-content: flex-start;
  margin-top: 30px;
}

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

.primary-btn {
  color: var(--white);
  background: linear-gradient(135deg, var(--teal-600), var(--teal-800));
  box-shadow: 0 12px 26px rgba(13, 148, 136, 0.28);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.hero-dots {
  position: absolute;
  right: 28px;
  bottom: 26px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dots button {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.search-entry,
.content-section,
.page-main,
.detail-main {
  margin-top: 44px;
}

.search-entry {
  border: 1px solid rgba(13, 148, 136, 0.18);
  border-radius: 24px;
  padding: 26px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.search-entry h2,
.section-head h2,
.page-hero h1,
.detail-text-card h1 {
  margin: 0;
  color: #0f172a;
  line-height: 1.2;
}

.search-entry p,
.page-hero p,
.category-detail-card p,
.rank-card p,
.story-block p,
.detail-text-card p {
  color: var(--muted);
}

.section-head {
  margin-bottom: 20px;
}

.section-head h2 {
  font-size: clamp(24px, 4vw, 34px);
}

.section-more {
  color: var(--teal-700);
  background: #ccfbf1;
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 12px 35px 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 22px 50px rgba(15, 23, 42, 0.15);
}

.movie-cover,
.rank-cover,
.category-art,
.poster-card {
  display: block;
  position: relative;
  background-color: #0f172a;
  background-position: center;
  background-size: cover;
}

.movie-cover {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.movie-cover::before,
.rank-cover::before,
.category-art::before,
.poster-card::before,
.player-overlay::before,
.category-card::before,
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.72), rgba(15, 23, 42, 0.28));
}

.movie-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 58%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

.movie-year {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  border-radius: 999px;
  padding: 4px 10px;
  color: #111827;
  background: var(--amber);
  font-weight: 800;
  font-size: 12px;
}

.play-badge {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--white);
  background: rgba(13, 148, 136, 0.92);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
}

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

.movie-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  color: #111827;
  font-weight: 850;
  font-size: 17px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-title:hover,
.rank-item:hover span:nth-child(2),
.rank-card h2 a:hover,
.category-detail-card h2 a:hover {
  color: var(--teal-700);
}

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

.movie-meta {
  justify-content: space-between;
  gap: 8px;
  color: #475569;
  font-size: 13px;
}

.movie-meta span,
.movie-meta a,
.detail-meta span,
.detail-meta a {
  background: #f1f5f9;
}

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

.tag-row span {
  color: var(--teal-800);
  background: #ccfbf1;
}

.category-grid,
.category-list-grid {
  display: grid;
  gap: 22px;
}

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

.category-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: 24px;
  padding: 24px;
  color: var(--white);
  background-position: center;
  background-size: cover;
  box-shadow: var(--shadow);
}

.category-card span,
.category-card p {
  position: relative;
  z-index: 2;
}

.category-card span {
  display: block;
  font-size: 24px;
  font-weight: 900;
}

.category-card p {
  max-width: 220px;
  margin: 12px 0 0;
  color: #e2e8f0;
  font-size: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: var(--white);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--white);
  background: linear-gradient(135deg, var(--red), var(--amber));
  font-weight: 900;
}

.rank-item span:nth-child(2) {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.page-hero {
  border-radius: 28px;
  padding: 42px;
  color: var(--white);
  background: radial-gradient(circle at 80% 20%, rgba(20, 184, 166, 0.35), transparent 28%), linear-gradient(135deg, var(--teal-900), #111827);
  box-shadow: var(--shadow);
}

.compact-hero h1 {
  color: var(--white);
  font-size: clamp(34px, 6vw, 54px);
}

.compact-hero p {
  max-width: 720px;
  margin: 14px 0 0;
  color: #d1fae5;
  font-size: 18px;
}

.filter-panel {
  margin: 28px 0;
  align-items: flex-end;
  justify-content: flex-start;
  border: 1px solid rgba(15, 118, 110, 0.15);
  border-radius: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.filter-panel label {
  display: grid;
  min-width: 220px;
  gap: 7px;
  color: #334155;
  font-size: 14px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  background: var(--white);
  color: #111827;
  outline: none;
}

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

.category-list-grid {
  margin-top: 28px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.category-detail-card,
.rank-card,
.detail-text-card,
.player-card,
.side-info-card {
  border: 1px solid rgba(15, 118, 110, 0.12);
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.category-detail-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  padding: 18px;
}

.category-art {
  min-height: 160px;
  overflow: hidden;
  border-radius: 18px;
}

.category-detail-card h2,
.rank-card h2,
.side-info-card h2,
.story-block h2 {
  margin: 0 0 12px;
  color: #111827;
}

.category-preview-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-preview-links a {
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--teal-800);
  background: #ccfbf1;
  font-size: 13px;
}

.rank-page-list {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.rank-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 20px;
  padding: 18px;
}

.rank-cover {
  min-height: 118px;
  overflow: hidden;
  border-radius: 18px;
}

.rank-cover span {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: var(--white);
  background: linear-gradient(135deg, var(--red), var(--amber));
  font-weight: 900;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  color: #475569;
  font-size: 14px;
}

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

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
}

.detail-content {
  min-width: 0;
}

.player-card {
  overflow: hidden;
  padding: 0;
  background: #020617;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.movie-video {
  display: block;
  width: 100%;
  height: 100%;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: var(--white);
  background-color: #020617;
  background-position: center;
  background-size: cover;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0.08em;
}

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

.player-overlay span {
  position: relative;
  z-index: 2;
}

.play-circle {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  color: var(--white);
  background: rgba(13, 148, 136, 0.92);
  box-shadow: 0 20px 60px rgba(13, 148, 136, 0.42);
  font-size: 30px;
}

.detail-text-card {
  margin-top: 22px;
  padding: 28px;
}

.detail-text-card h1 {
  font-size: clamp(30px, 5vw, 46px);
}

.detail-meta {
  margin: 18px 0 10px;
}

.detail-tags {
  margin-bottom: 20px;
}

.story-block p {
  margin: 0 0 22px;
  font-size: 17px;
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 20px;
}

.poster-card {
  min-height: 430px;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.side-info-card {
  padding: 22px;
}

.side-info-card dl {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 10px 14px;
  margin: 0;
}

.side-info-card dt {
  color: var(--muted);
}

.side-info-card dd {
  margin: 0;
  color: #111827;
  font-weight: 700;
}

.related-section {
  margin-bottom: 50px;
}

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

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

.footer-brand {
  color: var(--white);
  font-size: 20px;
}

.site-footer p {
  max-width: 410px;
  color: #94a3b8;
}

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

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

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

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  padding: 18px;
  color: #94a3b8;
  text-align: center;
  font-size: 14px;
}

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

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

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

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

@media (max-width: 820px) {
  .nav-links,
  .category-strip {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .mobile-panel.is-open {
    display: grid;
    gap: 8px;
    padding: 12px 16px 18px;
    background: rgba(4, 47, 46, 0.95);
  }

  .mobile-panel a {
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.08);
  }

  .hero-frame,
  .hero-copy {
    min-height: 520px;
  }

  .hero-copy {
    padding: 30px;
  }

  .search-entry,
  .section-head,
  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

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

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

  .poster-card {
    min-height: 360px;
  }

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

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

  .brand {
    font-size: 18px;
  }

  .hero-frame,
  .hero-copy {
    min-height: 560px;
  }

  .hero-copy {
    padding: 24px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-dots {
    right: 20px;
    bottom: 18px;
  }

  .page-hero {
    padding: 28px;
  }

  .movie-grid,
  .library-grid,
  .category-grid,
  .ranking-list,
  .category-list-grid {
    grid-template-columns: 1fr;
  }

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

  .rank-item {
    grid-template-columns: 40px 1fr;
  }

  .rank-item em {
    grid-column: 2;
  }

  .detail-text-card {
    padding: 22px;
  }
}
