* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

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

h2 {
    color: #34495e;
    margin-bottom: 25px;
    font-size: 1.5em;
    border-bottom: 3px solid #3498db;
    padding-bottom: 10px;
}

.form-section {
    margin-bottom: 40px;
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.95em;
}

input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s;
}

input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.btn-calculate {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 10px;
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.4);
}

.btn-calculate:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-calculate:active {
    transform: translateY(0);
}

.error-message {
    color: #e74c3c;
    font-size: 0.95em;
    margin-top: 15px;
    padding: 12px;
    background: #fadbd8;
    border-left: 4px solid #e74c3c;
    border-radius: 4px;
    display: none;
}

.error-message.show {
    display: block;
}

.summary-stats {
    margin-top: 25px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.stat-card {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #3498db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.stat-card.highlight {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 247, 250, 0.95) 100%);
    border-left: 4px solid #f39c12;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 18px;
}

.stat-label {
    font-size: 0.85em;
    color: #7f8c8d;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.4em;
    color: #2c3e50;
    font-weight: bold;
}

.charts-section {
    margin-top: 40px;
}

.chart-container {
    margin-bottom: 50px;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.chart-container h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

canvas {
    width: 100% !important;
    height: 360px !important;
    max-height: none;
    display: block;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.8em;
        margin-bottom: 25px;
    }

    h2 {
        font-size: 1.2em;
    }

    .summary-stats {
        grid-template-columns: 1fr;
    }

    .chart-container {
        padding: 18px;
        margin-bottom: 32px;
    }

    canvas {
        height: 260px !important;
    }
}
