/* ==========================================================================
   VIVID 主题 · 黑底高饱和（参考原生客户端那种鲜艳风）
   --------------------------------------------------------------------------
   - 只作用于首页/大厅 + 底部导航，其它页面保持赛博玻璃风
   - 通过 ?theme=vivid 启用，?theme=cyberpunk 切回，选择会记住
   - 全部规则都用 html[data-cp-theme="vivid"] 前缀，避免污染默认主题
   ========================================================================== */

:root {
  --vd-bg: #07070a;
  --vd-panel: #15151b;
  --vd-panel-2: #1c1c24;
  --vd-line: rgba(255, 255, 255, 0.07);
  --vd-text: #ffffff;
  --vd-text-2: #c9c9d6;
  --vd-text-3: #7b7b8a;
  --vd-hot-a: #ff8a00;
  --vd-hot-b: #ff2d55;
  --vd-pink: #ff3ea5;
  --vd-violet: #8b5cf6;
  --vd-cyan: #00d4ff;
  --vd-lime: #8bf000;
  --vd-gold: #ffcf3f;
}

/* 1. 底色：纯黑 + 两团很淡的暖光，不要玻璃和网格 */
html[data-cp-theme="vivid"] {
  background: var(--vd-bg) !important;
}

html[data-cp-theme="vivid"] body {
  background:
    radial-gradient(720px 400px at 92% -8%, rgba(255, 90, 30, 0.18), transparent 62%),
    radial-gradient(640px 420px at 0% 6%, rgba(150, 60, 255, 0.14), transparent 64%),
    var(--vd-bg) !important;
  background-attachment: fixed !important;
}

html[data-cp-theme="vivid"] #cp-sweep {
  display: none !important;
}

html[data-cp-theme="vivid"] #app {
  background: transparent !important;
}

html[data-cp-theme="vivid"] #app .home-v5,
html[data-cp-theme="vivid"] #app .main-scroll {
  background: transparent !important;
}

/* 2. 顶部栏：近黑底 + 细分割线 */
html[data-cp-theme="vivid"] #app .v5-header {
  background: rgba(9, 9, 13, 0.97) !important;
  border-bottom: 1px solid var(--vd-line) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

html[data-cp-theme="vivid"] #app .v5-header .van-icon,
html[data-cp-theme="vivid"] #app .v5-header .title,
html[data-cp-theme="vivid"] #app .v5-header .left,
html[data-cp-theme="vivid"] #app .v5-header .right {
  color: var(--vd-text) !important;
}

/* 3. 横幅 */
html[data-cp-theme="vivid"] #app .v5-banner {
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow:
    0 10px 24px rgba(255, 45, 85, 0.18),
    0 0 0 1px var(--vd-line) !important;
}

/* 4. 快捷入口 */
html[data-cp-theme="vivid"] #app .v5-quick .q-item {
  background: var(--vd-panel) !important;
  border: 1px solid var(--vd-line) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
}

html[data-cp-theme="vivid"] #app .v5-quick .q-item span {
  color: var(--vd-text-2) !important;
}

html[data-cp-theme="vivid"] #app .v5-quick .btn.login,
html[data-cp-theme="vivid"] #app .home-v5 .van-button--primary {
  background: linear-gradient(135deg, var(--vd-hot-a), var(--vd-hot-b)) !important;
  border: none !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(255, 45, 85, 0.35) !important;
}

html[data-cp-theme="vivid"] #app .v5-quick .btn.reg {
  background: var(--vd-panel-2) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
  box-shadow: none !important;
}

/* 5. 公告条 */
html[data-cp-theme="vivid"] #app .v5-notice {
  background: var(--vd-panel) !important;
  border: 1px solid var(--vd-line) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}

html[data-cp-theme="vivid"] #app .v5-notice .marquee-text {
  color: #ffd9b0 !important;
}

html[data-cp-theme="vivid"] #app .v5-notice .badge {
  background: linear-gradient(135deg, var(--vd-hot-a), var(--vd-hot-b)) !important;
  color: #fff !important;
  box-shadow: 0 0 10px rgba(255, 45, 85, 0.4) !important;
}

/* 6. 左侧分类：深色方块，选中变橙红渐变 */
html[data-cp-theme="vivid"] #app .sidebar {
  background: transparent !important;
  width: 72px !important;
}

html[data-cp-theme="vivid"] #app .side-item {
  width: 64px !important;
  height: 66px !important;
  flex-direction: column !important;
  gap: 2px !important;
  margin: 0 0 8px 4px !important;
  padding: 6px 0 !important;
  background: var(--vd-panel) !important;
  border: 1px solid var(--vd-line) !important;
  border-radius: 14px !important;
  box-shadow: none !important;
}

html[data-cp-theme="vivid"] #app .side-item .side-icon-box,
html[data-cp-theme="vivid"] #app .side-item .side-icon-img {
  width: 26px !important;
  height: 26px !important;
}

html[data-cp-theme="vivid"] #app .side-item .side-text {
  font-size: 11.5px !important;
  color: var(--vd-text-3) !important;
}

