* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: sans-serif;
}

.workspace {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 50px;
    padding: 20px;
    flex-wrap: wrap;
    width: 100%;
}

#point-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 25px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 330px;
    max-width: 100%;
}

#point-form > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#point-form fieldset {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

#point-form legend {
    margin-bottom: 8px;
}

#y-input,
#r-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #777;
    border-radius: 4px;
    font: inherit;
}

#y-input:focus:invalid,
#r-input:focus:invalid {
    border-color: #c60c18;
}

input:focus,
select:focus,
button:focus,
.results:focus {
    outline: 2px solid #1f72d8;
    outline-offset: 3px;
}

#form-error {
    margin: 0;
    color: #a40000;
}

.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

#results-table {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
    min-width: 720px;
    background-color: white;
    margin: 0 auto;
}

#results-table thead,
#results-table tbody,
#results-table tr {
    width: 100%;
}

#results-body {
    white-space: normal;
    overflow-wrap: anywhere;
}

#results-table th,
#results-table td {
    border: 1px solid #ccc;
    padding: 12px;
    text-align: center;
    vertical-align: top;
}

.results {
    width: 100%;
    max-width: 900px;
    max-height: 280px;
    overflow: auto;
    margin: 0 auto 20px;
}

#results-table th {
    background-color: #e9ecef;
    font-weight: bold;
    position: sticky;
    top: 0;
}

.page-header {
    background-color: #3399FF;
    color: white;
    text-align: center;
    padding: 15px 0;
    margin-bottom: 30px;
    font-family: cursive;
}

.page-header h1 {
    margin: 0;
    font-size: 22px;
}

#point-form button, #clear-history {
    background-color: #3399FF;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#point-form button:hover, #clear-history:hover {
    background-color: #1f72d8;
}

#point-form button:disabled, #clear-history:disabled {
    background-color: #767676;
    cursor: wait;
}

.checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-option {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    min-width: 70px;
}

.checkbox-option input[type="checkbox"],
.checkbox-option {
    margin: 0;
    cursor: pointer;
}

#graph {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    flex-shrink: 0;
}

#point-form > div > label::after,
#point-form legend::after {
    content: " *";
    color: #ff4444;
}

@media (max-width: 600px) {
    .workspace {
        padding: 10px;
    }
}

