body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f9f9f9;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    width: 90%;
    max-width: 900px;
    padding: 24px;
    box-sizing: border-box;
}

header {
    text-align: center;
    margin-bottom: 24px;
}

header h1 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 8px;
}

header p {
    color: #7f8c8d;
    font-size: 1rem;
}

.input-section {
    margin-bottom: 32px;
}

.input-section h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.input-section p {
    color: #7f8c8d;
    font-size: 1rem;
    margin-bottom: 24px;
}

.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    color: #2c3e50;
    font-size: 1rem;
    margin-bottom: 8px;
}

.input-group input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #bdc3c7;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1rem;
    color: #34495e;
}

.input-group input[type="number"]::placeholder {
    color: #95a5a6;
}

.input-group small {
    display: block;
    color: #7f8c8d;
    font-size: 0.8rem;
    margin-top: 4px;
}

button {
    background-color: #3498db;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #19a3ff;
}

.result-section {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.result-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    padding: 16px;
    width: calc(33.33% - 16px);
    box-sizing: border-box;
    text-align: center;
}

/* Style for Estimated Returns card */
.result-card:nth-child(2) {
    background-color: #e8f5e9; /* Light Green */
}

.result-card:nth-child(2) h3,
.result-card:nth-child(2) p {
    color: #388e3c; /* Dark Green */
}

/* Style for Total Value card */
.result-card:nth-child(3) {
    background-color: #e3f2fd; /* Light Blue */
}

.result-card:nth-child(3) h3,
.result-card:nth-child(3) p {
    color: #1976d2; /* Dark Blue */
}

.result-card h3 {
    color: #34495e;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.result-card p {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: bold;
}

canvas {
    width: 100%;
    max-height: 300px;
}

/* Media query for mobile devices */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .container {
        width: 95%;
        padding: 1rem;
        margin: 50px auto;
    }

    .input-group {
        margin-bottom: 12px;
    }

    .input-group label {
        font-size: 0.9rem;
    }

    .input-group input[type="number"] {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .input-group small {
        font-size: 0.7rem;
    }

    .result-section {
        flex-direction: column;
        margin-bottom: 24px;
    }

    .result-card {
        width: 100%;
        margin-bottom: 12px;
        padding: 12px;
    }

    .result-card h3 {
        font-size: 1rem;
    }

    .result-card p {
        font-size: 1.2rem;
    }

    button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .radio-group {
        flex-direction: column;
    }

    .radio-group label {
        margin-left: 10px;
    }
}

.radio-group {
    display: flex;
    gap: 16px; /* Adjust the spacing as needed */
}

.radio-group label {
    margin-bottom: 0; /* Remove default margin */
}

/* Switch styling */
.switch-container {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.switch-label {
    font-size: 14px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #b14ff8;
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Dark mode styles */
:root {
    --bg-color: #ffffff;
    --text-color: #222222;
    --card-bg: #f0f0f0;
}

.dark-mode {
    --bg-color: #1e1e1e;
    --text-color: #fff;
    --card-bg: #333333;
    color: #fff;
}

.dark-mode h1,
.dark-mode h2,
.dark-mode label,
.dark-mode .calculator-type-buttons button,
.dark-mode .input-group label,
.dark-mode .input-section h2,
.dark-mode .input-section p {
    color: #fff;
}

.dark-mode .result-card p {
    color: #000;
}
.dark-mode p{
    color: #000;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: Arial, sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin: 0;
    padding: 2rem;
    min-height: 100vh;
}

.container {
    max-width: 600px;
    margin: 100px auto;
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease;
}

.calculator-section {
    display: none;
}

.calculator-section.active {
    display: block;
}

.input-group h1 {
    font-size: 1.5rem;
    margin-bottom: 8px;
    text-align: center;
}

.input-group h2 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.calculator-type-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.calculator-type-buttons button {
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    background-color: #3498db;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.calculator-type-buttons button:hover {
    background-color: #2980b9;
}
