body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
    color: #333;
}
header {
    text-align: center;
    padding: 20px;
    background-color: #1a73e8;
    color: white;
}
section {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    display: flex;
}
a {
    text-decoration: none;
    color: #000080;
    font-size: 18px;
}
nav {
    text-align: center;
}
a:hover {
    color: #d4a017;
}
.calculator {
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    width: 50%;
    min-width: 0;
}
.charts {
    width: 50%;
    min-width: 0;
    padding-left: 20px;
}
.param-section {
    margin-bottom: 15px;
}
.param-section h3 {
    margin: 8px 0;
    font-size: 18px;
    color: #1a73e8;
    text-align: center;
}
.inductor-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}
.calculator label {
    display: block;
    margin: 8px 0 4px;
    font-weight: bold;
}
.calculator .param-group {
    margin-bottom: 8px;
}
.calculator input[type="number"] {
    width: 100%;
    max-width: 66px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}
.calculator input[type="number"]:focus {
    border-color: #1a73e8;
    outline: none;
    box-shadow: 0 0 5px rgba(26, 115, 232, 0.5);
}
.calculator input[type="range"] {
    width: 100%;
    max-width: 66px;
    margin: 5px 0;
    -webkit-appearance: none;
    height: 6px;
    background: #ddd;
    border-radius: 4px;
    outline: none;
}
.calculator input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #1a73e8;
    border-radius: 50%;
    cursor: pointer;
}
.calculator input[type="range"]::-webkit-slider-thumb:hover {
    background: #1557b0;
}
.calculator .equation {
    font-size: 12px;
    color: #555;
    margin-top: 4px;
}
.calculator .output {
    margin-top: 15px;
    font-size: 16px;
    color: #1a73e8;
    text-align: center;
}
.button-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    justify-content: center;
}
.calculator button {
    background-color: #1a73e8;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}
.calculator button:hover {
    background-color: #1557b0;
}
.capacitor-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    justify-items: center;
}
.charts .param-section {
    margin-top: 20px;
}
.charts .param-group {
    display: inline-block;
    margin-right: 20px;
}
.transfer {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    overflow-x: auto;
    min-width: 0;
}
.transfer .mathjax-eq {
    margin-left: 60px;
    display: inline-block;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    transform: scale(1.125);
}
.schematic-wrap {
    overflow-x: visible;
    margin: 12px 0;
    max-width: 100%;
}
.schematic {
    display: block;
    width: 100%;
    min-width: 0;
    height: auto;
    box-sizing: border-box;
    margin: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
}
canvas {
    max-width: 100%;
    margin-top: 20px;
}
.chart-coordinates {
    font-size: 14px;
    color: #333;
    margin-top: 5px;
    text-align: left;
}
@media (max-width: 800px) {
    body { padding: 0 0 20px; }
    section {
        display: block;
        margin: 12px;
        padding: 16px;
    }
    .calculator,
    .charts {
        width: auto;
        padding-left: 0;
    }
    .charts input[type="number"],
    .charts input[type="range"] {
        max-width: 100%;
        box-sizing: border-box;
    }
    .capacitor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .inductor-group { flex-wrap: wrap; }
    .schematic-wrap { overflow-x: auto; }
    .schematic { min-width: 920px; }
}