body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    padding: 15px;
    color: #333;
    min-width: 320px;
    overflow-x: hidden;
}

.calculator-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.header {
    padding: 20px 15px;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    text-align: center;
}

.header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.content {
    display: flex;
    flex-wrap: wrap;
}

.input-section {
    flex: 1;
    min-width: 0;
    padding: 20px 15px;
    border-right: 1px solid #eaeaea;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    background-color: #f9f9f9;
    box-sizing: border-box;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.calculate-btn {
    background-color: #3498db;
    color: white;
}

.calculate-btn:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.reset-btn {
    background-color: #95a5a6;
    color: white;
}

.reset-btn:hover {
    background-color: #7f8c8d;
}

.results-section {
    flex: 1;
    min-width: 0;
    padding: 20px 15px;
}

.summary-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.summary-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.summary-value {
    font-size: 24px;
    font-weight: 700;
    color: #3498db;
    margin: 8px 0;
    text-align: center;
}

.summary-label {
    text-align: center;
    color: #7f8c8d;
    font-size: 13px;
}

.breakdown-section {
    margin-top: 20px;
}

.breakdown-group {
    margin-bottom: 15px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 4px solid #e0e0e0;
}

.breakdown-group.highlight {
    background: #f0f7ff;
    border-left-color: #3498db;
}

.breakdown-title {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
}

.breakdown-subtitle {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 14px;
}

.breakdown-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px dashed #eee;
    font-size: 13px;
}

.breakdown-row:last-child {
    border-bottom: none;
}

.savings {
    color: #27ae60;
    font-weight: 600;
}

.chart-container {
    height: 220px;
    margin-top: 20px;
    background: white;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Mobile-specific adjustments */
@media (max-width: 768px) {
    .content {
        flex-direction: column;
    }
    
    .input-section {
        border-right: none;
        border-bottom: 1px solid #eaeaea;
    }
    
    .header h2 {
        font-size: 18px;
    }
    
    .summary-value {
        font-size: 22px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .header {
        padding: 15px 10px;
    }
    
    .input-section, 
    .results-section {
        padding: 15px 10px;
    }
    
    .summary-value {
        font-size: 20px;
    }
    
    .breakdown-row {
        font-size: 12px;
    }
    
    .chart-container {
        height: 200px;
    }
}