.main-container {
    width: 100%;
/*    max-width: 700px;*/
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.main-header {
    color: #333;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8em;
}

.input-section {
    margin-bottom: 20px;
}

.input-group {
    margin-bottom: 20px;
}

.input-label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: bold;
}

.input-field {
    width: calc(100% - 22px);
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
}

.input-field.error {
    border-color: #dc3545;
}

.input-hint {
    font-size: 0.85em;
    color: #777;
    margin-top: 5px;
}

.sample-buttons-container {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.sample-button {
    flex-grow: 1;
    padding: 10px 15px;
    font-size: 0.95em;
    color: #fff;
    background-color: #17a2b8;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.sample-button:hover {
    background-color: #138496;
}

button#calculateButton {
    display: block;
    width: 100%;
    padding: 12px 20px;
    font-size: 1.1em;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-bottom: 20px;
}

button#calculateButton:hover {
    background-color: #0056b3;
}

.result-container {
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.result-title {
    margin: 0;
    color: #0056b3;
    font-size: 1.3em;
}

.header-buttons {
    display: flex;
    align-items: center;
}

.header-buttons .action-button {
    width: auto;
    height: 32px;
    padding: 5px 10px;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    position: relative;
    flex-shrink: 0;
    gap: 5px;
}

.button-icon {
    width: 18px;
    height: 18px;
    fill: white;
}

.icon-path {
}

.header-buttons .action-button .button-text {
    font-size: 0.9em;
    line-height: 1;
}

.copy-button {
    background-color: #6c757d;
    margin-right: 10px;
}

.copy-button:hover {
    background-color: #5a6268;
}

.copy-button .copy-tooltip-text {
    visibility: hidden;
    width: 80px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s, background-color 0.3s;
    font-size: 0.8em;
    white-space: nowrap;
    pointer-events: none;
}

.copy-button.copied .copy-tooltip-text {
    visibility: visible;
    opacity: 1;
    background-color: #28a745;
}

.copy-button.copied[data-copy-state="error"] .copy-tooltip-text {
    background-color: #dc3545;
}

.reset-button {
    background-color: #dc3545;
}

.reset-button:hover {
    background-color: #c82333;
}

.result-textarea {
    width: calc(100% - 22px);
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: "Courier New", Courier, monospace;
    font-size: 1em;
    background-color: #e9ecef;
    color: #333;
    resize: vertical;
    overflow-y: hidden;
    box-sizing: border-box;
    min-height: 80px;
}

.error-message {
    color: #dc3545;
    font-size: 0.9em;
    margin-top: 10px;
    min-height: 1.2em;
}

.chart-container {
    width: 100%;
    max-width: 650px;
    margin: 20px auto 0;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.regression-chart-canvas {
}

@media (max-width: 600px) {
    .main-container {
        padding: 20px;
    }
    .input-section {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    .input-group {
        width: 100%;
    }
     .input-group .input-label {
         width: auto;
         margin-right: 0;
         margin-bottom: 5px;
     }

    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .header-buttons {
        flex-wrap: wrap;
        width: 100%;
    }
    .header-buttons .action-button {
        flex-grow: 1;
        margin-bottom: 5px;
    }
    .copy-button {
        margin-right: 5px;
    }
    .chart-container {
        padding: 10px;
    }
}

.page-description {
    text-align: left;
    margin-bottom: 25px;
    line-height: 1.6;
    color: #555;
    font-size: 0.95em;
}
