:root {
    --primary-color-start: #11998e;
    --primary-color-end: #38ef7d;
    --secondary-color: #64748b;
    --background-color: #f4f7fc;
    --card-background: #ffffff;
    --text-color-primary: #1e293b;
    --text-color-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-color: rgba(17, 153, 142, 0.1);
    --hover-bg: #f8f9fa;
    --success-bg: #e6f8f5;
    --success-border: #a1e9de;
    --danger-bg: #fde2e2;
    --danger-border: #f4b6b6;
}
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}
.main-container { width: 100%; max-width: 900px; }
.tool-card {
    background: var(--card-background);
    padding: 30px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px var(--shadow-color);
    border: 1px solid var(--border-color);
    margin-bottom: 25px;
}
h1 { text-align: center; color: var(--text-color-primary); font-size: 28px; font-weight: 700; margin: 0 0 10px 0; }
.tagline { text-align: center; color: var(--text-color-secondary); font-size: 16px; margin: 0 0 30px 0; }
.main-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.input-panel, .results-panel { display: flex; flex-direction: column; gap: 20px; }
.input-group label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color-primary);
    margin-bottom: 10px;
    display: block;
}
input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 18px;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}
.slider-group { display: flex; align-items: center; gap: 15px; }
input[type="range"] {
    flex-grow: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: var(--border-color);
    border-radius: 5px;
    outline: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color-start);
    cursor: pointer;
    border-radius: 50%;
}
.slider-group span { font-weight: 600; color: var(--primary-color-start); min-width: 90px; text-align: right; }
.results-panel { display: grid; grid-template-rows: auto auto auto auto; gap: 15px; }
.result-box {
    background-color: var(--hover-bg);
    border: 1px solid var(--border-color);
    padding: 15px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
}
.result-box p { margin: 0; color: var(--text-color-secondary); font-weight: 500; }
.result-box h3 { margin: 5px 0 0; font-size: 22px; color: var(--text-color-primary); }
.result-box.maturity-value-box {
    background-image: linear-gradient(45deg, var(--primary-color-start), var(--primary-color-end));
    color: white;
    border: none;
}
.result-box.maturity-value-box p { color: white; opacity: 0.9; }
.result-box.maturity-value-box h2 {
    margin: 5px 0 0;
    font-size: 32px;
    color: white;
    font-weight: 700;
}
/* Styles for Shortfall/Surplus box */
.result-box.shortfall { background-color: var(--danger-bg); border-color: var(--danger-border); }
.result-box.surplus { background-color: var(--success-bg); border-color: var(--success-border); }


/* Other Sections */
.extra-section, footer, .ad-container { margin-top: 25px; }
.ad-container { text-align: center; }
.extra-section { background: var(--card-background); padding: 30px; border-radius: 20px; box-shadow: 0 10px 40px var(--shadow-color); border: 1px solid var(--border-color); }
.section-title { font-size: 22px; font-weight: 600; color: var(--text-color-primary); margin-bottom: 20px; border-bottom: 3px solid var(--primary-color-start); padding-bottom: 10px; }
.tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
.tool-button { display: block; padding: 15px; background-color: var(--hover-bg); color: var(--primary-color-start); text-decoration: none; font-weight: 600; text-align: center; border-radius: 10px; border: 1px solid var(--border-color); transition: all 0.3s ease; }
.tool-button:hover { background-color: var(--primary-color-start); color: white; transform: translateY(-3px); box-shadow: 0 4px 10px var(--shadow-color); }
.how-to-use-list { list-style-type: none; padding-left: 0; counter-reset: steps-counter; }
.how-to-use-list li { position: relative; padding-left: 45px; margin-bottom: 15px; font-size: 16px; color: var(--text-color-secondary); }
.how-to-use-list li::before { counter-increment: steps-counter; content: counter(steps-counter); position: absolute; left: 0; top: 0; width: 30px; height: 30px; background-color: var(--primary-color-start); color: white; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-weight: 600; }
footer { text-align: center; padding: 20px; color: var(--text-color-secondary); font-size: 14px; }

@media (max-width: 850px) {
    .main-layout { grid-template-columns: 1fr; }
}