:root {
  --emerald: #059669;
  --emerald-dark: #047857;
  --teal: #0d9488;
  --cyan: #0891b2;
  --rose: #e11d48;
  --orange: #ea580c;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f0fdfa;
  --panel: #ffffff;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(135deg, #f9fafb 0%, #ecfdf5 48%, #f0fdfa 100%);
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #059669, #0d9488, #0891b2);
  box-shadow: 0 14px 32px rgba(15, 118, 110, 0.28);
}

.header-inner {
  width: min(1200px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  flex: 0 0 auto;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  transition: transform 0.25s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.1);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-text small {
  color: #d1fae5;
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #ffffff;
  font-weight: 600;
  flex: 1 1 auto;
}

.main-nav > a,
.nav-dropdown > button {
  color: #ffffff;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  padding: 8px 0;
}

.main-nav > a:hover,
.main-nav > a.active,
.nav-dropdown > button:hover {
  color: #d1fae5;
}

.nav-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: 180px;
  padding: 8px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.dropdown-menu a {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
  color: #374151;
}

.dropdown-menu a:hover {
  color: var(--emerald-dark);
  background: #ecfdf5;
}

.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 280px;
}

.top-search input,
.quick-inner input,
.quick-inner select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 0 16px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  outline: none;
  backdrop-filter: blur(8px);
}

.top-search input::placeholder {
  color: rgba(255, 255, 255, 0.76);
}

.top-search button,
.quick-inner button {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  color: var(--emerald-dark);
  background: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.mobile-toggle,
.mobile-panel {
  display: none;
}

.hero-wrap {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.38) 48%, rgba(4, 120, 87, 0.32));
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100% - 1200px) / 2));
  top: 50%;
  width: min(760px, calc(100% - 48px));
  transform: translateY(-50%);
  color: #ffffff;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  margin-bottom: 18px;
  border-radius: 999px;
  color: #facc15;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.hero-content h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 70px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-content p {
  margin: 0 0 22px;
  color: #e5e7eb;
  font-size: clamp(17px, 2vw, 22px);
  max-width: 720px;
}

.hero-tags,
.tag-row,
.detail-meta,
.preview-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.preview-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

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

.primary-btn,
.ghost-btn,
.section-action,
.channel-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.primary-btn {
  color: #ffffff;
  background: linear-gradient(90deg, var(--emerald), var(--teal));
  box-shadow: 0 16px 28px rgba(5, 150, 105, 0.34);
}

.ghost-btn,
.channel-actions a {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-action:hover,
.channel-actions a:hover {
  transform: scale(1.04);
}

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

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.hero-dots button.active {
  width: 34px;
  background: #ffffff;
}

.quick-filter {
  width: min(1200px, calc(100% - 32px));
  margin: -32px auto 0;
  position: relative;
  z-index: 5;
}

.quick-inner {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.quick-inner input,
.quick-inner select {
  color: #111827;
  border-color: var(--line);
  background: #ffffff;
}

.quick-inner a {
  flex: 0 0 auto;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--emerald), var(--teal));
  font-weight: 800;
}

.content-section {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0 0;
}

.soft-panel {
  padding: 44px 24px 24px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 1px rgba(5, 150, 105, 0.08);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.15;
}

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

.section-action {
  min-height: 42px;
  color: var(--emerald-dark);
  background: #d1fae5;
}

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

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

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

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

.movie-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.16);
}

.poster-link {
  position: relative;
  display: block;
  height: 300px;
  overflow: hidden;
  background: linear-gradient(135deg, #064e3b, #0f766e);
}

.highlight-grid .poster-link {
  height: 260px;
}

.compact-grid .poster-link,
.archive-grid .poster-link {
  height: 245px;
}

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

.movie-card:hover .poster-link img {
  transform: scale(1.1);
  filter: brightness(0.82);
}

.play-dot {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(5, 150, 105, 0.9);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.22s ease;
}

.movie-card:hover .play-dot {
  opacity: 1;
  transform: translateY(0);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--rose), #f97316);
  box-shadow: 0 12px 24px rgba(225, 29, 72, 0.34);
}

.card-body {
  padding: 16px;
}

.meta-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--emerald-dark);
  font-size: 13px;
  font-weight: 800;
}

.card-body h3 {
  margin: 8px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--emerald-dark);
}

.card-body p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.tag-row span {
  color: var(--emerald-dark);
  background: #d1fae5;
}

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

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  border-radius: 24px;
  color: #ffffff;
  background: #064e3b;
  box-shadow: var(--shadow);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.45);
  transition: transform 0.35s ease;
}

.category-tile:hover img {
  transform: scale(1.08);
}

.category-tile span,
.category-tile p,
.category-tile .preview-tags {
  position: relative;
  z-index: 1;
}

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

.category-tile p {
  margin: 8px 0 0;
  color: #e5e7eb;
}

.preview-tags {
  margin-top: 12px;
}

.preview-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

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

.wide-card {
  display: grid;
  grid-template-columns: 190px 1fr;
  min-height: 180px;
}

