:root {
  --yx-lime: #65A30D;
  --yx-lime-dark: #4D7C0F;
  --yx-neon: #A3E635;
  --yx-char: #111827;
  --yx-panel: #1F2937;
  --yx-ink: #111827;
  --yx-muted: #6B7280;
  --yx-line: #E5E7EB;
  --yx-bg: #F3F4F6;
  --yx-paper: #FFFFFF;
  --yx-radius: 8px;
  --yx-wrap: 1140px;
  --yx-font: "JetBrains Mono", "Consolas", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --yx-sans: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--yx-sans);
  color: var(--yx-ink);
  background: var(--yx-bg);
  line-height: 1.65;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; transition: color .2s, background .2s, border-color .2s, transform .2s, box-shadow .2s; }
a:hover { color: var(--yx-lime-dark); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.3; }

.yx-wrap {
  width: min(100% - 32px, var(--yx-wrap));
  margin-inline: auto;
}

/* Header */
.yx-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(17, 24, 39, 0.96);
  backdrop-filter: blur(10px);
  color: #fff;
  border-bottom: 1px solid #374151;
}

.yx-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 68px;
}

.yx-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  color: #fff;
}

.yx-logo:hover { color: #fff; }
.yx-logo img { height: 38px; width: auto; }

.yx-logo-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--yx-lime);
  color: #14532D;
  font-weight: 800;
  font-size: 16px;
  border-radius: 6px;
  font-family: var(--yx-font);
  box-shadow: 0 0 16px rgba(163, 230, 53, 0.35);
}

.yx-logo strong { display: block; font-size: 16px; }
.yx-logo em {
  display: block;
  font-style: normal;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
  font-family: var(--yx-font);
}

.yx-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.yx-nav > ul {
  display: flex;
  align-items: center;
  gap: 2px;
}

.yx-nav > ul > li { position: relative; }

.yx-nav > ul > li > a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--yx-font);
}

.yx-nav > ul > li.is-active > a,
.yx-nav > ul > li > a:hover {
  background: rgba(101, 163, 13, 0.2);
  color: var(--yx-neon);
}

.yx-subnav {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 160px;
  padding: 8px;
  background: var(--yx-panel);
  border: 1px solid #374151;
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: .2s;
}

.yx-nav > ul > li:hover > .yx-subnav {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.yx-subnav a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

.yx-subnav a:hover,
.yx-subnav .is-active a {
  background: rgba(101, 163, 13, 0.25);
  color: var(--yx-neon);
}

.yx-search {
  display: flex;
  border: 1px solid #374151;
  border-radius: 6px;
  overflow: hidden;
  background: #0B1220;
}

.yx-search input {
  border: 0;
  background: transparent;
  padding: 8px 12px;
  width: 120px;
  outline: none;
  font: inherit;
  font-size: 12px;
  color: #fff;
  font-family: var(--yx-font);
}

.yx-search button {
  border: 0;
  background: var(--yx-lime);
  color: #14532D;
  padding: 8px 12px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.yx-nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid #374151;
  border-radius: 6px;
  background: var(--yx-panel);
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.yx-nav-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

.yx-nav-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 90;
}

body.nav-open .yx-nav-mask { display: block; }

/* Console hero */
.yx-console {
  padding: 48px 0 40px;
  background:
    radial-gradient(ellipse 50% 60% at 85% 20%, rgba(163, 230, 53, 0.18), transparent 50%),
    linear-gradient(160deg, #030712 0%, #111827 50%, #1F2937 100%);
  color: #fff;
  border-bottom: 2px solid var(--yx-lime);
}

.yx-console-inner {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 32px;
  align-items: center;
}

.yx-eyebrow {
  margin: 0 0 12px;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--yx-neon);
  font-weight: 700;
  font-family: var(--yx-font);
}

.yx-console h1 {
  font-size: clamp(26px, 3.8vw, 40px);
  max-width: 12em;
}

.yx-console-desc {
  margin: 14px 0 26px;
  color: rgba(255, 255, 255, 0.68);
  max-width: 36em;
  font-size: 15px;
}

.yx-console-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.yx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--yx-font);
}

