/* === Spacing scale: every value is a multiple of 4px === */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* === 全局字号变量（默认桌面端）=== */
:root {
  --fs-xs: 11px;
  --fs-sm: 12px;
  --fs-base: 13px;
  --fs-md: 14px;
  --fs-lg: 16px;
  --fs-xl: 18px;
}

html {
  min-width: 375px;
  overflow-x: hidden;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  background: #0d1117; color: #c9d1d9;
  min-height: 100vh;
  font-size: var(--fs-base);
  -webkit-text-size-adjust: 100%;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.header {
  background: #161b22; border-bottom: 1px solid #30363d;
  padding: 0; display: flex; flex-direction: column; gap: 0;
  position: sticky; top: 0; z-index: 100;
  margin-top: 0;
}

.header-disclaimer {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.header-content {
  padding: 0 10px;
}

@media screen and (max-width: 420px) {
  .header-content {
    padding: 0 10px;
  }
  .header-row { gap: 4px; }
  .search-box { flex: 1 1 100%; margin-top: 4px; }
  .search-box input { padding: 6px 8px; font-size: clamp(14px, 4vw, 16px); line-height: 1.4; }
  .btn-login-status {
    position: relative;
    flex-shrink: 0;
  }
  .login-dropdown {
    right: -4px;
  }
  .wl-star { width: 26px; height: 26px; font-size: 14px; line-height: 26px; }
}

.disclaimer-bar {
  width: 100%;
  box-sizing: border-box;
  background: linear-gradient(90deg, #f59e0b, #ef4444, #f59e0b);
  background-size: 200% 100%;
  padding: 8px 0;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  line-height: 1.5;
  box-shadow: 0 3px 16px rgba(239, 68, 68, 0.4), 0 2px 6px rgba(0,0,0,0.3);
  animation: disclaimerPulse 3s ease-in-out infinite;
}
@keyframes disclaimerPulse {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@media screen and (max-width: 420px) {
  .disclaimer-bar { font-size: 13px; padding: 8px 0; }
}
/* 风险确认弹窗 */
.risk-overlay { min-width: 375px; display:none; position:fixed; top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.7);z-index:9999;justify-content:center;align-items:center; }
.risk-overlay.show { display:flex; }
.risk-dialog { background:#161b22;border:1px solid #30363d;border-radius:12px;padding:24px 28px;max-width:420px;width:90%;text-align:center; }
.risk-dialog h3 { color:#f0c040;margin-bottom:12px;font-size:18px; }
.risk-dialog p { color:#8b949e;font-size:13px;line-height:1.7;margin-bottom:8px;text-align:left; }
.risk-dialog .risk-highlight { color:#f85149;font-weight:600; }
.risk-dialog .risk-buttons { margin-top:20px;display:flex;gap:10px;justify-content:center; }
.risk-dialog button { padding:8px 24px;border-radius:6px;border:none;font-size:14px;cursor:pointer; }
.risk-dialog .btn-risk-accept { background:#f0c040;color:#0d1117;font-weight:600; }
.risk-dialog .btn-risk-accept:hover { background:#e6b800; }
.risk-dialog .btn-risk-deny { background:#30363d;color:#8b949e; }
.risk-dialog .btn-risk-deny:hover { background:#484f58; }
.header-row {
  display: flex; align-items: center; gap: 6px; width: 100%;
  flex-wrap: wrap; position: relative; margin: 5px 0;
}
.header h1 { font-size: 20px; color: #58a6ff; white-space: nowrap; }
.search-box { flex: 1 1 auto; display: flex; align-items: center; gap: 4px; position: relative; min-width: 0; }
.search-box input {
  flex: 1 1 0; min-width: 60px; padding: 6px 10px; border-radius: 6px; border: 1px solid #30363d;
  background: #0d1117; color: #c9d1d9; outline: none; font-size: clamp(12px, 2.5vw, 13px);
}
.search-box input:focus { border-color: #58a6ff; }
.search-clear {
  display: none; position: static; width: 24px; height: 24px; margin-left: 0; flex-shrink: 0;
  border: none; background: #484f58; color: #c9d1d9; font-size: 13px; line-height: 24px;
  border-radius: 6px; cursor: pointer; text-align: center; padding: 0; transition: all 0.15s;
}
.search-clear:hover { background: #6e7681; }
.wl-star {
  width: 32px; height: 32px; border: none; background: none; cursor: pointer;
  font-size: 20px; color: #484f58; line-height: 32px; text-align: center;
  border-radius: 6px; transition: all 0.2s; flex-shrink: 0;
}
.wl-star:hover { color: #f0c040; background: #1f6feb22; }
.wl-star.on { color: #f0c040; }
.wl-dropdown {
  padding: 6px 10px; border-radius: 6px; border: 1px solid #30363d;
  background: #0d1117; color: #c9d1d9; font-size: 13px; min-width: 140px;
  cursor: pointer; outline: none;
}
.wl-dropdown option { background: #161b22; color: #c9d1d9; }
.wl-dropdown:focus { border-color: #58a6ff; }
.controls {
  padding-bottom: 8px; display: flex; flex-direction: column; gap: 4px;
}
.controls-row {
  display: flex; gap: 10px; align-items: center; width: 100%;
}
.controls-row button {
  margin-left: auto;
}
.controls label { font-size: 12px; color: #8b949e; }
.controls input, .controls select {
  padding: 4px 8px; border-radius: 6px; border: 1px solid #30363d;
  background: #0d1117; color: #c9d1d9; font-size: 12px;
}
.controls button {
  padding: 4px 12px; border-radius: 6px; border: none;
  background: #238636; color: #fff; cursor: pointer; font-size: 12px;
}
.controls button:hover { background: #2ea043; }
.controls button:disabled { background: #30363d; color: #8b949e; cursor: not-allowed; }
.search-results {
  position: absolute; top: 100%; left: 0; right: 0; background: #161b22;
  border: 1px solid #30363d; border-radius: 6px; max-height: 300px; overflow-y: auto;
  display: none; z-index: 200;
}
.search-results.show { display: block; }
.search-item {
  padding: 6px 12px; cursor: pointer; display: flex; justify-content: space-between;
  border-bottom: 1px solid #21262d;
}
.search-item:hover { background: #1f6feb22; }
.search-item .code { color: #8b949e; font-size: 13px; }
.search-item .name { font-weight: 500; }
.info-bar {
  display: flex; gap: 4px; flex-wrap: wrap;
  /* infoBar 始终可见，按钮立即可点击 */
}
.info-bar span {
  padding: 5px; border-radius: 4px; font-size: 12px;
  background: #21262d; border: 1px solid #30363d;
}
.info-bar .ib-meta {
  padding: 4px 10px; border-radius: 4px; font-size: 12px;
  background: transparent; border: 1px dashed #30363d; color: #8b949e;
}
.info-bar .up { color: #f85149; }
.info-bar .down { color: #3fb950; }
.info-bar .btn-refresh {
  padding: 4px 6px; border-radius: 4px; font-size: 14px;
  background: #21262d; border: 1px solid #30363d;
  color: #8b949e; cursor: pointer; line-height: 1;
  transition: color 0.2s, border-color 0.2s;
}
.info-bar .btn-refresh:hover { color: #58a6ff; border-color: #58a6ff; }
.info-bar .btn-refresh.loading { color: #d29922; animation: spin 0.8s linear infinite; }
.info-bar .btn-refresh.cooldown { opacity: 0.4; cursor: not-allowed; color: #484f58 !important; border-color: #21262d !important; }
.info-bar .btn-refresh.shake { animation: shake 0.35s ease; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}
.disclaimer {
  font-size: 11px; color: #6e7681; text-align: left; padding-top: 4px;
  flex-shrink: 0; align-self: flex-start;
}
.tabs {
  display: flex; gap: 0; padding: 0 24px; border-bottom: 1px solid #30363d;
  flex-wrap: wrap;
}
.tab-btn {
  padding: 8px 20px; background: none; color: #8b949e; border: none;
  cursor: pointer; font-size: 14px; border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.tab-btn.active { color: #58a6ff; border-bottom-color: #58a6ff; }
.tab-btn:hover { color: #c9d1d9; }
.tab-content { display: none; padding: 10px; }
.tab-content.active { display: block; }
.chart-container { display: grid; gap: 16px; }
.chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.chart-box {
  background: #161b22; border: 1px solid #30363d; border-radius: 8px;
  overflow: hidden; width: 100%; min-width: 0; position: relative;
}
.chart-box.full { grid-column: 1 / -1; }
.chart-box .title {
  padding: 8px 16px; font-size: 14px; font-weight: 600;
  border-bottom: 1px solid #21262d; color: #e6edf3;
}
.chart-box .chart { width: 100%; }

.kline-loading-overlay {
  display: none; position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(13, 17, 23, 0.88);
  color: #c9d1d9; font-size: 14px;
  justify-content: center; align-items: flex-start; padding-top: 200px;
  z-index: 80;
  font-weight: 500;
}
.kline-loading-overlay.show { display: flex; }

/* 基本面面板 */
.fundamental-panel {  }
.fundamental-loading, .fundamental-error, .fundamental-empty {
  text-align: center; color: #8b949e; padding: 60px 0; font-size: 14px;
}
.fundamental-error { color: #f85149; }
.fundamental-card {
  background: #161b22; border: 1px solid #30363d; border-radius: 8px; padding: 10px;
}
.fundamental-title {
  font-size: 18px; font-weight: 600; color: #e6edf3; margin-bottom: 20px;
  padding-bottom: 12px; border-bottom: 1px solid #30363d;
}
.fundamental-section { margin-bottom: 20px; }
.fundamental-section:last-child { margin-bottom: 0; }
.fundamental-section-title {
  font-size: 14px; font-weight: 600; color: #58a6ff; margin-bottom: 8px;
}
.fundamental-section-content {
  font-size: 14px; color: #c9d1d9; line-height: 1.8;
}

/* 寻优中遮罩层 */
.chart-overlay {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(13,17,23,0.85);
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  z-index: 50; border-radius: 8px;
  color: #f0c040; font-size: 14px; font-weight: 500;
  gap: 8px;
}
.chart-overlay .overlay-icon {
  font-size: 28px; animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.05); }
}
.bt-panel {
  background: #161b22; border: 1px solid #30363d; border-radius: 8px;
  padding: 12px; margin-top: 12px; margin-bottom: 12px;
}
.bt-panel .title {
  font-size: 14px; font-weight: 600; color: #e6edf3;
  padding-bottom: 8px;
  margin-bottom: 8px;
}
.bt-config {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end;
  margin-bottom: 8px;
}
.bt-config .field { display: flex; flex-direction: column; gap: 4px; }
.bt-config label { font-size: 12px; color: #8b949e; }
.bt-config select, .bt-config input {
  padding: 6px 10px; border-radius: 6px; border: 1px solid #30363d;
  background: #0d1117; color: #c9d1d9; font-size: 13px;
}
.bt-config button {
  padding: 8px 20px; border-radius: 6px; border: none;
  background: #238636; color: #fff; cursor: pointer; font-size: 14px;
}
.bt-config button:hover { background: #2ea043; }
.bt-config button:disabled { background: #30363d; color: #8b949e; cursor: not-allowed; }
.bt-config button.btn-opt {
  background: #1f6feb; color: #fff;
}
.bt-config button.btn-opt:hover { background: #388bfd; }
.metrics {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px; margin-bottom: 12px;
}
.metric-card {
  background: #0d1117; border: 1px solid #21262d; border-radius: 6px;
  padding: 8px; text-align: center;
}
.metric-card .label { font-size: 12px; color: #8b949e; margin-bottom: 4px; }
.metric-card .value { font-size: 20px; font-weight: 700; }
.metric-card .value.positive { color: #f85149; }
.metric-card .value.negative { color: #3fb950; }
.metric-card .value.neutral { color: #c9d1d9; }
.loading {
  text-align: center; padding: 40px; color: #8b949e; font-size: 14px;
}
.error {
  text-align: center; padding: 40px; color: #f85149; font-size: 14px;
}
.trade-list {
  margin-top: 12px;
}
.trade-list table { width: 100%; font-size: 13px; border-collapse: collapse; border: 1px solid #30363d; }
.trade-list th {
  text-align: left; padding: 6px 10px; border: 1px solid #30363d;
  color: #8b949e; font-weight: 500;
}
.trade-list td { padding: 6px 10px; border: 1px solid #21262d; }
.trade-list .buy { color: #f85149; }
.trade-list .sell { color: #3fb950; }
/* 策略对比表（同 .bt-panel 样式，表格自适应宽度） */
/* 小屏：策略列多、远超视口宽度，改为容器内横向滚动，避免右侧列被裁切且无法滚动 */
#strategyCompTable { overflow-x: auto; -webkit-overflow-scrolling: touch; }
#strategyCompTable table { width: auto; min-width: 100%; font-size: 13px; border-collapse: collapse; border: 1px solid #30363d; }
#strategyCompTable th {
  text-align: center; padding: 8px 4px; border: 1px solid #30363d;
  color: #8b949e; font-weight: 500;
  /* 表头竖排：列窄、不需横滑即可看全所有策略 */
  writing-mode: vertical-rl; text-orientation: mixed; white-space: nowrap;
}
#strategyCompTable td { padding: 5px 8px; border: 1px solid #21262d; }
/* 分析面板卡片 */
.analysis-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 12px; padding: 8px 0;
}
.analysis-card {
  background: #161b22; border: 1px solid #30363d; border-radius: 8px;
  padding: 12px;
}
.analysis-card .ac-title {
  font-size: 14px; font-weight: 600; color: #58a6ff;
  margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid #21262d;
}
.analysis-card .ac-row {
  display: flex; justify-content: space-between; padding: 4px 0;
  font-size: 13px; line-height: 1.6;
}
.analysis-card .ac-label { color: #8b949e; }
.analysis-card .ac-value { color: #c9d1d9; font-weight: 500; }
.analysis-card .ac-value.up { color: #f85149; }
.analysis-card .ac-value.down { color: #3fb950; }
.analysis-card .ac-note {
  font-size: 12px; color: #6e7681; margin-top: 8px; line-height: 1.5;
}
.analysis-loading {
  text-align: center; padding: 60px; color: #8b949e; font-size: 14px;
}
/* 选股面板（Tab 切换） */
.stock-panel {
  background: #161b22; border-bottom: 1px solid #30363d;
}
.panel-tabs {
  display: flex; padding: 8px; gap: 0;
}
.panel-tab {
  flex: 1; padding: 6px 4px; border: none; border-radius: 8px 8px 0 0;
  background: transparent; color: #8b949e; font-size: 13px;
  cursor: pointer; transition: all 0.2s;
  border: 1px solid transparent; border-bottom: none;
  line-height: 1.35; text-align: center; white-space: nowrap;
}
.panel-tab:hover { color: #e6edf3; background: #21262d; }
.panel-tab.active {
  color: #58a6ff; background: #0d1117;
  border-color: #30363d; font-weight: 600;
}
.panel-tab .tab-date {
  font-size: 11px; font-weight: 400; opacity: 0.7;
}
.panel-tab .tab-badge {
  display: inline-block; margin-left: 4px; padding: 0 5px;
  border-radius: 10px; font-size: 10px; font-weight: 600;
  background: #1f6feb33; color: #58a6ff; min-width: 16px; text-align: center;
}
.panel-subtabs {
  display: none; padding: 4px 24px 0; gap: 2px;
  background: #0d1117;
}
.panel-subtabs.active { display: flex; }
.panel-subtab {
  padding: 4px 14px; border: none; border-radius: 6px 6px 0 0;
  background: transparent; color: #8b949e; font-size: 12px;
  cursor: pointer; transition: all 0.15s;
  border: 1px solid transparent; border-bottom: 2px solid transparent;
}
.panel-subtab:hover { color: #c9d1d9; background: #1f2430; }
.panel-subtab.active {
  color: #58a6ff; border-bottom-color: #58a6ff;
  background: #161b22; border-color: #30363d;
  font-weight: 600;
}
.panel-subtab .sub-count {
  margin-left: 4px; font-size: 10px; color: #8b949e; font-weight: 400;
}
.panel-cards {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px; overflow-x: auto; flex-wrap: nowrap;
  background: #0d1117; border-top: 1px solid #30363d;
}
.panel-empty {
  color: #8b949e; font-size: 13px; padding: 8px 0;
  flex: 0 0 auto; min-width: 200px;
}
.stock-card .rc-board-tag {
  flex-shrink: 0; margin-left: 6px;
  font-size: 10px; color: #f0c040; font-weight: 600;
  background: #f0c04022; border: 1px solid #f0c04055;
  border-radius: 4px; padding: 1px 5px;
}
.stock-card {
  flex: 0 0 auto; max-width: 200px; min-width: 150px; max-height: 90px;
  background: #0d1117; border: 1px solid #30363d; border-radius: 8px;
  padding: 0; cursor: pointer;
  transition: all 0.2s; position: relative; overflow: hidden;
  display: flex; flex-direction: column;
}
.stock-card:hover {
  border-color: #58a6ff; background: #1f6feb11; transform: translateY(-1px);
}
.stock-card .rc-top {
  display: flex; justify-content: flex-start; align-items: center; gap: 6px;
  margin: 3px 5px 1px;
  line-height: 1;
}
.stock-card .rc-top > * {
  display: inline-flex; align-items: center;
}
.stock-card .rc-name-row {
  display: flex; align-items: center; gap: 4px; flex-shrink: 0;
}
.stock-card .rc-name {
  font-size: 13px; font-weight: 600; color: #e6edf3;
  white-space: nowrap;
}
.stock-card .rc-code {
  font-size: 10px; color: #8b949e; white-space: nowrap; flex-shrink: 0;
}
.stock-card .rc-score {
  flex-shrink: 0; margin-left: 6px;
  font-size: 10px; color: #58a6ff; font-weight: 600;
  background: #1f6feb22; border: 1px solid #1f6feb55;
  border-radius: 4px; padding: 1px 4px;
}
.stock-card .rc-net {
  flex-shrink: 0; white-space: nowrap;
  display: inline-flex; align-items: center;
  padding: 1px 0;
}
.stock-card .rc-bull-days {
  flex-shrink: 0;
  font-size: 10px; color: #d2991d; font-weight: 600;
  background: #d2991d22; border: 1px solid #d2991d55;
  border-radius: 4px; padding: 1px 4px;
  margin-left: 6px;
}
.stock-card .rc-price-row {
  display: flex; gap: 8px; align-items: baseline; margin: 1px 5px;
}
.stock-card .rc-price {
  font-size: 15px; font-weight: 700;
}
.stock-card .rc-pct {
  font-size: 12px; font-weight: 500;
}
.stock-card .rc-reason {
  font-size: 10px; color: #f0c040; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin: 1px 5px 3px;
}
.stock-card .rc-industry {
  font-size: 10px; color: #8b949e; margin-left: auto; white-space: nowrap;
}
.stock-card .lhb-reason {
  font-size: 10px; color: #f0c040; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; word-break: break-all;
  margin: 1px 5px 3px;
}
.stock-card.skeleton {
  pointer-events: none; opacity: 0.5;
}
.stock-card.skeleton .rc-name,
.stock-card.skeleton .rc-price,
.stock-card.skeleton .rc-reason {
  background: #21262d; border-radius: 4px; color: transparent;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}



/* ========================================================
   登录弹窗
   ======================================================== */
.login-overlay {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7); z-index: 1000;
  justify-content: center; align-items: safe center;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 16px;
}
.login-overlay.show { display: flex; }

.hint-overlay {
  display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5); z-index: 2000;
  justify-content: center; align-items: center;
  padding: 16px;
}
.hint-overlay.show { display: flex; animation: hintFadeIn 0.18s ease-out; }
@keyframes hintFadeIn { from { opacity: 0; } to { opacity: 1; } }
.hint-modal {
  background: #161b22; border: 1px solid #30363d; border-radius: 10px;
  padding: 18px 22px; max-width: 86vw; cursor: pointer;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  display: flex; align-items: center; gap: 12px;
  animation: hintPop 0.18s ease-out;
}
@keyframes hintPop { from { transform: scale(0.92); } to { transform: scale(1); } }
.hint-icon {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%;
  background: #f0883e; color: #fff; font-weight: bold; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.hint-text {
  color: #e6edf3; font-size: 14px; line-height: 1.5;
}
.login-modal {
  background: #161b22; border: 1px solid #30363d; border-radius: 12px;
  padding: 24px; width: 360px; max-width: 90vw; max-height: 85vh;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  margin: auto;
}
.login-modal h2 {
  font-size: 20px; color: #e6edf3; margin-bottom: 4px;
}
.login-modal .subtitle {
  font-size: 13px; color: #8b949e; margin-bottom: 16px; line-height: 1.5;
}
.login-modal .field {
  margin-bottom: 12px; display: flex; flex-direction: column; gap: 4px;
}
.login-modal label {
  font-size: 13px; color: #8b949e;
}
.login-modal input {
  padding: 10px 12px; border-radius: 6px; border: 1px solid #30363d;
  background: #0d1117; color: #c9d1d9; font-size: 15px; outline: none;
  transition: border-color 0.2s;
}
.login-modal input:focus { border-color: #58a6ff; }
.login-modal .btn-row {
  display: flex; gap: 8px; margin-top: 16px;
}
.login-modal button {
  flex: 1; padding: 10px; border-radius: 6px; border: none;
  font-size: 14px; cursor: pointer; transition: background 0.2s;
}
.login-modal .btn-login {
  background: #238636; color: #fff; font-weight: 600;
}
.login-modal .btn-login:hover { background: #2ea043; }
.login-modal .btn-login:disabled { background: #30363d; color: #8b949e; cursor: not-allowed; }
.login-modal .btn-cancel {
  background: #21262d; color: #c9d1d9;
}
.login-modal .btn-cancel:hover { background: #30363d; }
.login-modal .login-error {
  font-size: 13px; color: #f85149; margin-top: 8px; display: none; text-align: center;
}
.login-modal .login-error.show { display: block; }
.login-modal .login-tip {
  font-size: 11px; color: #58a6ff; margin-top: 12px; text-align: center; line-height: 1.5;
  cursor: pointer; text-decoration: underline;
}
.login-tip:hover { color: #79c0ff; }
.login-qrcode {
  display: none; width: 160px; height: 160px; margin: 12px auto 0;
  border-radius: 8px; border: 1px solid #30363d;
}
.qrcode-hint {
  font-size: 11px; color: #8b949e; text-align: center; margin: 8px 0 0;
}
.btn-login-status {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  border: none; background: none; cursor: pointer; flex-shrink: 0; padding: 0; min-width: 36px; height: 32px;
}
/* 登录按钮：未登录显示文字，已登录显示图标 */
.login-text-label {
  font-size: 13px; color: #8b949e; white-space: nowrap;
}
.login-personal-label {
  display: none; font-size: 18px; color: #e6edf3; line-height: 1;
}
.btn-login-status.logged-in .login-personal-label { display: inline-block; }
.btn-login-status:hover .login-text-label,
.btn-login-status:hover .login-personal-label { color: #58a6ff; }
.login-dropdown {
  display: none; position: absolute; top: calc(100% + 4px); right: 0;
  min-width: 130px;
  background: #0d1117; border: 1px solid #30363d; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5); z-index: 1001;
  flex-direction: column; padding: 4px 0;
  animation: ddFadeIn 0.12s ease-out;
}
@keyframes ddFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.login-dd-user {
  padding: 8px 12px; font-size: 13px; color: #c9d1d9; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid #21262d;
}
.login-dd-item {
  padding: 8px 12px; font-size: 13px; color: #8b949e; cursor: pointer;
  transition: all 0.15s; white-space: nowrap;
}
.login-dd-item:hover { background: #1f2430; color: #e6edf3; }
.login-status-wrap {
  position: relative; display: inline-flex; align-items: center; gap: 4px;
}
.login-dropdown.login-dd-hidden {
  display: none;
}
.btn-login-status:hover {
  box-shadow: 0 0 0 2px #58a6ff33;
}
/* 下拉展开/收起由 dd-open 类控制 */
.login-status-wrap.dd-open .login-dropdown {
  display: flex;
}

/* === 登录模态框 === */