.wide-card .poster-link {
  height: 100%;
}

.page-main,
.detail-main {
  min-height: 70vh;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 80px max(24px, calc((100% - 1200px) / 2));
  color: #ffffff;
  background: radial-gradient(circle at top left, rgba(250, 204, 21, 0.24), transparent 34%), linear-gradient(135deg, #065f46, #0f766e, #0e7490);
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.1;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: #dcfce7;
  font-size: 18px;
}

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

.page-filter {
  margin-top: -28px;
}

.breadcrumbs {
  width: min(1200px, calc(100% - 32px));
  margin: 28px auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a {
  color: var(--emerald-dark);
  font-weight: 700;
}

.detail-hero {
  width: min(1200px, calc(100% - 32px));
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 34px;
  align-items: center;
  padding: 28px;
  border-radius: 30px;
  color: #ffffff;
  background: linear-gradient(135deg, #064e3b, #0f766e, #111827);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.28);
}

.detail-poster img {
  width: 100%;
  height: 480px;
  object-fit: cover;
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.08;
}

.detail-one {
  margin: 0 0 20px;
  color: #e5e7eb;
  font-size: 19px;
}

.detail-meta {
  margin-bottom: 16px;
}

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

.player-section {
  width: min(1200px, calc(100% - 32px));
  margin: 48px auto 0;
}

.player-section h2,
.detail-text h2 {
  margin: 0 0 18px;
  font-size: 28px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
  aspect-ratio: 16 / 9;
}

.video-node {
  width: 100%;
  height: 100%;
  display: block;
  background: #000000;
  object-fit: contain;
}

.player-mask {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(5, 150, 105, 0.18), rgba(0, 0, 0, 0.68));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-btn {
  width: 148px;
  height: 148px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  box-shadow: 0 24px 48px rgba(5, 150, 105, 0.36);
  cursor: pointer;
}

.play-btn span {
  font-size: 44px;
  line-height: 1;
}

.play-btn strong {
  font-size: 17px;
}

.detail-text {
  padding-top: 48px;
}

.detail-text p {
  margin: 0 0 28px;
  color: #374151;
  font-size: 17px;
  background: rgba(255, 255, 255, 0.74);
  border-radius: 22px;
  padding: 22px;
  box-shadow: inset 0 0 0 1px rgba(5, 150, 105, 0.08);
}

.site-footer {
  margin-top: 80px;
  color: #d1d5db;
  background: linear-gradient(135deg, #111827, #1f2937, #111827);
}

.footer-inner {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 46px 0;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 28px;
}

.footer-logo {
  margin-bottom: 10px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.footer-inner p {
  margin: 0;
  color: #9ca3af;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-content: flex-start;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(255, 255, 255, 0.08);
}

.footer-copy {
  grid-column: 1 / -1;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #9ca3af;
}

[data-card].hidden {
  display: none;
}

@media (max-width: 1100px) {
  .top-search {
    display: none;
  }

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

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

@media (max-width: 820px) {
  .header-inner {
    min-height: 64px;
  }

  .main-nav {
    display: none;
  }

  .mobile-toggle {
    margin-left: auto;
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    font-size: 22px;
  }

  .mobile-panel.open {
    display: grid;
    gap: 4px;
    padding: 10px 16px 16px;
    background: rgba(4, 120, 87, 0.98);
  }

  .mobile-panel a {
    padding: 12px;
    border-radius: 12px;
    color: #ffffff;
  }

  .mobile-panel a:hover {
    background: rgba(255, 255, 255, 0.12);
  }

  .hero-wrap {
    height: 560px;
  }

  .hero-content {
    top: 52%;
  }

  .quick-inner,
  .section-heading,
  .footer-inner {
    display: block;
  }

  .quick-inner > * + * {
    margin-top: 12px;
  }

  .section-action {
    margin-top: 14px;
  }

  .movie-grid,
  .highlight-grid,
  .archive-grid,
  .rank-list,
  .category-grid,
  .category-grid.large,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .poster-link,
  .highlight-grid .poster-link,
  .compact-grid .poster-link,
  .archive-grid .poster-link {
    height: 280px;
  }

  .wide-card {
    grid-template-columns: 150px 1fr;
  }

  .wide-card .poster-link {
    height: 190px;
  }

  .detail-poster img {
    height: 420px;
  }

  .footer-links {
    justify-content: flex-start;
    margin-top: 24px;
  }
}

@media (max-width: 520px) {
  .brand-text strong {
    font-size: 17px;
  }

  .brand-text small {
    display: none;
  }

  .hero-wrap {
    height: 520px;
  }

  .hero-content h1 {
    font-size: 36px;
  }

  .hero-actions,
  .channel-actions {
    display: grid;
  }

  .wide-card {
    display: block;
  }

  .wide-card .poster-link {
    height: 260px;
  }

  .detail-hero {
    padding: 18px;
  }

  .detail-poster img {
    height: 360px;
  }

  .play-btn {
    width: 116px;
    height: 116px;
  }
}