.yx-btn-primary {
  background: var(--yx-lime);
  color: #14532D;
  box-shadow: 0 0 20px rgba(163, 230, 53, 0.3);
}

.yx-btn-primary:hover {
  background: var(--yx-neon);
  color: #14532D;
  transform: translateY(-1px);
}

.yx-btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
}

.yx-btn-ghost:hover {
  border-color: var(--yx-neon);
  color: var(--yx-neon);
}

.yx-status {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.yx-status-item {
  padding: 14px 16px;
  background: rgba(31, 41, 55, 0.85);
  border: 1px solid #374151;
  border-radius: 8px;
  font-family: var(--yx-font);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.yx-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yx-neon);
  box-shadow: 0 0 0 0 rgba(163, 230, 53, 0.5);
  animation: yx-pulse 1.8s ease-out infinite;
}

@keyframes yx-pulse {
  0% { box-shadow: 0 0 0 0 rgba(163, 230, 53, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(163, 230, 53, 0); }
  100% { box-shadow: 0 0 0 0 rgba(163, 230, 53, 0); }
}

/* Tiles */
.yx-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: -28px 0 36px;
  position: relative;
  z-index: 2;
}

.yx-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 16px;
  background: var(--yx-paper);
  border: 1px solid var(--yx-line);
  border-radius: var(--yx-radius);
  border-top: 3px solid var(--yx-lime);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.08);
}

.yx-tile:hover {
  transform: translateY(-3px);
  border-color: var(--yx-lime);
  color: inherit;
}

.yx-tile em {
  font-style: normal;
  font-size: 11px;
  font-family: var(--yx-font);
  color: var(--yx-lime-dark);
  font-weight: 800;
}

.yx-tile strong { font-size: 15px; }
.yx-tile span { font-size: 12px; color: var(--yx-muted); }

/* Sections */
.yx-section-hd {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.yx-section-hd h2 {
  font-size: 22px;
  font-family: var(--yx-font);
}

.yx-section-hd span,
.yx-section-hd a {
  font-size: 13px;
  color: var(--yx-muted);
  font-family: var(--yx-font);
}

.yx-section-hd a:hover { color: var(--yx-lime-dark); }

.yx-feed,
.yx-mosaic,
.yx-split {
  margin: 40px 0;
}

/* Terminal log feed */
.yx-log {
  background: var(--yx-char);
  border-radius: var(--yx-radius);
  border: 1px solid #374151;
  overflow: hidden;
}

.yx-log-row {
  display: grid;
  grid-template-columns: 52px 16px 1fr 48px;
  gap: 12px;
  align-items: start;
  padding: 16px 18px;
  border-bottom: 1px solid #1F2937;
  color: #E5E7EB;
}

.yx-log-row:last-child { border-bottom: 0; }

.yx-log-row:hover {
  background: #1F2937;
  color: #fff;
}

.yx-log-row time {
  font-family: var(--yx-font);
  font-size: 12px;
  color: var(--yx-neon);
  font-weight: 700;
  padding-top: 2px;
}

.yx-log-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--yx-lime);
}

.yx-log-row:nth-of-type(even) .yx-log-dot { background: #84CC16; }

.yx-log-row h3 {
  font-size: 15px;
  margin-bottom: 4px;
  font-family: var(--yx-sans);
}

.yx-log-row p {
  margin: 0;
  font-size: 12px;
  color: #9CA3AF;
}

.yx-log-row em {
  font-style: normal;
  font-size: 11px;
  color: #6B7280;
  font-family: var(--yx-font);
  text-align: right;
  padding-top: 2px;
}

/* Mosaic */
.yx-mosaic-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  grid-template-rows: auto auto;
  gap: 14px;
}

