* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
}

header h1 {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

#sipForm {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.tab-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-button {
    padding: 12px 24px;
    background: #f8f9ff;
    border: 2px solid #ddd;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #555;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-button:hover {
    background: #e3f2fd;
    border-color: #4a90e2;
    color: #4a90e2;
}

.tab-button.active {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
    border-color: #4a90e2;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.input-section {
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9ff;
    border-radius: 10px;
    border-left: 4px solid #4a90e2;
    position: relative;
    min-height: 100px;
}

.input-section::before {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2em;
    opacity: 0.8;
    z-index: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    pointer-events: none;
}

#regularInputs {
    border-left-color: #4caf50;
}

#regularInputs::before {
    content: '📅';
}

#stepupInputs {
    border-left-color: #ff9800;
}

#stepupInputs::before {
    content: '⬆️';
}

#targetInputs {
    border-left-color: #9c27b0;
}

#targetInputs::before {
    content: '🎯';
}

#lumpsumInputs {
    border-left-color: #2196f3;
}

#lumpsumInputs::before {
    content: '💼';
}

.input-section.active {
    display: block;
}

.input-section.active {
    display: block;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.form-group label {
    font-weight: 700;
    margin-bottom: 5px;
    color: #333;
    font-size: 16px;
}

.form-group input,
.form-group select {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4a90e2;
}

button[type="submit"] {
    background: linear-gradient(135deg, #4a90e2, #357abd);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s;
    width: 100%;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
}

.results {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.key-metrics {
    margin-bottom: 30px;
}

.totals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.totals p {
    padding: 25px 20px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(0, 0, 0, 0.1);
    font-size: 18px;
    font-weight: 600;
    margin: 0 10px 25px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.totals p:nth-child(1) {
    background: linear-gradient(135deg, #f1f8e9, #dcedc8);
    border-color: rgba(104, 159, 56, 0.3);
    border-left-color: #689f38;
}

.totals p:nth-child(1)::before {
    content: '💰';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2em;
    opacity: 0.2;
    z-index: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.totals p:nth-child(1) span:first-of-type {
    color: #33691e;
}

.totals p:nth-child(2) {
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    border-color: rgba(249, 168, 37, 0.3);
    border-left-color: #f9a825;
}

.totals p:nth-child(2)::before {
    content: '📈';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2em;
    opacity: 0.2;
    z-index: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.totals p:nth-child(2) span:first-of-type {
    color: #f57f17;
}

.totals p:nth-child(3) {
    background: linear-gradient(135deg, #e1f5fe, #b3e5fc);
    border-color: rgba(2, 136, 209, 0.3);
    border-left-color: #0288d1;
}

.totals p:nth-child(3)::before {
    content: '🏆';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2em;
    opacity: 0.2;
    z-index: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.totals p:nth-child(3) span:first-of-type {
    color: #01579b;
}

#realValueContainer p {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border: 2px solid rgba(239, 108, 0, 0.3);
    border-left-color: #ef6c00;
}

#realValueContainer p::before {
    content: '⚠️';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2em;
    opacity: 0.2;
    z-index: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#targetMonthlyResult p::before {
    content: '🎯';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2em;
    opacity: 0.2;
    z-index: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#realValueContainer p span:first-of-type {
    color: #e65100;
}

.totals p:hover,
#realValueContainer p:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* Style for amount numbers */
#totalInvested,
#totalReturns,
#maturityAmount,
#realValue,
#requiredMonthlyAmount {
    font-size: 30px;
    font-weight: 800;
    display: block;
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#totalInvested { color: #2e7d32; }
#totalReturns { color: #f57f17; }
#maturityAmount { color: #0277bd; }
#realValue { color: #e65100; }

/* Style for amount words */
#totalInvestedWords,
#totalReturnsWords,
#maturityAmountWords,
#realValueWords,
#requiredMonthlyWords {
    display: block;
    font-size: 10px;
    color: #6b7280;
    font-style: italic;
    margin-top: 6px;
    font-weight: 500;
    position: relative;
    z-index: 2;
    background: rgba(255,255,255,0.9);
    padding: 4px 8px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    border: 1px solid rgba(74, 144, 226, 0.2);
    text-align: center;
}

#targetMonthlyResult p {
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
    border: 2px solid rgba(156, 39, 176, 0.3);
    border-left-color: #9c27b0;
}

#targetMonthlyResult p:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

#targetMonthlyResult p {
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
    border: 2px solid rgba(156, 39, 176, 0.3);
    border-left-color: #9c27b0;
}

#targetMonthlyResult p::before {
    content: '🎯';
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    opacity: 0.1;
    z-index: 0;
}

#targetMonthlyResult p span:first-of-type {
    color: #7b1fa2;
}

#requiredMonthlyAmount {
    color: #4a148c;
    font-size: 30px;
    font-weight: 800;
    display: block;
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#requiredMonthlyWords {
    display: block;
    font-size: 10px;
    color: #6b7280;
    font-style: italic;
    margin-top: 6px;
    font-weight: 500;
    position: relative;
    z-index: 2;
    background: rgba(255,255,255,0.9);
    padding: 4px 8px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    border: 1px solid rgba(74, 144, 226, 0.2);
    text-align: center;
}

#targetMonthlyResult p:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.amount-words-container {
    margin-top: 5px;
    text-align: center;
}

