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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333333;
    background-color: #ecf0f1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: #2c3e50;
    margin-bottom: 10px;
}

header p {
    color: #333333;
    max-width: 800px;
    margin: 0 auto;
}

/* Language Switch */
.language-switch {
    text-align: right;
    margin-bottom: 20px;
}

.language-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.language-button:hover {
    background-color: #2980b9;
}

/* Calculator Container */
.calculator-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

/* Calculator Form */
.calculator-form {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    background-color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    border-left: 4px solid #3498db;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #2c3e50;
}

input[type="number"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: white;
}

.input-with-prefix, .input-with-suffix {
    display: flex;
    align-items: center;
}

.currency-symbol, .percentage-symbol {
    padding: 10px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 4px 0 0 4px;
    color: #2c3e50;
}

.percentage-symbol {
    border-left: none;
    border-right: 1px solid #ddd;
    border-radius: 0 4px 4px 0;
}

.input-with-prefix input {
    border-radius: 0 4px 4px 0;
}

.input-with-suffix input {
    border-radius: 4px 0 0 4px;
}

.time-period {
    display: flex;
    gap: 15px;
}

.time-input {
    flex: 1;
}

.currency-options, .contribution-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.currency-options label, .contribution-options label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.calculate-button {
    width: 100%;
    padding: 12px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.calculate-button:hover {
    background-color: #2980b9;
}

/* Results Section */
.results-section {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
    background-color: #ffffff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    border-left: 4px solid #3498db;
}

.results-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

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

.result-item {
    text-align: center;
}

.result-item h3 {
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 5px;
}

.result-value {
    font-size: 18px;
    font-weight: bold;
    color: #3498db;
}

/* Breakdown Options */
.breakdown-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.breakdown-choice {
    display: flex;
    gap: 15px;
}

.breakdown-choice label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.view-options {
    display: flex;
    gap: 10px;
}

.view-button {
    padding: 8px 16px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.view-button.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

/* Breakdown Container */
.breakdown-container {
    margin-top: 20px;
}

.breakdown-container h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #2c3e50;
}

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

tr:hover {
    background-color: #ecf0f1;
}

/* Chart Container */
#chart-container {
    margin-top: 20px;
}

.chart-wrapper {
    height: 300px;
    margin-bottom: 30px;
}

/* Summary Container */
#summary-container {
    margin-top: 20px;
}

.summary-content {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.summary-content h4 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.summary-item {
    margin-bottom: 20px;
}

.summary-item h5 {
    margin-bottom: 10px;
    color: #2c3e50;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.summary-item p {
    margin-bottom: 8px;
}

/* Footer */
footer {
    margin-top: 40px;
    text-align: center;
    color: #2c3e50;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-container {
        flex-direction: column;
    }
    
    .calculator-form, .results-section {
        max-width: 100%;
    }
    
    .results-summary {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

@media (max-width: 480px) {
    .time-period {
        flex-direction: column;
    }
    
    .breakdown-options {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .view-options {
        margin-top: 10px;
    }
}