.yx-mosaic-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: var(--yx-paper);
  border: 1px solid var(--yx-line);
  border-radius: var(--yx-radius);
  min-height: 140px;
}

.yx-mosaic-card:first-child {
  grid-row: span 2;
  background: linear-gradient(160deg, #111827, #1F2937);
  color: #fff;
  border-color: transparent;
  min-height: 280px;
}

.yx-mosaic-card:first-child em { color: var(--yx-neon); }
.yx-mosaic-card:first-child p { color: #9CA3AF; }
.yx-mosaic-card:first-child time { color: #6B7280; }
.yx-mosaic-card:first-child:hover { color: #fff; }

.yx-mosaic-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.1);
  color: inherit;
  border-color: var(--yx-lime);
}

.yx-mosaic-card em {
  font-style: normal;
  font-size: 11px;
  color: var(--yx-lime-dark);
  font-weight: 700;
  font-family: var(--yx-font);
}

.yx-mosaic-card h3 { font-size: 17px; flex: 1; }
.yx-mosaic-card p { margin: 0; font-size: 13px; color: var(--yx-muted); }
.yx-mosaic-card time { font-size: 12px; color: var(--yx-muted); font-family: var(--yx-font); }

/* Split */
.yx-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
}

.yx-split-col {
  background: var(--yx-paper);
  border: 1px solid var(--yx-line);
  border-radius: var(--yx-radius);
  padding: 22px;
}

.yx-split-dark {
  background: var(--yx-char);
  border-color: transparent;
  color: #fff;
}

.yx-split-dark .yx-section-hd h2 { color: #fff; }
.yx-split-dark .yx-section-hd a { color: rgba(255, 255, 255, 0.55); }
.yx-split-dark .yx-section-hd a:hover { color: var(--yx-neon); }

.yx-plain li + li {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--yx-line);
}

.yx-plain a { display: block; }
.yx-plain a:hover { color: inherit; }
.yx-plain h3 { font-size: 15px; margin-bottom: 4px; }
.yx-plain p { margin: 0 0 6px; font-size: 13px; color: var(--yx-muted); }
.yx-plain span { font-size: 12px; color: var(--yx-lime-dark); font-weight: 700; font-family: var(--yx-font); }

.yx-insight li + li { margin-top: 10px; }

.yx-insight a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--yx-lime);
  border-radius: 0 6px 6px 0;
}

.yx-insight a:hover {
  background: rgba(101, 163, 13, 0.15);
  color: #fff;
}

.yx-insight strong { font-size: 14px; font-weight: 600; }
.yx-insight span { font-size: 11px; opacity: 0.55; flex-shrink: 0; font-family: var(--yx-font); }

/* Inner */
.yx-crumb {
  padding: 14px 0;
  font-size: 13px;
  color: var(--yx-muted);
  background: var(--yx-paper);
  border-bottom: 1px solid var(--yx-line);
  font-family: var(--yx-font);
}

.yx-crumb span { margin: 0 6px; color: #9CA3AF; }

.yx-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 28px;
  padding: 28px 0 48px;
  align-items: start;
}

.yx-panel {
  background: var(--yx-paper);
  border: 1px solid var(--yx-line);
  border-radius: var(--yx-radius);
  padding: 20px;
  margin-bottom: 16px;
}

.yx-panel-hd {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--yx-lime);
}

.yx-panel-hd h3 { font-size: 15px; font-family: var(--yx-font); }

.yx-page-title {
  font-size: 24px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--yx-line);
  font-family: var(--yx-font);
}

.yx-article-list li + li {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--yx-line);
}

.yx-article-list a {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
}

.yx-article-list a:not(:has(img)) { grid-template-columns: 1fr; }

.yx-article-list img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
}

.yx-article-list h2 { font-size: 17px; margin-bottom: 4px; }
.yx-article-list p { margin: 0 0 6px; color: var(--yx-muted); font-size: 13px; }