.amount-words-container span {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

#summaryTable td {
    position: relative;
    vertical-align: top;
}

.table-words {
    font-size: 11px;
    color: #999;
    font-style: italic;
    display: block;
    margin-top: 2px;
}

#realValueContainer p {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border-left-color: #ff9800;
}

#realValueContainer p::before {
    background: linear-gradient(90deg, #ff9800, #f57c00);
}

#realValueContainer p {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border-left-color: #ff9800;
}

#realValueContainer p::before {
    background: linear-gradient(90deg, #ff9800, #f57c00);
}

.summary h2 {
    color: #4a90e2;
    margin-bottom: 20px;
    text-align: center;
}

#summaryTable {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

#summaryTable th,
#summaryTable td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

#summaryTable th {
    background: #f8f9ff;
    font-weight: 500;
    color: #555;
}

#summaryTable tr:hover {
    background: #f8f9ff;
}


.graph {
    margin: 30px 0;
}

#growthChart {
    max-height: 400px;
}

#downloadBtn {
    background: linear-gradient(135deg, #50c878, #38b000);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    display: block;
    margin: 0 auto;
    transition: transform 0.2s;
}

#downloadBtn:hover {
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 2em;
    }

    #sipForm,
    .results {
        padding: 20px;
    }

    .tab-nav {
        gap: 5px;
    }

    .tab-button {
        padding: 10px 16px;
        font-size: 14px;
    }

    .totals {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    #summaryTable {
        font-size: 14px;
    }

    #summaryTable th,
    #summaryTable td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .input-section {
        padding: 15px;
    }

    .form-group {
        margin-bottom: 15px;
    }
}
.footer {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 40px 0;
    margin-top: 40px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #ecf0f1;
    border-bottom: 2px solid #4a90e2;
    padding-bottom: 5px;
}

.sip-heading {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: #ecf0f1;
    border-bottom: 2px solid #4a90e2;
    padding-bottom: 10px;
    font-weight: 700;
}

.sip-description, .sip-subtext {
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 1.1em;
    color: #bdc3c7;
    font-weight: 400;
}

.steps-list, .formula-list, .advantages-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.steps-list li, .formula-list li, .advantages-list li {
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 12px;
    padding: 15px 20px;
    border-radius: 12px;
    border-left: 4px solid #4a90e2;
    line-height: 1.6;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-right: 1px solid rgba(255,255,255,0.2);
}

.steps-list li:hover, .formula-list li:hover, .advantages-list li:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.steps-list li::before, .advantages-list li::before {
    content: '★';
    color: #ffeb3b;
    font-weight: bold;
    margin-right: 12px;
    font-size: 1.2em;
    vertical-align: middle;
}

.formula-list {
    margin-top: 10px;
}

.formula-list li {
    border-left-color: #9c27b0;
}

.formula-list li::before {
    content: '📝';
    color: #9c27b0;
    margin-right: 12px;
    font-size: 1.2em;
}

.faqs {
    margin-top: 30px;
}

.faqs details {
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    transition: box-shadow 0.3s ease;
}

