body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1, h2 {
    color: #2c3e50;
}

form {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
}

input[type="number"],
select {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.date-inputs {
    display: flex;
    justify-content: space-between;
}

.date-group {
    width: 48%;
}

.date-group select {
    width: 48%;
    display: inline-block;
}

input[type="submit"],
.button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
}

input[type="submit"]:hover,
.button:hover {
    background-color: #2980b9;
}

.container .chart-container {
    position: relative;
    height: 500px;
    min-height: 500px; /* Fallback to prevent collapse */
    width: 100%;
    margin-bottom: 20px;
}

.container .chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

#ipcChart {
    width: 100% !important;
    height: 500px !important; /* Explicitly enforce for historical chart */
}

@media (max-width: 768px) {
    .container .chart-container {
        height: 350px;
        min-height: 350px;
    }
    #ipcChart {
        height: 350px !important;
    }
}

.result-box {
    background-color: #e8f4fd;
    border: 1px solid #bde0fe;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.result-box p {
    margin: 10px 0;
}

.date-inputs {
    display: flex;
    justify-content: space-between;
}

.date-group {
    width: 48%;
}

select {
    width: 45%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.inflation-data {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
}

.inflation-item {
    margin-right: 15px;
    margin-bottom: 5px;
    white-space: nowrap;
}

.inflation-data ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.inflation-data li {
    padding: 5px 0;
    border-bottom: 1px solid #e9ecef;
}

.inflation-data li:last-child {
    border-bottom: none;
}

.formula-box {
    background-color: #f0f8ff;
    border: 1px solid #b0d4ff;
    border-radius: 4px;
    padding: 15px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.formula {
    text-align: center;
    margin: 15px 0;
    padding: 10px;
    background-color: #e6f2ff;
    border-radius: 4px;
}