#energy-page {
  --text: #2563eb;
  --text-light: rgba(37, 99, 235, 0.12);
}

/* 内容容器 */
.energy-content {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 100px;
}

/* 余额卡片 */
.energy-balance-card-v2 {
  background: var(--glass);
  border: 1px solid var(--text);
  border-radius: 16px;
  padding: 20px 16px 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 0;
}
.energy-balance-top {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}
.energy-account-name {
  font-size: 13px;
  color: var(--subtext);
  font-weight: 500;
  line-height: 1.3;
  max-width: 60%;
  word-break: break-all;
}
.energy-recharge-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--text);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, opacity 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  border: none;
  cursor: pointer;
}
.energy-recharge-btn:active {
  transform: scale(0.95);
  opacity: 0.9;
}
.energy-balance-amount {
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  margin-top: 4px;
}
.energy-balance-amount.negative {
  color: #ff4757;
}
.energy-balance-amount.positive {
  color: var(--text);
}
.energy-balance-label {
  font-size: 12px;
  color: var(--subtext);
  opacity: 0.8;
  margin-top: 2px;
}

/* 图表卡片 */
.energy-chart-card {
  background: var(--glass);
  border: 1px solid var(--text);
  border-radius: 16px;
  padding: 14px 12px 12px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}
.energy-chart-wrap {
  width: 100%;
  height: 180px;
  position: relative;
}
#energyChartCanvas {
  width: 100%;
  height: 100%;
  display: block;
}
.energy-chart-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--subtext);
  font-weight: 500;
}
.legend-item i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.legend-item.elec i { background: #2563eb; }
.legend-item.ac i   { background: #93c5fd; }

/* 详情卡片 */
.energy-detail-card {
  background: var(--glass);
  border: 1px solid var(--text);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  padding: 14px 16px 16px;
  margin: 0;
  position: relative;
}
.energy-detail-card .score-section-title {
  margin-bottom: 12px;
}

.energy-month-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 4px;
  width: 100%;
}
.energy-month-bar::-webkit-scrollbar { display: none; }
.energy-month-bar-inside {
  margin-bottom: 12px;
}
.energy-month-btn {
  flex: 1;
  min-width: 48px;
  padding: 10px 0;
  border: 1px solid var(--border);
  background: var(--glass);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--subtext);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  text-align: center;
}
.energy-month-btn.active {
  background: var(--text);
  color: #fff;
  border-color: var(--text);
  font-weight: 600;
}
.energy-month-btn:active {
  transform: scale(0.95);
}

.energy-detail-section {
  background: rgba(128, 128, 128, 0.04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.energy-detail-section:last-child {
  margin-bottom: 0;
}
.energy-detail-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.energy-detail-section-title i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}
.energy-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.energy-detail-row:last-child {
  border-bottom: none;
}
.energy-detail-label {
  font-size: 14px;
  color: var(--subtext);
}
.energy-detail-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* 暗色模式蓝色覆盖 */
@media (prefers-color-scheme: dark) {
  #energy-page {
    --text: #60a5fa;
    --text-light: rgba(96, 165, 250, 0.15);
  }
  .legend-item.elec i { background: #60a5fa; }
  .legend-item.ac i   { background: #93c5fd; }
}
/* APP专属提示 */
.app-only-prompt {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  gap: 20px;
}

.app-only-prompt i {
  font-size: 64px;
  color: var(--text);
  opacity: 0.3;
  margin-bottom: 8px;
}

.app-only-prompt p {
  font-size: 16px;
  color: var(--subtext);
  font-weight: 600;
  margin: 0;
}

.app-only-prompt .download-btn {
  margin-top: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  background: var(--text);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  box-shadow: var(--shadow);
}

.app-only-prompt .download-btn:active {
  transform: scale(0.96);
  opacity: 0.9;
}
