/* ============================================
   source-modal.css — 源码弹窗
   ============================================ */

.source-modal-overlay{
  position:fixed;inset:0;z-index:10001;
  background:rgba(10,5,5,0.85);
  display:none;align-items:center;justify-content:center;padding:40px;
  opacity:0;transition:opacity 0.3s;
  backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);
}
.source-modal-overlay.show{display:flex;opacity:1}

.source-modal{
  position:relative;width:100%;max-width:900px;max-height:90vh;
  background:#0F0A06;border:1px solid var(--gold-light);
  display:flex;flex-direction:column;
  box-shadow:0 0 60px rgba(var(--gold-rgb), 0.2);
  animation:smZoomIn 0.3s ease-out;
}
@keyframes smZoomIn{from{transform:scale(0.95);opacity:0}to{transform:scale(1);opacity:1}}

.source-modal-close{
  position:absolute;top:12px;right:12px;
  width:36px;height:36px;border:1px solid var(--gold-light);
  background:rgba(10,5,5,0.6);color:var(--gold);
  font-size:20px;cursor:pointer;transition:all 0.3s;
  display:flex;align-items:center;justify-content:center;
  font-family:'Cinzel',serif;line-height:1;z-index:2;
}
.source-modal-close:hover{background:var(--gold);color:var(--ink)}

.source-modal-tabs{
  display:flex;gap:0;padding:20px 30px 0;
  border-bottom:1px solid var(--gold-light);
}
.source-tab{
  padding:10px 20px;font-family:'Cinzel',serif;font-size:12px;letter-spacing:0.3em;
  color:#C97B84;background:transparent;border:none;cursor:pointer;
  border-bottom:2px solid transparent;transition:all 0.3s;text-transform:uppercase;
}
.source-tab.active{color:var(--gold);border-bottom-color:var(--gold-bright)}
.source-tab:hover{color:var(--gold-light)}

.source-modal-content{
  flex:1;overflow-y:auto;padding:20px 30px;
  background:#0A0306;
}
.source-panel{display:none;margin:0;font-family:'Noto Serif SC','PingFang SC','Hiragino Sans GB','Microsoft YaHei','SF Mono','Courier New',Consolas,monospace;font-size:13px;line-height:1.9;color:var(--gold-pale);white-space:pre-wrap;word-break:break-word;overflow-wrap:break-word}
.source-panel.active{display:block}

/* Bilingual split layout
   Forces the README panel into two side-by-side columns (EN on the
   left, Chinese on the right) when the viewport is wide enough.
   On narrow viewports it falls back to a single column. The column
   width is large enough to keep markdown code blocks readable. */
.source-panel.bilingual-split {
  column-count: 2;
  column-gap: 48px;
  column-rule: 1px solid rgba(184, 134, 11, 0.25);
}
@media (max-width: 900px) {
  .source-panel.bilingual-split {
    column-count: 1;
    column-gap: 0;
    column-rule: none;
  }
}

@media(max-width:600px){
  .source-modal-overlay{padding:10px}
  .source-modal{max-height:95vh}
  .source-modal-tabs{padding:14px 16px 0;flex-wrap:wrap}
  .source-tab{padding:8px 12px;font-size:10px;letter-spacing:0.2em}
  .source-modal-content{padding:14px 16px}
  .source-panel{font-size:11px}
}

/* ============================================
   v7.1.12 source-modal 暗色增强
   - 弹窗背景：暗月蓝
   - tab 文字：月白
   - 关闭按钮：月金边
   ============================================ */
:root[data-theme="dark"] .source-modal-overlay {
  background: rgba(8, 12, 24, 0.92);
}
:root[data-theme="dark"] .source-modal {
  background: #0F1B2A;
  border-color: var(--gold-light);
  box-shadow: 0 0 60px rgba(168, 192, 216, 0.3);
}
:root[data-theme="dark"] .source-modal-close {
  border-color: var(--gold-light);
  background: rgba(15, 27, 42, 0.7);
  color: var(--text-light);
}
:root[data-theme="dark"] .source-modal-close:hover {
  background: var(--gold-light);
  color: var(--ink);
}
:root[data-theme="dark"] .source-modal-tabs {
  border-bottom-color: var(--gold-light);
}
:root[data-theme="dark"] .source-tab {
  color: var(--text-light);
}
:root[data-theme="dark"] .source-tab.active {
  color: var(--gold-bright);
  border-bottom-color: var(--gold-bright);
}
:root[data-theme="dark"] .source-tab:hover {
  color: var(--gold-light);
}
:root[data-theme="dark"] .source-modal-content {
  background: #0A1220;
}
:root[data-theme="dark"] .source-panel {
  color: var(--text-light);
}
