body {
    font-family: 'Roboto', sans-serif;
    margin: 20px;
    color: #333;
    background: #fff;
}

h1 {
    font-weight: 400;
    margin-bottom: 30px;
}

h2 {
    font-weight: 400;
    margin-bottom: 15px;
    color: #333;
}

.calculator-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.input-section, .chart-section, .table-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    flex: 1 1 100%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

@media(min-width: 900px) {
    .input-section {
        flex: 1 1 25%;
    }
    .chart-section {
        flex: 1 1 70%;
    }
    .table-section {
        flex: 1 1 100%;
    }
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 400;
    color: #555;
}

.input-group input, .input-group select {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.calculate-btn {
    background: #0077cc;
    color: #fff;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    font-size: 16px;
}

.calculate-btn:hover {
    background: #005da3;
}

.results-overview {
    margin-top: 20px;
    font-size: 18px;
    font-weight: 400;
}

.chart-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.chart-item {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    flex: 1 1 400px;
    min-width: 300px;
    max-height: 800px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.bar-chart-container {
    align-items: flex-start;
    justify-content: flex-start;
}

.pie-chart-container {
    align-items: flex-start;
    justify-content: flex-start;
}

.pie-chart-wrapper {
    height: 300px;
    max-height: 500px;
    position: relative;
}

.chart-item h2 {
    margin-bottom: 20px;
    font-size: 20px;
}

canvas {
    max-height: 800px; 
    height: auto;
    width: 100%;
}

.pie-legend {
    margin-top: 10px;
    font-size: 14px;
    color: #444;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 14px;
}

table, th, td {
    border: 1px solid #eee;
}

th, td {
    padding: 8px;
    text-align: right;
    font-weight: 300;
}

th {
    background: #f1f1f1;
    color: #333;
    font-weight: 400;
}

td:first-child, th:first-child {
    text-align: left;
}
