:root {
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --bg-color: #f3f4f6;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --border: #e5e7eb;
    --warning-bg: #fffbeb;
    --warning-border: #f59e0b;
    --warning-text: #b45309;
}

* { box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
body { background-color: var(--bg-color); color: var(--text-main); margin: 0; padding: 20px; line-height: 1.5; }

.container { display: flex; flex-direction: column; gap: 20px; max-width: 1000px; margin: 0 auto; }
@media (min-width: 768px) { .container { flex-direction: row; align-items: flex-start; } }

.panel { background: var(--card-bg); padding: 24px; border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); flex: 1; width: 100%; }
h2 { margin-top: 0; margin-bottom: 20px; font-size: 1.25rem; border-bottom: 1px solid var(--border); padding-bottom: 10px; }

.control-group { margin-bottom: 20px; }
label { display: block; font-weight: 600; margin-bottom: 12px; }

/* 目标电量小步进器 */
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button { width: 36px; height: 36px; border: 1px solid var(--border); background: #f9fafb; border-radius: 6px; font-size: 1.2rem; cursor: pointer; color: var(--text-main); }
.stepper input { width: 80px; height: 36px; text-align: center; border: 1px solid var(--border); border-radius: 6px; font-size: 1.1rem; }

/* 起始电量大步进器 */
.stepper-large { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; background: #f9fafb; padding: 16px; border-radius: 10px; border: 1px solid var(--border); }
.stepper-large button { width: 40px; height: 40px; border: 1px solid var(--border); background: white; border-radius: 6px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: 0.2s; color: var(--text-main); }
.stepper-large button:hover { background: var(--primary); color: white; border-color: var(--primary); }
.stepper-large input { width: 70px; height: 46px; text-align: center; border: 1px solid var(--border); border-radius: 6px; font-size: 1.5rem; font-weight: bold; color: var(--primary); margin: 0 10px; background: white; }

input[type="range"] { width: 100%; margin: 10px 0; }

.quick-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.quick-btns button { padding: 6px 12px; border: 1px solid var(--border); background: white; border-radius: 16px; cursor: pointer; transition: 0.2s; font-size: 0.9rem; color: var(--text-main); }
.quick-btns button.active, .quick-btns button:hover { background: var(--primary); color: white; border-color: var(--primary); }

.time-inputs { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.time-inputs input[type="time"] { padding: 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 1rem; }

.btn-calc { width: 100%; padding: 14px; background: var(--primary); color: white; border: none; border-radius: 8px; font-size: 1.15rem; font-weight: bold; cursor: pointer; transition: 0.2s; margin-top: 10px; }
.btn-calc:hover { background: var(--primary-hover); }

.result-box { display: none; margin-top: 10px; }
.result-item { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px dashed var(--border); }
.result-val { font-weight: bold; font-size: 1.1rem; color: var(--primary); }

.warning-box { display: none; background: var(--warning-bg); border: 1px solid var(--warning-border); padding: 16px; border-radius: 8px; margin-top: 10px; color: var(--warning-text); }
.warning-box h4 { margin: 0 0 10px 0; display: flex; align-items: center; gap: 5px; }
.warning-box ul { margin: 0; padding-left: 20px; }
.warning-box li { margin-bottom: 5px; }
