:root {
  --bg: #0b1220;
  --card: #0f172a;
  --muted: #94a3b8;
  --text: #e5e7eb;
  --brand: #7c3aed;
  --brand-2: #22d3ee;
  --ring: 0 0 0 3px rgba(124, 58, 237, .35);
  --radius: 14px;
  --header: #0b1220;
  --header-border: rgba(148, 163, 184, .22);
  --accent: rgba(124, 58, 237, .18)
}

:root.light {
  --bg: #f8fafc;
  --card: #ffffff;
  --muted: #6b7280;
  --text: #0f172a;
  --brand: #7c3aed;
  --brand-2: #06b6d4;
  --ring: 0 0 0 3px rgba(124, 58, 237, .25);
  --header: #ffffff;
  --header-border: rgba(15, 23, 42, .08);
  --accent: rgba(6, 182, 212, .12)
}

* {
  box-sizing: border-box
}

html,
body {
  padding: 0;
  margin: 0
}

body {
  font-family: Inter, ui-sans-serif, system-ui, Segoe UI, Helvetica, Arial, Apple Color Emoji, Segoe UI Emoji;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text)
}

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

.container {
  max-width: 1200px !important;
  margin: 0 auto;
  padding: 0 16px
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--header-border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, .18);
  padding-top:0 !important;
  padding-bottom: 0 !important;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 18px
}

.logo img {
  width: 28px;
  height: 28px
}

.search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border-radius: 999px;
  padding: 6px 8px;
  border: 1px solid rgba(148, 163, 184, .15);
  transition: border-color .2s ease, box-shadow .2s ease
}

.search input {
  flex: 1;
  outline: none;
  border: none;
  background: transparent;
  color: var(--text);
  padding: 8px 10px
}

.search button {
  border: none;
  outline: none;
  background: transparent;
  cursor: pointer;
  border-radius: 999px;
  padding: 6px
}

.search:focus-within {
  box-shadow: var(--ring);
  border-color: transparent;
}

.search button:focus {
  box-shadow: var(--ring);
}

.actions {
  display: flex;
  align-items: center;
  gap: 8px
}

.nav-link {
  color: var(--text);
  opacity: .9;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
  transition: background .2s ease, color .2s ease
}

.nav-link:hover {
  background: var(--accent)
}

.nav-link.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, .15);
  background: var(--card);
  cursor: pointer;
  transition: transform .15s ease, border-color .2s ease, box-shadow .2s ease
}

.icon-button img {
  width: 18px;
  height: 18px
}

.icon-button:hover {
  border-color: rgba(148, 163, 184, .35);
  transform: translateY(-1px)
}

.icon-button:focus {
  box-shadow: var(--ring)
}

.hero {
  padding: 28px 0 8px;
  background: radial-gradient(1200px 500px at 10% -10%, rgba(124, 58, 237, .25), transparent), radial-gradient(900px 400px at 90% 10%, rgba(34, 211, 238, .15), transparent)
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 24px;
  align-items: center
}

.hero-text h1 {
  margin: 0 0 6px;
  font-size: 38px;
  letter-spacing: .2px
}

.hero-text p {
  margin: 0 0 16px;
  color: var(--muted)
}

.hero-cta {
  display: flex;
  gap: 12px
}

.btn {
  display: inline-block;
  border: 1px solid rgba(148, 163, 184, .15);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 12px;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
  border-color: rgba(148, 163, 184, .35)
}

.btn.primary {
  background: linear-gradient(135deg, #b386ff, #0bb7f9);
    border-color: transparent;
    box-shadow: 0 6px 18px rgb(45 79 255 / 30%);
}

.btn.primary:hover {
  box-shadow: 0 10px 26px rgba(124, 58, 237, .4)
}

.hero-covers {
  height: 220px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  opacity: .95
}

.cover {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  height: 100%;
  cursor: pointer;
}

.cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .35))
}

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

.section {
  padding: 18px 0
}

.section.alt {
  background: linear-gradient(180deg, rgba(148, 163, 184, .08), transparent)
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px
}

.section-head h2 {
  margin: 0;
  font-size: 22px
}

.more {
  color: var(--muted);
  text-decoration: none
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px
}

.card {
  background: var(--card);
  border: 1px solid rgba(148, 163, 184, .12);
  border-radius: 14px;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
  text-decoration: none;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(148, 163, 184, .28);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .28)
}

.thumb {
  position: relative;
  aspect-ratio: 3/2;
  overflow: hidden
}

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

.badge {
  position: absolute;
  left: 8px;
  top: 8px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font-size: 12px;
  padding: 3px 6px;
  border-radius: 999px;
  backdrop-filter: blur(2px)
}

.info {
  padding: 10px
}

.title {
  font-weight: 600;
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #0f172a;
}

.meta {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  width: 100%;

}

.tabs {
  display: flex;
  gap: 8px;
  margin: 8px 0 12px
}

.tab {
  background: var(--card);
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, .12);
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer
}

.tab.active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-2))
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px
}

.rank-item {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--card);
  border: 1px solid rgba(148, 163, 184, .12);
  border-radius: 12px;
  padding: 10px;
  transition: transform .15s ease, border-color .2s ease;
  text-decoration: none;
}

.rank-item:hover {
  transform: translateY(-1px);
  border-color: rgba(148, 163, 184, .28)
}

.rank-item .thumb {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden
}

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

.rank-item .r-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

.rank-item .r-title {
  font-weight: 600;
  color: #1d1d1d;
}

.rank-item .r-sub {
  color: var(--muted);
  font-size: 12px;
   word-break: break-all;
              text-overflow: ellipsis;
              display: -webkit-box;
              -webkit-box-orient: vertical;
              -webkit-line-clamp: 2; /* 超出几行省略 */
              overflow: hidden;
              color: #5b5b5b;
              
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px
}

.chip {
  padding: 8px 12px;
  border-radius:20px;
  cursor: pointer;
  background: var(--card);
  border: 1px solid rgba(148, 163, 184, .12);
  color: var(--text);
  text-decoration: none;
  list-style: none;
}

.chip:hover {
  border-color: rgba(148, 163, 184, .3);
  transform: translateY(-1px)
}

/* 面包屑与页面头部 */
.page-head {
  padding: 12px 0 8px
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px
}

.breadcrumbs a {
  color: inherit;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 8px
}

.breadcrumbs a:hover {
  background: var(--accent);
  color: var(--text)
}

.page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px
}

.page-title h1,
.page-title h2 {
  margin: 0
}

.site-footer {
  padding: 16px 0;
  border-top: 1px solid rgba(148, 163, 184, .12);
  margin-top: 18px
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between
}

.copy {
  color: var(--muted)
}

.links a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 12px
}

@media (max-width:1024px) {
  .card-grid {
    grid-template-columns: repeat(4, 1fr)
  }

  .rank-list {
    grid-template-columns: repeat(2, 1fr)
  }
}

@media (max-width:768px) {
  .hero-inner {
    grid-template-columns: 1fr
  }

  .hero-covers {
    height: 180px;
    grid-template-columns: repeat(3, 1fr)
  }

  .card-grid {
    grid-template-columns: repeat(3, 1fr)
  }
}

@media (max-width:520px) {
  .header-inner {
    gap: 10px
  }

  .nav-link {
    display: none
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr)
  }

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