:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.82);
  --bg-panel: rgba(30, 41, 59, 0.64);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --emerald: #10b981;
  --emerald-dark: #059669;
  --emerald-soft: rgba(16, 185, 129, 0.16);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.12), transparent 34rem),
    radial-gradient(circle at 88% 12%, rgba(14, 165, 233, 0.12), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(51, 65, 85, 0.9);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), #34d399);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.32);
  font-size: 13px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.nav-link {
  color: #cbd5e1;
  font-size: 15px;
  transition: color 180ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: #34d399;
}

.header-search {
  width: 275px;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.46);
}

.header-search input,
.hero-search input,
.large-search input,
.filter-panel input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.header-search input {
  padding: 9px 12px 9px 16px;
  min-width: 0;
}

.header-search button,
.hero-search button,
.large-search button {
  border: 0;
  color: #ffffff;
  cursor: pointer;
  background: var(--emerald);
  transition: background 180ms ease, transform 180ms ease;
}

.header-search button {
  padding: 9px 14px;
}

.header-search button:hover,
.hero-search button:hover,
.large-search button:hover {
  background: var(--emerald-dark);
}

.mobile-menu-button {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.7);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 99px;
  background: #e2e8f0;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.mobile-panel.is-open {
  display: block;
}

.mobile-panel nav,
.mobile-category-row {
  display: grid;
  gap: 8px;
}

.mobile-panel a,
.mobile-category-row a {
  padding: 10px 14px;
  border-radius: 12px;
  color: #cbd5e1;
  background: rgba(30, 41, 59, 0.52);
}

main {
  min-height: 65vh;
}

.hero-section {
  position: relative;
  min-height: 100vh;
  padding-top: 68px;
  overflow: hidden;
  background: #020617;
}

.hero-carousel {
  position: relative;
  min-height: 72vh;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.86) 22%, rgba(2, 6, 23, 0.38) 62%, rgba(2, 6, 23, 0.78) 100%),
    linear-gradient(to right, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.58) 46%, rgba(2, 6, 23, 0.16) 100%);
}

.hero-content {
  position: absolute;
  left: max(24px, calc((100vw - 1180px) / 2));
  bottom: 90px;
  width: min(660px, calc(100vw - 48px));
}

.hero-label {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  margin-bottom: 16px;
  border-radius: 999px;
  color: #34d399;
  background: var(--emerald-soft);
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1 {
  margin: 0 0 16px;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 620px;
  margin: 0 0 22px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
}

.hero-tags,
.tag-list,
.detail-tags,
.hero-category-pills,
.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.tag-list span,
.detail-tags a,
.hero-category-pills a,
.quick-filters button {
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.1);
}

.hero-tags span,
.detail-tags a,
.hero-category-pills a,
.quick-filters button {
  padding: 6px 12px;
}

.tag-list span {
  padding: 4px 9px;
  font-size: 12px;
}

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

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 700;
  transition: transform 180ms ease, background 180ms ease, border 180ms ease;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(135deg, var(--emerald), #34d399);
  box-shadow: 0 12px 34px rgba(16, 185, 129, 0.28);
}

.ghost-button,
.section-more {
  color: #d1fae5;
  border: 1px solid rgba(52, 211, 153, 0.22);
  background: rgba(15, 23, 42, 0.56);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.58);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 4;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(203, 213, 225, 0.46);
  cursor: pointer;
  transition: width 180ms ease, background 180ms ease;
}

.hero-dot.active {
  width: 26px;
  background: var(--emerald);
}

.hero-search-card {
  position: relative;
  z-index: 5;
  width: min(1180px, calc(100% - 32px));
  margin: -60px auto 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.84);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-search-card h2 {
  margin: 0 0 6px;
  font-size: clamp(24px, 4vw, 36px);
}

.hero-search-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.hero-search,
.large-search {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.56);
}

.hero-search input,
.large-search input {
  padding: 15px 18px;
}

.hero-search button,
.large-search button {
  min-width: 112px;
  padding: 0 22px;
}

.hero-category-pills {
  margin-top: 18px;
}

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

.alt-section {
  width: 100%;
  padding-left: max(16px, calc((100vw - 1180px) / 2));
  padding-right: max(16px, calc((100vw - 1180px) / 2));
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.62), rgba(2, 6, 23, 0.04));
}

.section-heading,
.category-overview-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.section-heading h2,
.category-overview-head h2,
.detail-section h2,
.sidebar-panel h2,
.sidebar-cover-card h2,
.site-footer h2 {
  margin: 0 0 6px;
  line-height: 1.2;
}

.section-heading h2,
.category-overview-head h2,
.detail-section h2 {
  font-size: clamp(24px, 3vw, 34px);
}

.section-heading p,
.category-overview-head p {
  margin: 0;
  color: var(--muted);
}

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

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

.video-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.18);
  transition: transform 220ms ease, border 220ms ease, background 220ms ease;
}

.video-card:hover {
  transform: translateY(-5px);
  border-color: rgba(52, 211, 153, 0.38);
  background: rgba(15, 23, 42, 0.96);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img,
.ranking-cover img,
.sidebar-rank img,
.sidebar-cover-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-link img {
  transition: transform 500ms ease;
}

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.84), transparent 60%);
  transition: opacity 220ms ease;
}

.video-card:hover .poster-link::after {
  opacity: 1;
}

.year-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.92);
}

.year-badge {
  right: 10px;
}

.rank-badge {
  left: 10px;
}

.play-hover {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  opacity: 0;
  color: #ffffff;
  background: rgba(16, 185, 129, 0.92);
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 220ms ease, transform 220ms ease;
}

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

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

