:root {
    --bg-color: #f8fafc;
    /* Very light slate/grey for premium feel */
    --card-bg-white: #ffffff;
    --card-bg-dark: #1e293b;
    /* Slate 800 for result boxes */
    --text-primary: #0f172a;
    /* Slate 900 */
    --text-secondary: #64748b;
    /* Slate 500 */
    --text-inverse: #ffffff;
    --accent-color: #4f46e5;
    /* Indigo 600 */
    --accent-light: #e0e7ff;
    /* Indigo 100 */
    --slider-track: #cbd5e1;
    /* Slate 300 */
    --border-color: #e2e8f0;
    /* Slate 200 */
    --success-bg: #ecfdf5;
    /* Emerald 50 */
    --success-text: #047857;
    /* Emerald 700 */
    --error-text: #ef4444;
    /* Red 500 */
    --font-family: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-family);
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
    line-height: 1.5;
}

.main-container {
    width: 100%;
    max-width: 800px;
}

/* Calculator Container */
.calculator {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.calculator__intro {
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--error-text);
    font-size: 0.9rem;
    font-weight: 500;
}

.calculator__step-title {
    color: var(--accent-color);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Sections */
.calculator__section {
    display: flex;
    flex-direction: column;
}

.calculator__row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

/* Grouping of Inputs */
.calculator__group {
    flex: 1;
    min-width: 280px;
    background-color: var(--card-bg-white);
    color: var(--text-primary);
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    position: relative;
}

.calculator__label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Custom Dropdown Styling */
.calculator__select-wrapper {
    position: relative;
}

.calculator__select {
    width: 100%;
    appearance: none;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    padding-right: 1.5rem;
    font-family: var(--font-family);
}

.calculator__select:focus {
    outline: none;
}

/* Custom Arrow for Select */
.calculator__select-wrapper::after {
    content: '▼';
    font-size: 0.8rem;
    color: var(--text-primary);
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* Value Display (for sliders) */
.calculator__value-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

/* Subtext */
.calculator__subtext {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

/* Sliders */
.calculator__slider-wrapper {
    margin-top: auto;
    padding-top: 1rem;
}

.calculator__slider {
    width: 100%;
    -webkit-appearance: none;
    height: 8px;
    border-radius: 4px;
    background: var(--slider-track);
    outline: none;
    cursor: pointer;
    margin-bottom: 0.75rem;
}

/* Slider Track Fill Logic is in JS, but base style is here */

/* Chrome/Safari Thumb */
.calculator__slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid white;
}

.calculator__slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

/* Firefox Thumb */
.calculator__slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calculator__slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Result Boxes */
.calculator__result-box {
    /* Step 2 & 4 from mockup: Dark background with border? Or Light?
     User requested "Not Dark Themed".
     I will make these distinct but compatible with light theme.
     Maybe a very dark slate to keep contrast with the accent text, OR a light box with colored border.
     Let's go with a Light Box with thick Left Border or distinct style.
  */
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    background-color: var(--card-bg-dark);
    /* Keeping results dark for contrast/pop?
     Wait, if user said "Not Dark Themed", maybe they want EVERYTHING light.
     Let's use a very light grey or white with specific styling.
     Actually, if I invert the original:
     Inputs = White
     Results = Black
     
     Inverted:
     Inputs = Grey/Off-white?
     Results = White?

     Let's try white results with dark text.
  */
    background-color: var(--card-bg-dark);
    /* I'll keep this dark to match the "Result" concept which often mimics a terminal or distinct area, UNLESS it looks too dark.
  Let's swap it. Let's make result boxes White but with a dark border or distinct shadow.
  */
    background-color: #f1f5f9;
    /* Slate 100 */
    border: none;
}

.calculator__section--result .calculator__step-title {
    /* Title is outside box */
}

.calculator__formula {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-family: monospace;
    /* Technical feel */
}

.calculator__big-number {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--accent-color);
}

/* Final Savings Box */
.calculator__final-box {
    background-color: var(--success-bg);
    border: 1px solid #d1fae5;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.calculator__final-label {
    color: var(--success-text);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.calculator__final-number {
    color: var(--success-text);
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.calculator__disclaimer {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-style: italic;
    margin-top: 2rem;
    text-align: center;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .calculator__row {
        flex-direction: column;
    }
}