:root {
    --bg-dark: #0f1115;
    --bg-panel: rgba(22, 24, 29, 0.7);
    --border-light: rgba(255, 255, 255, 0.1);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --accent-primary: #8b5cf6;
    --accent-secondary: #ec4899;
    --accent-glow: rgba(139, 92, 246, 0.4);
    
    --success: #10b981;
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Animated Blobs */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(100px);
    opacity: 0.5;
    animation: float 20s infinite alternate cubic-bezier(0.5, 0, 0.5, 1);
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(5%, 10%) scale(1.1); }
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.05em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.calculator-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 2rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* Glassmorphism Classes */
.glass-panel, .glass-card {
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Inputs Panel */
.inputs-panel {
    padding: 2rem;
}

.inputs-panel h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.divider {
    height: 1px;
    background: var(--border-light);
    margin: 2rem 0;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.input-header label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.value-display {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-primary);
    background: rgba(139, 92, 246, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* Range Sliders */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]:focus {
    outline: none;
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    transition: all 0.2s ease;
}

input[type=range]:hover::-webkit-slider-runnable-track {
    background: rgba(255, 255, 255, 0.2);
}

input[type=range]::-webkit-slider-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -7px;
    box-shadow: 0 0 10px var(--accent-glow);
    transition: transform 0.1s;
}

input[type=range]:active::-webkit-slider-thumb {
    transform: scale(1.2);
}

/* Results Panel */
.results-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.kpi-card {
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.kpi-card.highlight {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px var(--accent-glow);
}

.kpi-card h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.kpi-card small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Chart Container */
.chart-container {
    padding: 1.5rem;
    height: 400px;
    position: relative;
    width: 100%;
}

/* Insights */
.insights-card {
    padding: 1.5rem;
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.2);
}

.insights-card h3 {
    font-size: 1rem;
    color: var(--success);
    margin-bottom: 0.5rem;
}

.insights-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 4rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Lead Capture CTA */
.lead-capture {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px dashed rgba(16, 185, 129, 0.3);
}

.lead-capture h4 {
    color: var(--text-main);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.lead-capture p {
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.lead-form {
    display: flex;
    gap: 0.5rem;
}

.lead-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-main);
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

.lead-form input:focus {
    border-color: var(--success);
}

.cta-button {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.cta-button:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 968px) {
    .calculator-layout {
        grid-template-columns: 1fr;
    }
    
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    
    .lead-form {
        flex-direction: column;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
}
