/* ============================================ */
/*  大屏展示模式 (Big Screen Mode)               */
/*  触发: body.bigscreen                         */
/*  兼容: dashboard / review / weekly 三页       */
/* ============================================ */

body.bigscreen {
  background: 
    radial-gradient(circle at 20% 0%, rgba(167,139,250,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 100%, rgba(74,222,128,0.04) 0%, transparent 50%),
    #07070a;
}

/* 内容区限宽,跟其他页面对齐 */
body.bigscreen .main,
body.bigscreen .container,
body.bigscreen .wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 80px;
}

/* === 顶部状态条 (dashboard) / 页面副标题 (review/weekly) === */
/* 两者在大屏模式下视觉完全一致 */
body.bigscreen .status-strip,
body.bigscreen .page-subtitle {
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0.15em !important;
  text-transform: uppercase !important;
  color: #a78bfa !important;
  margin: 0 0 24px 0 !important;
  padding: 12px 18px !important;
  background: linear-gradient(90deg, rgba(167,139,250,0.08), transparent) !important;
  border-left: 3px solid #a78bfa !important;
  border-radius: 0 6px 6px 0;
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  box-sizing: border-box;
}

/* page-subtitle 右侧按钮(← PREV / NEXT →)样式 */
body.bigscreen .weekly-nav a,
body.bigscreen .page-subtitle a {
  font-size: 12px !important;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #a78bfa !important;
  border: 1px solid rgba(167,139,250,0.3);
  background: rgba(167,139,250,0.05);
  padding: 4px 10px;
}

/* === KPI 网格 (兼容 .kpi-grid 和 .grid) === */
body.bigscreen .kpi-grid,
body.bigscreen .grid {
  gap: 20px;
  margin-bottom: 24px;
}

/* === KPI 卡片 === */
body.bigscreen .kpi {
  padding: 32px 28px;
  background: linear-gradient(135deg, rgba(167,139,250,0.05), rgba(0,0,0,0.3));
  border: 1px solid rgba(167,139,250,0.2);
  border-radius: 10px;
  box-shadow: 0 0 40px rgba(167,139,250,0.08), inset 0 1px 0 rgba(255,255,255,0.05);
  position: relative;
  overflow: hidden;
}

/* 卡片扫光线 */
body.bigscreen .kpi::before {
  content: ''; position: absolute; top: 0; left: -100%;
  width: 50%; height: 1px;
  background: linear-gradient(90deg, transparent, #a78bfa, transparent);
  animation: rg-kpi-scan 5s ease-in-out infinite;
}
@keyframes rg-kpi-scan {
  0%   { left: -50%; }
  50%  { left: 150%; }
  100% { left: 150%; }
}

/* === KPI 标签 (兼容 .kpi-label / .kpi-l) === */
body.bigscreen .kpi-label,
body.bigscreen .kpi-l {
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0.25em !important;
  color: rgba(167,139,250,0.8) !important;
  margin-bottom: 14px !important;
  text-transform: uppercase;
}

/* === KPI 数字 (兼容 .kpi-value / .kpi-v) === */
body.bigscreen .kpi-value,
body.bigscreen .kpi-v {
  font-size: 56px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: -0.02em !important;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 30px currentColor;
  transition: text-shadow 0.5s;
}

body.bigscreen .kpi-value.success,
body.bigscreen .kpi-v.success {
  color: #4ade80;
  text-shadow: 0 0 24px rgba(74,222,128,0.6), 0 0 48px rgba(74,222,128,0.3);
}
body.bigscreen .kpi-value.danger,
body.bigscreen .kpi-v.danger {
  color: #f87171;
  text-shadow: 0 0 24px rgba(248,113,113,0.6), 0 0 48px rgba(248,113,113,0.3);
}
body.bigscreen .kpi-value.warning,
body.bigscreen .kpi-v.warning {
  color: #fbbf24;
  text-shadow: 0 0 24px rgba(251,191,36,0.6), 0 0 48px rgba(251,191,36,0.3);
}

/* === KPI 副文字 (兼容 .kpi-sub / .kpi-s) === */
body.bigscreen .kpi-sub,
body.bigscreen .kpi-s {
  font-size: 13px !important;
  color: rgba(255,255,255,0.55) !important;
  margin-top: 10px !important;
  letter-spacing: 0.05em !important;
}

/* === 卡片(持仓/规则/事件/日历/图表) === */
body.bigscreen .card,
body.bigscreen .calendar-card,
body.bigscreen .pnl-card,
body.bigscreen .scatter-card,
body.bigscreen .stats-card,
body.bigscreen .events-card {
  padding: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(0,0,0,0.15));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.04);
}