.video-card-body h2 {
  margin: 0 0 7px;
  font-size: 17px;
  line-height: 1.35;
}

.video-card-body h2 a:hover {
  color: #34d399;
}

.card-meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
}

.card-desc {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: #cbd5e1;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.category-card {
  display: block;
  min-height: 160px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(16, 185, 129, 0.14), rgba(15, 23, 42, 0.9)),
    var(--bg-card);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.16);
}

.category-card span {
  display: block;
  margin-bottom: 8px;
  color: #f8fafc;
  font-size: 20px;
  font-weight: 800;
}

.category-card p {
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
}

.category-samples {
  display: grid;
  gap: 4px;
  margin-top: 12px;
}

.category-samples a {
  color: #a7f3d0;
  font-size: 13px;
}

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

.ranking-row,
.sidebar-rank {
  display: grid;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-card);
}

.ranking-row {
  grid-template-columns: 42px 82px 1fr;
  padding: 10px;
}

.ranking-number {
  color: #34d399;
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.ranking-row img {
  width: 82px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
}

.ranking-info {
  min-width: 0;
}

.ranking-info strong,
.ranking-info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-info small {
  color: var(--muted);
}

.page-main {
  padding-top: 68px;
}

.page-hero {
  min-height: 300px;
  display: flex;
  align-items: center;
  background:
    linear-gradient(to bottom, rgba(15, 23, 42, 0.76), rgba(2, 6, 23, 0)),
    radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.18), transparent 32rem);
}

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

.page-hero h1 {
  max-width: 860px;
  margin: 10px 0 14px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

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

.breadcrumb,
.detail-breadcrumb {
  color: #34d399;
  font-weight: 700;
}

.filter-panel {
  margin-bottom: 26px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.filter-panel label {
  display: grid;
  gap: 8px;
}

.filter-panel span {
  color: #d1fae5;
  font-weight: 700;
}

.filter-panel input {
  min-height: 48px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.48);
}

.quick-filters {
  margin-top: 14px;
}

.quick-filters button {
  cursor: pointer;
}

.empty-state {
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
  background: var(--bg-card);
}

.ranking-list {
  display: grid;
  gap: 18px;
}

.ranking-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 22px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--bg-card);
}

.ranking-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
}

.ranking-cover span {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--emerald);
  font-weight: 900;
}

.ranking-card-body h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.ranking-card-body p {
  color: #cbd5e1;
}

.ranking-links {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.ranking-links a {
  color: #a7f3d0;
  font-weight: 700;
}

.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
}

.detail-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
}

.detail-breadcrumb a {
  color: #34d399;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(52, 211, 153, 0.24);
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.75), rgba(2, 6, 23, 0.18));
  cursor: pointer;
  transition: opacity 220ms ease, visibility 220ms ease;
}

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

.player-icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--emerald), #34d399);
  box-shadow: 0 18px 45px rgba(16, 185, 129, 0.36);
}

.detail-header,
.detail-section,
.sidebar-cover-card,
.sidebar-panel {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--bg-card);
}

.detail-header h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.1;
}

.detail-header p,
.detail-section p {
  color: #cbd5e1;
  font-size: 16px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.detail-meta span {
  padding: 5px 10px;
  border-radius: 999px;
  color: #d1fae5;
  background: rgba(16, 185, 129, 0.1);
}

.detail-tags {
  margin-top: 18px;
}

.sidebar-cover-card img {
  height: 180px;
  border-radius: 16px;
}

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

.sidebar-panel {
  display: grid;
  gap: 12px;
}

.sidebar-rank {
  grid-template-columns: 28px 72px 1fr;
  padding: 8px;
}

.sidebar-rank span {
  color: #34d399;
  font-weight: 900;
  text-align: center;
}

.sidebar-rank img {
  width: 72px;
  height: 46px;
  border-radius: 10px;
}

.sidebar-rank strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.site-footer {
  border-top: 1px solid rgba(51, 65, 85, 0.9);
  background: rgba(15, 23, 42, 0.92);
}

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

.site-footer p,
.site-footer a {
  color: var(--muted);
}

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

.footer-links a:hover {
  color: #34d399;
}

.footer-bottom {
  padding: 18px;
  color: #64748b;
  text-align: center;
  border-top: 1px solid var(--line);
}

[hidden] {
  display: none !important;
}

@media (max-width: 1100px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .mobile-menu-button {
    display: block;
  }

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

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

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

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

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

  .site-logo {
    font-size: 16px;
  }

  .hero-section,
  .page-main {
    padding-top: 62px;
  }

  .hero-carousel,
  .hero-slide img {
    min-height: 70vh;
  }

  .hero-content {
    bottom: 78px;
  }

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

  .hero-control {
    display: none;
  }

  .hero-search-card {
    margin-top: -32px;
    padding: 20px;
  }

  .hero-search,
  .large-search {
    display: grid;
  }

  .hero-search button,
  .large-search button {
    min-height: 46px;
  }

  .content-section,
  .category-overview-block {
    padding: 44px 0;
  }

  .section-heading,
  .category-overview-head {
    display: grid;
  }

  .video-grid,
  .small-grid,
  .category-grid,
  .overview-grid,
  .ranking-panel {
    grid-template-columns: 1fr;
  }

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

  .page-hero {
    min-height: 260px;
  }

  .detail-layout {
    width: min(100% - 24px, 1180px);
    padding-top: 20px;
  }

  .detail-header,
  .detail-section,
  .sidebar-cover-card,
  .sidebar-panel {
    padding: 18px;
  }

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