/* ===== 全局重置与主题 ===== */
* { box-sizing: border-box; }
body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: #64B5F6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    margin: 0;
}
.container {
    max-width: 1200px;
    width: 100%;
    background: transparent;
    border-radius: 48px;
    padding: 30px 35px;
    box-shadow: 0 25px 50px -8px rgba(0, 40, 80, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.3), inset 0 8px 12px rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}
.container::before {
    content: '';
    position: absolute; top: -10px; left: 20%; width: 60%; height: 25px;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%; pointer-events: none; opacity: 0.7;
}
.nav-bar {
    display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap;
    background: rgba(255,255,255,0.25); padding: 8px 12px; border-radius: 40px;
    backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.2);
}
.nav-bar button {
    background: transparent; border: none; padding: 10px 24px; border-radius: 40px;
    font-weight: 700; font-size: 15px; cursor: pointer; transition: 0.2s; color: #0a2a44; backdrop-filter: blur(2px);
}
.nav-bar button:hover { background: rgba(255,255,255,0.3); }
.nav-bar button.active {
    background: rgba(0, 136, 204, 0.85); color: white;
    box-shadow: 0 8px 16px -6px rgba(0, 40, 80, 0.25); border: 1px solid rgba(255,255,255,0.3);
}
.page { display: none; animation: fadeIn 0.3s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
h1 { font-size: 28px; color: #0a2a44; margin: 0 0 6px 0; display: flex; align-items: center; gap: 10px; text-shadow: 0 2px 6px rgba(255,255,255,0.3); }
.subtitle { color: #1a3a5a; font-size: 14px; margin-bottom: 20px; line-height: 1.6; }
.mode-switch {
    display: flex; gap: 20px; flex-wrap: wrap; background: rgba(255, 255, 255, 0.35);
    padding: 12px 16px; border-radius: 20px; margin-bottom: 20px; backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.2);
}
.mode-switch label { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; cursor: pointer; color: #0a2a44; }
.mode-switch input[type="radio"] { width: 18px; height: 18px; accent-color: #0077be; margin: 0; }
.field-group { display: flex; flex-wrap: wrap; gap: 18px 24px; margin-bottom: 16px; }
.field { flex: 1 0 180px; min-width: 140px; }
label { display: block; font-weight: 600; font-size: 13px; color: #0a2a44; margin-bottom: 4px; text-shadow: 0 1px 2px rgba(255,255,255,0.3); }
label .unit { font-weight: 400; color: #1a4a6a; font-size: 12px; }
input, select {
    width: 100%; padding: 10px 14px; border: 2px solid rgba(255, 255, 255, 0.4); border-radius: 16px;
    font-size: 15px; background: rgba(255, 255, 255, 0.5); backdrop-filter: blur(4px); outline: none; transition: 0.15s; color: #0a2a44;
}
input:focus, select:focus { border-color: #0088cc; box-shadow: 0 0 0 4px rgba(0, 136, 204, 0.2), inset 0 0 0 2px rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.7); }
.hint { font-size: 12px; color: #1a4a6a; margin-top: 4px; opacity: 0.85; }
.btn {
    background: rgba(0, 136, 204, 0.85); color: white; border: none; padding: 12px 32px; border-radius: 40px;
    font-weight: 700; font-size: 16px; cursor: pointer; transition: 0.15s; box-shadow: 0 8px 16px -6px rgba(0, 40, 80, 0.25);
    backdrop-filter: blur(4px); border: 1px solid rgba(255, 255, 255, 0.3); flex: 1 0 auto;
}
.btn:hover { background: #0077be; transform: scale(1.02); box-shadow: 0 12px 24px -8px rgba(0, 40, 80, 0.4); }
.btn-outline { background: rgba(255, 255, 255, 0.3); color: #0077be; border: 2px solid #0077be; box-shadow: none; }
.btn-outline:hover { background: rgba(255, 255, 255, 0.5); }
.btn-success { background: rgba(0, 180, 120, 0.85); }
.btn-success:hover { background: #00a86b; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
.result-box {
    background: rgba(255, 255, 255, 0.35); backdrop-filter: blur(8px); border-radius: 28px; padding: 20px 24px; margin-top: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3); box-shadow: inset 0 2px 8px rgba(255, 255, 255, 0.4);
}
.result-box .main { font-size: 28px; font-weight: 800; color: #0a2a44; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.result-box .main .rounded { font-weight: 600; color: #0077be; font-size: 22px; }
.result-box .details { display: flex; flex-wrap: wrap; gap: 16px 32px; margin-top: 12px; font-size: 14px; color: #0a2a44; }
.result-box .details span { background: rgba(255, 255, 255, 0.4); padding: 4px 16px; border-radius: 40px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); backdrop-filter: blur(2px); }
.error { background: rgba(254, 202, 202, 0.7); color: #b91c1c; border-radius: 12px; padding: 8px 16px; margin: 10px 0 0 0; font-size: 14px; display: none; backdrop-filter: blur(4px); }
.switch-row { display: flex; align-items: center; gap: 12px; margin: 6px 0 12px 0; flex-wrap: wrap; }
.switch-row label { font-weight: 500; font-size: 14px; display: flex; align-items: center; gap: 6px; margin-bottom: 0; }
.switch-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: #0077be; margin: 0; }
.switch-row input[type="number"] { width: 80px; padding: 6px 10px; border: 2px solid rgba(255, 255, 255, 0.4); border-radius: 12px; font-size: 14px; background: rgba(255, 255, 255, 0.4); }
.table-wrap {
    overflow-x: auto; margin-top: 16px; border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.2);
    max-height: 400px; overflow-y: auto; background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(4px);
}
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 16px; font-weight: 600; background: transparent; }
.table-wrap th {
    background: rgba(10, 42, 68, 0.7); color: white; padding: 12px 16px; text-align: center;
    position: sticky; top: 0; z-index: 2; backdrop-filter: blur(4px); font-weight: 700; font-size: 16px;
}
.table-wrap td { padding: 10px 16px; text-align: center; border-bottom: 1px solid rgba(255, 255, 255, 0.2); color: #0a2a44; font-weight: 600; font-size: 16px; }
.table-wrap tr:nth-child(even) { background: rgba(255, 255, 255, 0.1); }
.table-wrap tr:hover { background: rgba(0, 136, 204, 0.15); }

/* 鼠标点击选中的行（锁定高亮） */
.table-wrap tr.selected-row td {
    background-color: rgba(0, 136, 204, 0.35) !important;
    color: #0a2a44 !important;
    font-weight: 800 !important;
}
.table-wrap tr.selected-row:hover td { background-color: rgba(0, 136, 204, 0.45) !important; }

.step-config { background: rgba(255, 255, 255, 0.2); border-radius: 20px; padding: 16px 20px; margin: 16px 0 8px 0; border: 1px solid rgba(255, 255, 255, 0.2); backdrop-filter: blur(4px); }
.footer { margin-top: 24px; font-size: 12px; color: #1a4a6a; text-align: center; border-top: 1px solid rgba(255, 255, 255, 0.2); padding-top: 16px; opacity: 0.8; }
@media (max-width: 500px) {
    .container { padding: 20px; }
    .field { flex: 1 0 100%; }
    .table-wrap th, .table-wrap td { font-size: 14px; padding: 8px 10px; }
}
.mode-section { display: block; }
.mode-section.hidden { display: none; }

/* ===== 曲线图页面专用 ===== */
.chart-wrap { background: rgba(15, 23, 42, 0.8); border-radius: 20px; padding: 12px; margin-bottom: 16px; border: 1px solid rgba(255, 255, 255, 0.2); height: 350px; position: relative; backdrop-filter: blur(4px); }
.chart-wrap canvas { width: 100% !important; height: 100% !important; display: block; }
.chart-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.chart-toolbar button { background: rgba(30, 41, 59, 0.7); border: 1px solid rgba(255, 255, 255, 0.2); color: #e2e8f0; padding: 6px 16px; border-radius: 40px; cursor: pointer; font-size: 13px; transition: 0.15s; backdrop-filter: blur(4px); }
.chart-toolbar button:hover { background: rgba(51, 65, 85, 0.8); }
.chart-hint { color: #94a3b8; font-size: 12px; text-align: center; margin-top: 4px; }
.query-area-chart { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; background: rgba(255,255,255,0.15); padding: 14px 18px; border-radius: 20px; margin-bottom: 20px; border: 1px solid rgba(255, 255, 255, 0.2); backdrop-filter: blur(4px); }
.query-area-chart label { font-weight: 600; color: #0a2a44; }
.query-area-chart input { background: rgba(255,255,255,0.4); border: 1px solid rgba(255,255,255,0.3); color: #0a2a44; padding: 8px 14px; border-radius: 40px; width: 140px; font-size: 15px; outline: none; transition: 0.2s; }
.query-area-chart input:focus { border-color: #0088cc; box-shadow: 0 0 0 4px rgba(0, 136, 204, 0.2); }
.query-area-chart button { background: rgba(0, 136, 204, 0.85); color: white; border: none; padding: 8px 24px; border-radius: 40px; font-weight: 600; cursor: pointer; transition: 0.15s; }
.query-area-chart button:hover { background: #0077be; }
.query-area-chart .btn-outline-sm { background: transparent; border: 2px solid rgba(255,255,255,0.4); color: #0a2a44; padding: 6px 18px; }
.query-area-chart .btn-outline-sm:hover { background: rgba(255,255,255,0.3); }
.query-result-chart { font-size: 15px; background: rgba(255,255,255,0.3); padding: 6px 18px; border-radius: 40px; border: 1px solid rgba(255,255,255,0.2); min-width: 200px; text-align: center; color: #0a2a44; }
.query-result-chart .highlight { color: #f97316; font-weight: 700; }
.query-result-chart .value { color: #0077be; font-weight: 600; }
.data-note { background: rgba(255,255,255,0.2); padding: 8px 16px; border-radius: 40px; color: #1a4a6a; font-size: 13px; border: 1px solid rgba(255,255,255,0.2); margin-bottom: 16px; backdrop-filter: blur(4px); }
.data-note strong { color: #f97316; }
.stats-chart { display: flex; gap: 24px; flex-wrap: wrap; margin: 14px 0 6px 0; font-size: 14px; color: #1a4a6a; }
.stats-chart span { background: rgba(255,255,255,0.2); padding: 4px 16px; border-radius: 40px; backdrop-filter: blur(4px); }
tr.highlight-row { background: #f97316 !important; color: #0f172a !important; font-weight: 700; }
tr.highlight-row td { color: #0f172a; font-weight: 700; }
.back-btn { background: rgba(255,255,255,0.3); color: #0a2a44; border: 2px solid rgba(255,255,255,0.4); padding: 8px 20px; border-radius: 40px; font-weight: 600; cursor: pointer; transition: 0.15s; backdrop-filter: blur(4px); }
.back-btn:hover { background: rgba(255,255,255,0.5); }