/* ============================================================
   StellarU AI快读 · dark.css — 暗色模式
   深墨绿夜读：基于 prefers-color-scheme
   ============================================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #101614;
    --bg-soft:   #161d1a;
    --surface:   #1a221f;
    --surface-2: #1e2824;
    --ink-900:   #ece7de;
    --ink-700:   #c4bfb4;
    --ink-500:   #8b887e;
    --ink-400:   #62645e;
    --ink-300:   #3d423c;
    --line:      #2a332e;
    --line-soft: #232c27;
    --green-50:  #12301f;
    --green-100: #1a4527;
    --green-600: #34d399;
    --green-700: #4ade80;
    --green-800: #6ee7a0;
    --gold-50:   #33270e;
    --gold-100:  #453414;
    --gold-400:  #fbbf24;
    --gold-500:  #f59e0b;
    --gold-600:  #fbbf24;
    --danger-bg: #3b1216;
    --reader-bg: #141a17;
    --reader-ink: #e2ddd1;
    --sh-xs: 0 1px 2px rgba(0,0,0,.3);
    --sh-sm: 0 2px 8px rgba(0,0,0,.3);
    --sh-md: 0 6px 24px rgba(0,0,0,.4);
    --sh-lg: 0 16px 48px rgba(0,0,0,.55);
  }

  /* TabBar 毛玻璃 */
  .tabbar {
    background: rgba(26,34,31,.9);
    border-top-color: var(--line-soft);
    box-shadow: 0 -6px 24px rgba(0,0,0,.3);
  }
  .tab-item.active { color: var(--green-600); }
  .tab-ico-ai {
    background: linear-gradient(135deg, var(--green-600), var(--green-800));
    border-color: var(--surface);
  }

  .book-cover { box-shadow: 0 8px 20px rgba(0,0,0,.5); }

  .card, .d-body-card, .d-stats {
    background: var(--surface);
    border-color: var(--line-soft);
  }

  .search-bar, .field .input, .code-box, .ai-chat-input {
    background: var(--surface);
    border-color: var(--line);
  }

  .page-head { background: rgba(16,22,20,.88); }
  .group-sticky { background: rgba(16,22,20,.92); }

  .seg { background: var(--bg-soft); }
  .seg button.on { background: var(--surface); }

  .chip { background: var(--surface); border-color: var(--line); color: var(--ink-700); }

  .boot-splash { background: var(--grad-brand); }

  .sheet, .modal { background: var(--surface); }
  .mask { background: rgba(0,0,0,.62); }

  .loading-full { background: rgba(16,22,20,.72); }
  .spinner { border-color: var(--green-100); border-top-color: var(--green-600); }

  .empty-ico { background: var(--bg-soft); }
  .empty-ico svg { color: var(--ink-300); }

  .toast { background: rgba(0,0,0,.9); }

  .reader-topbar, .reader-bottom { background: var(--reader-bg); }
  .reader-progress { background: rgba(0,0,0,.2); }

  /* 暗色下封面渐变加深以保持对比 */
  .book-cover::before { background: linear-gradient(105deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.05) 5%, rgba(255,255,255,0) 18%); }
}