body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    background-color: #f4f7f6;
    color: #333;
}

.app-container {
    display: flex;
    flex-direction: row;
    height: 100vh;
}

.sidebar {
    width: 380px;
    padding: 20px;
    background-color: #ffffff;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.sidebar header {
    margin-bottom: 20px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.sidebar h1 {
    font-size: 1.5em;
    color: #004085;
    margin: 0;
}

#params-form fieldset {
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 15px;
    padding: 10px;
}

#params-form legend {
    font-weight: bold;
    color: #555;
}

#params-form input {
    width: 70px;
    padding: 5px;
    margin: 2px 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

#calculate-btn {
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.2s;
}

#calculate-btn:hover {
    background-color: #0056b3;
}

.results-area {
    margin-top: 20px;
    padding: 15px;
    background-color: #e9ecef;
    border-radius: 5px;
}

.results-area h3 {
    margin-top: 0;
}

.results-area span {
    font-weight: bold;
    color: #d9534f;
}

.main-content {
    flex-grow: 1;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#plot-div {
    width: 100%;
    height: 95%;
}

/* レスポンシブ対応 */
@media (max-width: 900px) {
    .app-container {
        flex-direction: column;
        height: auto;
    }
    .sidebar {
        width: auto;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
}