:root {
    --bg-dark: #0f1016;
    --bg-darker: #050508;
    --primary: #8b5cf6;
    --primary-glow: rgba(139, 92, 246, 0.5);
    --text-main: #ffffff;
    --text-muted: #9ca3af;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-hover: rgba(139, 92, 246, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.background-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    background:
        radial-gradient(circle at 10% 20%, rgba(139, 92, 246, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.15) 0%, transparent 40%);
    opacity: 0.8;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
}

h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.text-gradient {
    background: linear-gradient(90deg, #fff, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #6d28d9);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
}



/* Calculator 2.0 - Overrides and Extensions */
.calculator-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem 0.5rem 1rem;
    /* Reduced padding further */
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.header-content h1 {
    margin-bottom: 0.5rem;
}

.subtitle {
    text-align: left;
    display: block;
    margin-top: 0.5rem;
}

/* Currency Toggle */
.currency-toggle {
    display: flex;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.currency-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.currency-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.currency-btn.active {
    background: var(--primary);
    color: white;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
}

.calculator-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem 5rem 1rem;
    /* Added bottom padding, reduced top */
}

.input-card,
.results-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
    transition: min-height 0.4s ease;
}

#card-basic {
    transition: min-height 0.4s ease;
}

.results-card h2 {
    font-size: 1.15rem;
    margin-bottom: 0.4rem;
}

.results-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
}

.results-card {
    position: sticky;
    top: 2rem;
    padding-bottom: 2.4rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.input-group input,
.input-group select {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
}

.input-group select {
    cursor: pointer;
}

/* Sliders */
.pillar-control {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.pillar-control:last-child {
    border: none;
}

.pillar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.pillar-title {
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pillar-value {
    color: var(--primary);
    font-weight: 700;
}

input[type=range] {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    margin-top: -8px;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

input[type=range]:disabled,
input[type=range]:disabled::-webkit-slider-thumb {
    cursor: default !important;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* Slider Validation (Social Proof) */
.slider-validation {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.slider-validation.low {
    background: rgba(59, 130, 246, 0.1);
    color: #60a5fa;
}

.slider-validation.medium {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.slider-validation.high {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

/* Results */
.total-impact {
    text-align: center;
    padding: 0.6rem;
    background: rgba(139, 92, 246, 0.05);
    border-radius: 16px;
    margin-bottom: 0.6rem;
}

.impact-number {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(90deg, #a78bfa, #fff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0.1rem 0;
}

.impact-period {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Gated Section */
.gated-section {
    position: relative;
    margin-top: 1rem;
}

.gated-content {
    filter: blur(8px);
    pointer-events: none;
    transition: filter 0.5s ease;
    user-select: none;
}

.gated-content.unlocked {
    filter: blur(0);
    pointer-events: auto;
    user-select: auto;
}

.unlock-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    background: rgba(15, 16, 22, 0.95);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--primary);
    backdrop-filter: blur(10px);
    color: var(--primary);
}

.unlock-overlay.hidden {
    display: none;
}

.gated-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.7rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 0.3rem;
}

.gated-metric-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    /* Compact label */
}

.gated-metric-value {
    font-size: 1.1rem;
    /* Compact value */
    font-weight: 700;
    color: white;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-dark);
    padding: 3rem;
    border-radius: 24px;
    max-width: 500px;
    width: 90%;
    border: 1px solid var(--primary);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-content h2 {
    margin-bottom: 1rem;
}

.modal-content p {
    margin-bottom: 2rem;
}

/* Advanced Inputs (Hidden initially) */
.advanced-inputs {
    display: none;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
}

.advanced-inputs.visible {
    display: block;
}

/* Scenario Switcher */
.scenario-switcher {
    display: flex;
    background: rgba(15, 23, 42, 0.6);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
    gap: 4px;
}

.scenario-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.6rem 0.5rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.scenario-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.scenario-btn.active {
    background: var(--primary);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.scenario-lock-note {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.85rem;
    color: #a78bfa;
    margin-bottom: 2rem;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .calculator-layout {
        grid-template-columns: 1fr;
    }

    .calculator-header {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Reset Button Style */
.btn-reset {
    background: rgba(255, 255, 255, 0.05);
    /* Less "grayed out" */
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 auto;
}

.btn-reset:hover {
    background: rgba(239, 68, 68, 0.1);
    /* Subtle red tint on hover to indicate destructive action */
    color: #f87171;
    border-color: #ef4444;
    transform: translateY(-1px);
}

/* Footer credit enhancements */
.calculator-footer {
    text-align: center;
    padding: 2rem 2rem 3rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 4rem;
}

.footer-signature {
    font-weight: 500;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-signature:hover {
    opacity: 1;
}

.footer-signature a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.2s ease;
    margin-left: 0.2rem;
}

.footer-signature a:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Locked States Clarity */
.input-group.locked label::after {
    display: none;
    /* Hide the label suffix as it's now inside the dropdown */
}

select[disabled] {
    opacity: 1 !important;
    cursor: not-allowed !important;
    background: rgba(239, 68, 68, 0.1) !important;
    /* Subtle red bg */
    border-color: rgba(239, 68, 68, 0.4) !important;
    color: #ef4444 !important;
    /* Red color as requested */
    -webkit-text-fill-color: #ef4444 !important;
    font-weight: 600 !important;
}

/* CSS based text removals for scenario buttons */
.scenario-btn[data-scenario="custom"].active::after {
    display: none;
}


/* Animations */
@keyframes shimmer {
    0% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.8;
    }
}

#scenario-unlock-message {
    animation: shimmer 2s infinite ease-in-out;
}