.faqs details:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.faqs summary {
    padding: 18px 20px;
    cursor: pointer;
    font-weight: 600;
    color: #ecf0f1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    background: rgba(0,0,0,0.1);
    font-size: 1.1em;
    display: flex;
    align-items: center;
    position: relative;
}

.faqs summary::before {
    content: '❓';
    margin-right: 12px;
    font-size: 1.2em;
}

.faqs summary:hover {
    background: rgba(0,0,0,0.2);
    color: #fff;
}

.faqs summary[open] {
    background: rgba(74, 144, 226, 0.2);
    color: #4a90e2;
}

.faqs summary[open]::before {
    content: '✅';
    color: #4caf50;
}

.faqs div {
    padding: 18px 20px;
    line-height: 1.6;
    background: rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
    font-size: 1em;
}

.example-box p {
    margin-bottom: 8px;
    font-weight: 600;
    color: #ffeb3b;
}

.sip-note, .cta, .disclaimer {
    font-style: italic;
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid #ff5722;
}

.cta {
    text-align: center;
    font-weight: 600;
    color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
    border-left-color: #4caf50;
}

.disclaimer {
    color: #ffeb3b;
    background: rgba(255, 235, 59, 0.1);
    border-left-color: #ffeb3b;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    .footer {
        padding: 30px 0;
    }

    .sip-heading {
        font-size: 1.5em;
    }

    .sip-description, .sip-subtext {
        font-size: 1em;
    }

    .steps-list li, .formula-list li, .advantages-list li {
        padding: 12px 15px;
        font-size: 0.95em;
    }

    .formula-box, .example-box {
        padding: 15px;
        margin: 10px 0;
    }

    .faqs summary {
        padding: 15px;
        font-size: 1em;
    }

    .faqs div {
        padding: 15px;
        font-size: 0.95em;
    }
}
.radio-group {
    display: flex;
    flex-direction: row;
    gap: 15px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    font-weight: 500;
    cursor: pointer;
    color: #555;
}

.radio-label input[type="radio"] {
    margin-right: 8px;
    transform: scale(1.2);
}

.input-with-slider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.input-with-slider input[type="number"] {
    flex: 1;
    max-width: 120px;
}

.input-with-slider input[type="range"] {
    flex: 2;
    height: 6px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.input-with-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4a90e2;
    cursor: pointer;
}

.input-with-slider input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4a90e2;
    cursor: pointer;
    border: none;
}

@media (max-width: 768px) {
    .input-with-slider {
        flex-direction: column;
        align-items: stretch;
    }

    .input-with-slider input[type="number"] {
        max-width: none;
    }
}
/* Remove number input spinners */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

.unit {
    font-weight: bold;
    color: #4a90e2;
    margin-left: 5px;
    font-size: 16px;
}

.input-with-slider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
    position: relative;
}

.input-wrapper {
    position: relative;
    flex: 1;
    max-width: 120px;
    display: flex;
    align-items: center;
}

.input-wrapper input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
    background: transparent;
}

.input-wrapper.has-prefix input[type="number"] {
    padding-left: 35px;
}

.input-wrapper.has-suffix input[type="number"] {
    padding-right: 35px;
}

.input-wrapper input[type="number"]:focus {
    outline: none;
    border-color: #4a90e2;
}

.prefix,
.suffix {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-weight: 500;
    pointer-events: none;
    z-index: 1;
    font-size: 16px;
}

.prefix {
    left: 10px;
}

.suffix {
    right: 10px;
}

.input-with-slider .unit {
    position: absolute;
    right: -25px;
    top: 50%;
    transform: translateY(-50%);
}

.input-with-slider input[type="range"] {
    flex: 2;
    height: 6px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.input-with-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4a90e2;
    cursor: pointer;
}

.input-with-slider input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4a90e2;
    cursor: pointer;
    border: none;
}

@media (max-width: 768px) {
    .radio-group {
        flex-direction: column;
        gap: 10px;
    }

    .input-with-slider {
        flex-direction: column;
        align-items: stretch;
    }

    .input-with-slider input[type="number"] {
        max-width: none;
        margin-bottom: 10px;
    }

    .input-with-slider input[type="range"] {
        width: 100%;
        margin: 0 auto;
        display: block;
    }

    .totals {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .totals p {
        font-size: 16px;
    }

    .totals p span:last-of-type {
        font-size: 20px;
    }
}