html[data-cp-theme="vivid"] #app .side-item.active {
  background: linear-gradient(160deg, var(--vd-hot-a), var(--vd-hot-b) 78%) !important;
  border-color: transparent !important;
  box-shadow:
    0 8px 20px rgba(255, 45, 85, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
}

html[data-cp-theme="vivid"] #app .side-item.active .side-text {
  color: #fff !important;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

html[data-cp-theme="vivid"] #app .side-item.active .side-icon-img {
  filter: brightness(1.1) saturate(1.15) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35)) !important;
}

/* 7. 分类标题 / 子标签 / 查看全部 */
html[data-cp-theme="vivid"] #app .current-category-bar,
html[data-cp-theme="vivid"] #app .category-header {
  background: var(--vd-panel) !important;
  border: 1px solid var(--vd-line) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}

html[data-cp-theme="vivid"] #app .bar-title,
html[data-cp-theme="vivid"] #app .cat-title {
  color: var(--vd-text) !important;
  font-weight: 700 !important;
}

html[data-cp-theme="vivid"] #app .bar-all {
  color: var(--vd-hot-a) !important;
}

html[data-cp-theme="vivid"] #app .sub-tab {
  color: var(--vd-text-3) !important;
  background: transparent !important;
}

html[data-cp-theme="vivid"] #app .sub-tab.active {
  color: #fff !important;
  background: linear-gradient(135deg, var(--vd-hot-a), var(--vd-hot-b)) !important;
  box-shadow: 0 4px 12px rgba(255, 45, 85, 0.3) !important;
}

html[data-cp-theme="vivid"] #app .sub-tab-indicator,
html[data-cp-theme="vivid"] #app .sub-tab-indicator:after {
  background: linear-gradient(90deg, var(--vd-hot-a), var(--vd-hot-b)) !important;
}

/* 8. 游戏卡片：深色瓦片 + 正方形彩图 + 白色粗体名称 */
html[data-cp-theme="vivid"] #app .game-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px 8px !important;
  padding: 10px 8px 18px !important;
}

html[data-cp-theme="vivid"] #app .game-card {
  background: #17171d !important;
  border: 1px solid var(--vd-line) !important;
  border-radius: 14px !important;
  padding: 4px 4px 6px !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4) !important;
}

html[data-cp-theme="vivid"] #app .game-card .img-box {
  border-radius: 11px !important;
  box-shadow: none !important;
  background: #101015 !important;
}

html[data-cp-theme="vivid"] #app .game-card .img-box img {
  filter: saturate(1.22) contrast(1.06) !important;
}

html[data-cp-theme="vivid"] #app .game-card .g-name {
  color: var(--vd-text) !important;
  font-weight: 700 !important;
  font-size: 11.5px !important;
}

html[data-cp-theme="vivid"] #app .game-card .like-icon {
  background: rgba(0, 0, 0, 0.45) !important;
  box-shadow: none !important;
}

html[data-cp-theme="vivid"] #app .game-card .like-icon .van-icon {
  color: var(--vd-gold) !important;
}

/* 每个卡片一圈彩色外发光，制造参考图那种“整排都在发光”的感觉 */
html[data-cp-theme="vivid"] #app .game-card:nth-child(6n + 1) {
  box-shadow: 0 10px 22px rgba(255, 106, 0, 0.22) !important;
}
html[data-cp-theme="vivid"] #app .game-card:nth-child(6n + 2) {
  box-shadow: 0 10px 22px rgba(0, 180, 255, 0.2) !important;
}
html[data-cp-theme="vivid"] #app .game-card:nth-child(6n + 3) {
  box-shadow: 0 10px 22px rgba(160, 80, 255, 0.22) !important;
}
html[data-cp-theme="vivid"] #app .game-card:nth-child(6n + 4) {
  box-shadow: 0 10px 22px rgba(255, 45, 133, 0.22) !important;
}
html[data-cp-theme="vivid"] #app .game-card:nth-child(6n + 5) {
  box-shadow: 0 10px 22px rgba(120, 220, 0, 0.18) !important;
}
html[data-cp-theme="vivid"] #app .game-card:nth-child(6n + 6) {
  box-shadow: 0 10px 22px rgba(255, 190, 40, 0.2) !important;
}

/* 9. 底部导航：黑底 + 选中玫红 */
html[data-cp-theme="vivid"] #app .v5-footer {
  background: rgba(9, 9, 13, 0.98) !important;
  border-top: 1px solid var(--vd-line) !important;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.5) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

html[data-cp-theme="vivid"] #app .v5-footer .tab-item {
  color: var(--vd-text-3) !important;
}

html[data-cp-theme="vivid"] #app .v5-footer .tab-item.active {
  color: #ff4d6d !important;
}

html[data-cp-theme="vivid"] #app .v5-footer .tab-item.active .van-icon {
  color: #ff4d6d !important;
  filter: drop-shadow(0 0 8px rgba(255, 77, 109, 0.6));
}

html[data-cp-theme="vivid"] #app .v5-footer .tab-item.active span {
  color: #ff4d6d !important;
  text-shadow: 0 0 10px rgba(255, 77, 109, 0.45);
}