.yx-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--yx-muted);
  font-family: var(--yx-font);
}

.yx-meta.center { justify-content: center; margin: 12px 0 22px; }

.yx-empty {
  padding: 40px;
  text-align: center;
  color: var(--yx-muted);
}

.yx-detail h1 {
  font-size: 26px;
  text-align: center;
}

.yx-richtext {
  font-size: 16px;
  line-height: 1.85;
}

.yx-richtext p { margin: 0 0 1em; }
.yx-richtext img { margin: 1em auto; border-radius: 6px; }

.yx-pagerow {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--yx-line);
  font-size: 13px;
}

.yx-pagerow a { color: var(--yx-lime-dark); }
.yx-pagerow span { color: var(--yx-muted); }

.yx-rank { counter-reset: yx-rank; }
.yx-rank li {
  counter-increment: yx-rank;
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--yx-line);
  font-size: 13px;
}

.yx-rank li::before {
  content: counter(yx-rank);
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  background: var(--yx-bg);
  color: var(--yx-muted);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--yx-font);
}

.yx-rank li:nth-child(-n+3)::before {
  background: var(--yx-lime);
  color: #14532D;
}

.yx-side-list li {
  padding: 8px 0;
  border-bottom: 1px dashed var(--yx-line);
  font-size: 13px;
}

.yx-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.yx-tags a {
  padding: 5px 10px;
  border-radius: 4px;
  background: #F7FEE7;
  border: 1px solid #D9F99D;
  font-size: 12px;
  color: var(--yx-lime-dark);
  font-family: var(--yx-font);
}

.yx-tags a:hover {
  background: var(--yx-lime);
  border-color: var(--yx-lime);
  color: #14532D;
}

.yx-ad { font-size: 13px; color: var(--yx-muted); }

.yx-page {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 22px;
}

.yx-page li a,
.yx-page li span {
  display: inline-flex;
  min-width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid var(--yx-line);
  background: var(--yx-paper);
  font-size: 12px;
  font-family: var(--yx-font);
}

.yx-page li.active a,
.yx-page li a:hover {
  background: var(--yx-lime);
  border-color: var(--yx-lime);
  color: #14532D;
}

.yx-page .dots { border: 0; background: transparent; }

/* Footer */
.yx-footer {
  margin-top: 24px;
  padding: 40px 0 28px;
  background: #030712;
  color: rgba(255, 255, 255, 0.7);
}

.yx-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

.yx-footer h3 { color: #fff; font-size: 17px; margin-bottom: 10px; }
.yx-footer h4 { color: var(--yx-neon); font-size: 13px; margin-bottom: 12px; font-family: var(--yx-font); }
.yx-footer p { margin: 0 0 6px; font-size: 13px; }

.yx-foot-links li { margin-bottom: 6px; }
.yx-foot-links a { font-size: 13px; color: rgba(255, 255, 255, 0.65); }
.yx-foot-links a:hover { color: var(--yx-neon); }

.yx-friendlinks {
  padding: 16px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
}

.yx-friendlinks a {
  margin-right: 14px;
  color: rgba(255, 255, 255, 0.55);
}

.yx-friendlinks a:hover { color: var(--yx-neon); }

.yx-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--yx-font);
}

.yx-copy a { color: rgba(255, 255, 255, 0.45); }

@media (max-width: 992px) {
  .yx-console-inner { grid-template-columns: 1fr; }
  .yx-tiles { grid-template-columns: repeat(2, 1fr); margin-top: -20px; }
  .yx-mosaic-grid { grid-template-columns: 1fr; }
  .yx-mosaic-card:first-child { grid-row: auto; min-height: 180px; }
  .yx-split { grid-template-columns: 1fr; }
  .yx-layout { grid-template-columns: 1fr; }
  .yx-footer-grid { grid-template-columns: 1fr 1fr; }
  .yx-log-row { grid-template-columns: 44px 12px 1fr; }
  .yx-log-row em { display: none; }
}

