/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 40px 0;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Calculator Section */
.calculator-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.calculator-form {
    flex: 1;
    min-width: 300px;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.calculator-result {
    flex: 1;
    min-width: 300px;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
}

input[type="number"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border 0.3s;
}

input[type="number"]:focus {
    border-color: #2a5298;
    outline: none;
}

.calculate-btn {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-weight: 600;
    width: 100%;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(42, 82, 152, 0.3);
}

/* Result Display */
.result-display {
    text-align: center;
    padding: 20px;
}

.cagr-value {
    font-size: 3rem;
    font-weight: 700;
    color: #1e3c72;
    margin: 20px 0;
}

.cagr-percentage {
    font-size: 1.2rem;
    color: #666;
}

.result-details {
    margin-top: 20px;
    text-align: left;
}

.result-details p {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.result-details span {
    font-weight: 600;
}

/* Chart Section */
.chart-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
}

.chart-title {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

#growthChart {
    width: 100%;
    height: 300px;
}

/* Explanation Section */
.explanation {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
}

.explanation h2 {
    color: #1e3c72;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.explanation p {
    margin-bottom: 15px;
}

.formula {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    font-family: monospace;
    text-align: center;
    font-size: 1.2rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
    margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-container {
        flex-direction: column;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .cagr-value {
        font-size: 2.5rem;
    }
}