* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #1a3c6e, #2c5282);
    color: white;
    padding: 25px 40px;
    text-align: center;
    border-bottom: 4px solid #d4a853;
}
.header h1 { font-size: 26px; letter-spacing: 4px; }
.header .subtitle { font-size: 13px; margin-top: 4px; opacity: 0.9; }

.concept-box {
    background: #fff3cd; border-left: 4px solid #ffc107;
    padding: 12px 16px; border-radius: 0 8px 8px 0;
    font-size: 13px; color: #856404; margin: 15px 20px 0; line-height: 1.8;
}
.concept-box strong { color: #664d03; }

.control-panel {
    display: flex; flex-wrap: wrap; gap: 15px; padding: 15px 25px;
    background: #f8f9fa; border-bottom: 1px solid #e0e0e0; align-items: center;
}
.control-item { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.control-item label { font-weight: 600; color: #333; font-size: 13px; white-space: nowrap; }
.control-item input[type="range"] {
    width: 120px; height: 5px; border-radius: 3px; background: #ddd; outline: none; -webkit-appearance: none;
}
.control-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: #d4a853; cursor: pointer;
}
.checkbox-label {
    cursor: pointer; font-size: 12px; display: flex; align-items: center; gap: 4px; margin-right: 8px;
}
.checkbox-label input { width: 14px; height: 14px; }

/* 奈奎斯特状态 */
.nyquist-status {
    margin: 0 25px 10px; padding: 12px 18px; border-radius: 8px;
    font-size: 14px; font-weight: 600; text-align: center; transition: all 0.3s;
}
.nyquist-status.ok { background: #d1fae5; color: #065f46; border: 2px solid #10b981; }
.nyquist-status.warn { background: #fef3c7; color: #92400e; border: 2px solid #f59e0b; }
.nyquist-status.bad { background: #fee2e2; color: #991b1b; border: 2px solid #ef4444; }

.plots-row { padding: 10px 25px 0; }
.plot-box {
    background: #f8f9fa; border-radius: 8px; padding: 12px;
    border-left: 4px solid #1a3c6e;
}
.plot-box h3 { color: #333; margin-bottom: 8px; font-size: 14px; }
.plot-box canvas {
    width: 100%; height: auto; background: white;
    border-radius: 5px; box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.spec-toggle {
    display: flex; gap: 15px; padding: 8px 25px; justify-content: center;
    background: #f8f9fa; border-top: 1px solid #e0e0e0; border-bottom: 1px solid #e0e0e0;
}

.formula-panel {
    display: flex; gap: 15px; padding: 15px 25px; flex-wrap: wrap;
}
.formula-card {
    flex: 1; min-width: 200px; background: #f0f4ff; border-radius: 8px;
    padding: 12px; border: 1px solid #dbeafe;
}
.formula-card h4 { color: #1a3c6e; font-size: 13px; margin-bottom: 8px; }

.footer { padding: 18px 40px 22px; text-align: center; }
.footer-divider {
    height: 3px; background: linear-gradient(90deg, transparent, #1a3c6e 20%, #d4a853 50%, #1a3c6e 80%, transparent);
    margin-bottom: 12px;
}
.footer-text { color: #1a3c6e; font-size: 14px; font-weight: 500; letter-spacing: 4px; }

mjx-container { display: inline-block !important; }

@media (max-width: 900px) {
    .control-panel { flex-direction: column; }
    .formula-panel { flex-direction: column; }
}
@media (max-width: 600px) {
    body { padding: 5px; }
    .header { padding: 15px 20px; }
    .header h1 { font-size: 20px; letter-spacing: 2px; }
}
