body {
    font-family: Arial, sans-serif;
    background-color: #f4f7fa;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 35px;
    font-size: 2em;
}

.area-section {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    background-color: #fafafa;
}

.area-section h2 {
    color: #34495e;
    font-size: 1.5em;
    margin-bottom: 15px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-weight: bold;
    color: #34495e;
    font-size: 1.1em;
}

input, select {
    padding: 10px;
    border: 2px solid #bdc3c7;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s;
}

input:focus, select:focus {
    border-color: #007BFF;
    outline: none;
}

input.invalid {
    border-color: #e74c3c;
}

.global-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
}

button {
    padding: 12px 20px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #0056b3;
}

button:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

.error-message {
    color: #e74c3c;
    text-align: center;
    font-size: 0.9em;
    margin-top: 10px;
    padding: 8px;
    background-color: #ffe6e6;
    border-radius: 6px;
}

.results-section {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    background-color: #ecf0f1;
    margin-top: 20px;
}

.results-section h2 {
    color: #2c3e50;
    font-size: 1.5em;
    margin-bottom: 15px;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

.results-grid p {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1em;
}

.results-grid span {
    font-weight: bold;
}

.results-grid span.success {
    color: #27ae60;
}

.results-grid span.failure {
    color: #e74c3c;
}

.canvas-container {
    width: 100%;
    height: 400px;
    border: 2px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 20px;
}

@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .global-buttons {
        flex-direction: column;
        gap: 10px;
    }
}