@media (max-width: 768px) {
  .yx-nav-toggle { display: flex; }

  .yx-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: min(86vw, 320px);
    height: 100vh;
    background: #111827;
    flex-direction: column;
    align-items: stretch;
    padding: 72px 20px 24px;
    gap: 18px;
    transform: translateX(105%);
    transition: transform .28s ease;
    z-index: 95;
    overflow-y: auto;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
  }

  .yx-nav.is-open { transform: none; }

  .yx-nav > ul { flex-direction: column; align-items: stretch; }
  .yx-nav > ul > li > a { padding: 12px 14px; background: #1F2937; margin-bottom: 4px; }

  .yx-subnav {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    box-shadow: none;
    border: 0;
    padding: 4px 0 4px 12px;
    background: transparent;
  }

  .yx-nav > ul > li.is-open > .yx-subnav { display: block; }

  .yx-search { width: 100%; }
  .yx-search input { flex: 1; width: auto; }

  .yx-console { padding: 32px 0; }
  .yx-feed, .yx-mosaic, .yx-split { margin: 32px 0; }
  .yx-article-list a { grid-template-columns: 1fr; }
  .yx-article-list img { height: 150px; }
  .yx-detail h1 { font-size: 22px; text-align: left; }
  .yx-pagerow { flex-direction: column; }
  .yx-footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .yx-tiles { grid-template-columns: 1fr; }
  .yx-section-hd { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   Dark Theme · 昼夜切换
   - 追加于既有规则之后, 不改写原有规则
   - 默认(无 data-theme 或 =light) = 原浅色主题, 保持不动
   - 触发: html[data-theme="dark"] / body[data-theme="dark"]
   ============================================================ */

/* ---- 主题切换按钮 ---- */
.yx-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-left: 4px;
  border: 1px solid #374151;
  border-radius: 6px;
  background: var(--yx-panel);
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  flex-shrink: 0;
  transition: color .2s, border-color .2s, background-color .2s;
}
.yx-theme-toggle:hover {
  color: var(--yx-neon);
  border-color: var(--yx-lime);
  background: rgba(101, 163, 13, 0.15);
}
.yx-theme-toggle:focus-visible {
  outline: 2px solid var(--yx-neon);
  outline-offset: 2px;
}
.yx-theme-toggle svg { width: 20px; height: 20px; display: block; }

/* 浅色: 显示月亮(→深色); 深色: 显示太阳(→浅色) */
.yx-theme-toggle .yx-icon-sun { display: none; }
.yx-theme-toggle .yx-icon-moon { display: block; }
html[data-theme="dark"] .yx-theme-toggle .yx-icon-sun,
body[data-theme="dark"] .yx-theme-toggle .yx-icon-sun { display: block; }
html[data-theme="dark"] .yx-theme-toggle .yx-icon-moon,
body[data-theme="dark"] .yx-theme-toggle .yx-icon-moon { display: none; }

/* ---- 主题切换过渡(仅加在无既有 transition 的容器, 不破坏 a/subnav/nav 交互过渡) ---- */
body,
.yx-tile,
.yx-mosaic-card,
.yx-split-col,
.yx-panel,
.yx-crumb,
.yx-search,
.yx-tags a,
.yx-page li a,
.yx-page li span,
.yx-footer {
  transition: background-color .3s ease, color .3s ease, border-color .3s ease;
}

/* ---- 深色主题变量覆盖 ---- */
html[data-theme="dark"],
body[data-theme="dark"] {
  --yx-lime: #84CC16;        /* 提亮主色, 确保深色背景上可见 */
  --yx-lime-dark: #BEF264;
  --yx-neon: #BEF264;
  --yx-char: #0B0F14;
  --yx-panel: rgba(26, 33, 44, 0.8);
  --yx-ink: #E8EDF5;
  --yx-muted: #94A3B8;
  --yx-line: rgba(148, 163, 184, 0.15);
  --yx-bg: #0F1620;
  --yx-paper: rgba(26, 33, 44, 0.8);
}

/* ---- body 深色背景渐变 ---- */
html[data-theme="dark"] body,
body[data-theme="dark"] {
  background:
    radial-gradient(ellipse 50% 60% at 85% 0%, rgba(132, 204, 22, 0.08), transparent 60%),
    linear-gradient(160deg, #0F1620 0%, #0B0F14 100%);
  color: #E8EDF5;
}

/* ---- Header(本就深色, 微调边框/底色统一) ---- */
html[data-theme="dark"] .yx-header {
  background: rgba(11, 15, 20, 0.92);
  border-bottom-color: rgba(148, 163, 184, 0.15);
}

/* ---- 搜索框 ---- */
html[data-theme="dark"] .yx-search {
  background: rgba(15, 22, 32, 0.6);
  border-color: rgba(148, 163, 184, 0.2);
}
html[data-theme="dark"] .yx-search input { color: #E8EDF5; }
html[data-theme="dark"] .yx-search input::placeholder { color: #94A3B8; }

/* ---- 子导航下拉 ---- */
html[data-theme="dark"] .yx-subnav {
  background: rgba(15, 22, 32, 0.96);
  border-color: rgba(148, 163, 184, 0.15);
  backdrop-filter: blur(10px);
}

/* ---- 卡片/面板: 叠加毛玻璃 ---- */
html[data-theme="dark"] .yx-tile,
html[data-theme="dark"] .yx-mosaic-card,
html[data-theme="dark"] .yx-split-col,
html[data-theme="dark"] .yx-panel,
html[data-theme="dark"] .yx-crumb {
  backdrop-filter: blur(10px);
}

/* ---- mosaic 首卡(原深色渐变, 深色模式加 lime 描边突出) ---- */
html[data-theme="dark"] .yx-mosaic-card:first-child {
  background: linear-gradient(160deg, rgba(132, 204, 22, 0.18), rgba(11, 15, 20, 0.95));
  border: 1px solid rgba(132, 204, 22, 0.25);
}

/* ---- split-dark 列(原深色, 深色模式加 lime 边) ---- */
html[data-theme="dark"] .yx-split-dark {
  background: linear-gradient(160deg, rgba(132, 204, 22, 0.12), rgba(11, 15, 20, 0.95));
  border: 1px solid rgba(132, 204, 22, 0.2);
}

/* ---- 标签(原浅绿底 → 深色透明绿) ---- */
html[data-theme="dark"] .yx-tags a {
  background: rgba(132, 204, 22, 0.12);
  border-color: rgba(132, 204, 22, 0.3);
  color: #BEF264;
}
html[data-theme="dark"] .yx-tags a:hover {
  background: var(--yx-lime);
  border-color: var(--yx-lime);
  color: #0B0F14;
}

/* ---- 分页按钮 ---- */
html[data-theme="dark"] .yx-page li a,
html[data-theme="dark"] .yx-page li span {
  background: rgba(26, 33, 44, 0.8);
  border-color: rgba(148, 163, 184, 0.15);
}

/* ---- 排名序号底色 ---- */
html[data-theme="dark"] .yx-rank li::before {
  background: rgba(148, 163, 184, 0.12);
  color: #94A3B8;
}

/* ---- footer(本就深色, 微调) ---- */
html[data-theme="dark"] .yx-footer {
  background: #07090D;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

/* ---- 移动端导航抽屉 ---- */
@media (max-width: 768px) {
  html[data-theme="dark"] .yx-nav {
    background: #0B0F14;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.6);
  }
  html[data-theme="dark"] .yx-nav > ul > li > a {
    background: rgba(26, 33, 44, 0.6);
  }
}
