.compound-interest-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    color: #334155;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.compound-interest-container h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 16px;
    line-height: 1.2;
}

.subtitle {
    font-size: 1.25rem;
    color: #475569;
    margin-bottom: 40px;
    max-width: 800px;
}

.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.feature-item {
    background: #f8fafc;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    transition: transform 0.2s;
    border: 1px solid #e2e8f0;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.feature-item h3 {
    font-size: 1.25rem;
    color: #0f172a;
    margin: 16px 0 12px;
}

.security-badge {
    background: #f0fdf4;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #bbf7d0;
    margin-bottom: 40px;
    color: #166534;
}

.security-badge p {
    margin: 0;
    line-height: 1.6;
}

.calculator-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 32px;
    margin-bottom: 48px;
    border: 1px solid #e2e8f0;
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #0f172a;
}

.numeric-input, .select-input {
    padding: 14px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1.1rem;
    transition: border-color 0.2s;
}

.numeric-input:focus, .select-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.calculate-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 16px 28px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
    margin-bottom: 32px;
}

.calculate-btn:hover {
    background: #1d4ed8;
}

.calculate-btn svg {
    stroke: currentColor;
}

.results-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.result-card {
    background: #f1f5f9;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

.result-card h3 {
    font-size: 1.1rem;
    color: #475569;
    margin: 0 0 12px;
}

.result-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.result-desc {
    color: #64748b;
    margin: 0;
    font-size: 1rem;
}

.chart-container {
    background: #f8fafc;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid #e2e8f0;
}

.copy-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.copy-btn {
    background: #e2e8f0;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.copy-btn:hover {
    background: #cbd5e1;
}

#copy-notification {
    color: #047857;
    font-weight: 500;
    animation: fadeOut 3s forwards;
}

@keyframes fadeOut {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

.section-title {
    font-size: 1.75rem;
    color: #0f172a;
    margin: 40px 0 20px;
    font-weight: 700;
}

.section-desc {
    color: #475569;
    font-size: 1.1rem;
    max-width: 800px;
    line-height: 1.6;
}

.formula-section {
    background: #f8fafc;
    border-radius: 16px;
    padding: 24px;
    margin: 24px 0;
    border: 1px solid #e2e8f0;
}

.formula-box {
    font-size: 2rem;
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    margin: 16px 0;
    font-weight: 500;
    color: #0f172a;
}

.frac {
    border-bottom: 1px solid;
    padding: 0 4px;
}

.formula-legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    color: #475569;
}

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

.comparison-table th {
    background: #f1f5f9;
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: #0f172a;
}

.comparison-table td {
    padding: 16px;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
}

.positive {
    color: #047857 !important;
    font-weight: 600;
}

.negative {
    color: #b91c1c !important;
    font-weight: 600;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.example-card {
    background: #f1f5f9;
    border-radius: 16px;
    padding: 24px;
    border-left: 4px solid #2563eb;
}

.example-card h3 {
    color: #0f172a;
    margin-top: 0;
}

@media (max-width: 768px) {
    .compound-interest-container {
        padding: 24px 16px;
    }
    
    .calculator-card {
        padding: 24px 16px;
    }
    
    .input-grid {
        grid-template-columns: 1fr;
    }
}