body.bigscreen .card h2,
body.bigscreen .section-title,
body.bigscreen .cal-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: rgba(167,139,250,0.9);
  margin-bottom: 18px;
  text-transform: uppercase;
}

/* === 规则状态 === */
body.bigscreen [data-rule] {
  padding: 14px 16px;
  font-size: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
body.bigscreen .rule-icon {
  font-size: 18px;
  font-weight: 700;
}
body.bigscreen .rule-icon.pass { color: #4ade80; text-shadow: 0 0 12px #4ade80; }
body.bigscreen .rule-icon.fail { color: #f87171; text-shadow: 0 0 12px #f87171; }
body.bigscreen .rule-icon.warn { color: #fbbf24; text-shadow: 0 0 12px #fbbf24; }

/* === Header === */
body.bigscreen .header,
body.bigscreen .top-header {
  background: rgba(7,7,10,0.7) !important;
  border-bottom: 1px solid rgba(167,139,250,0.15);
}
body.bigscreen .header h1,
body.bigscreen .top-header h1,
body.bigscreen .th-left h1 {
  font-size: 20px !important;
  background: linear-gradient(90deg, #a78bfa, #c4a8ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* === 状态点呼吸效果 === */
body.bigscreen .status-dot.connected {
  box-shadow: 0 0 0 4px rgba(74,222,128,0.2), 0 0 12px #4ade80;
  animation: rg-pulse-dot 2s ease-in-out infinite;
}
@keyframes rg-pulse-dot {
  0%, 100% { box-shadow: 0 0 0 4px rgba(74,222,128,0.2), 0 0 12px #4ade80; }
  50%      { box-shadow: 0 0 0 8px rgba(74,222,128,0.1), 0 0 20px #4ade80; }
}

body.bigscreen #last-update {
  font-size: 16px;
  font-weight: 600;
  color: #a78bfa;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
}

/* 大屏模式: 三时区时钟放大 */
body.bigscreen .clock-group {
  font-size: 16px;
  gap: 16px;
}
body.bigscreen .clock-group .clock-row span:not(.clock-tz) {
  color: #a78bfa;
  font-weight: 600;
  letter-spacing: 0.08em;
}
body.bigscreen .clock-tz {
  font-size: 12px;
  color: rgba(188,196,255,0.9);
}

/* === 按钮 === */
body.bigscreen .btn {
  padding: 18px 14px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* === 持仓告警 === */
body.bigscreen .pos-warning {
  color: #fbbf24;
  text-shadow: 0 0 12px #fbbf24;
  font-weight: 700;
}

/* === 移动端: 大屏模式收紧 === */
@media (max-width: 900px) {
  body.bigscreen .main,
  body.bigscreen .container,
  body.bigscreen .wrap { padding: 16px 14px 80px; }
  body.bigscreen .kpi-grid,
  body.bigscreen .grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px; }
  body.bigscreen .kpi { padding: 20px 16px; }
  body.bigscreen .kpi-value,
  body.bigscreen .kpi-v { font-size: 36px !important; }
}


/* 大屏模式下数值折行修复
   56px 时 "+£215.88" 这种长数字会被挤成两行 (符号一行、数字一行)。
   禁止折行 + 允许在窄卡片里自动缩小, 保证一行显示完。 */
body.bigscreen .kpi-value {
  white-space: nowrap !important;
  font-size: clamp(30px, 4.2vw, 56px) !important;
  line-height: 1.1 !important;
}
body.bigscreen .kpi {
  min-width: 0;
  overflow: hidden;
}
