.team-builder {
    padding: 3rem 1rem;
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(to bottom, transparent, #0a0a1a, transparent);
}

/* Beautiful Animated Background Glows */
.team-builder::before,
.team-builder::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    opacity: 0.15;
    animation: drift 15s ease-in-out infinite alternate;
}

.team-builder::before {
    background: var(--accent-primary);
    top: -10%;
    left: -10%;
}

.team-builder::after {
    background: var(--accent-secondary);
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
}

@keyframes drift {
    0% {
        transform: scale(1) translate(0, 0);
    }

    50% {
        transform: scale(1.1) translate(20px, -20px);
    }

    100% {
        transform: scale(1) translate(-20px, 20px);
    }
}

.calculator-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
    align-items: start;
    width: 100%;
}

.calc-main {
    padding: 1.5rem;
}

.calc-summary {
    padding: 1.5rem;
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-top: 4px solid var(--accent-primary);
}

.calc-step {
    margin-bottom: 1.5rem;
}

.calc-step:last-child {
    margin-bottom: 0;
}

.calc-step h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    font-family: var(--font-heading);
    color: var(--text-main);
}

.step-sub {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.role-toggles {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.role-toggle {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    color: var(--text-main);
}

.role-toggle:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-1px);
}

.role-toggle.active {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--accent-primary);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.1);
}

.role-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.role-toggle.active .role-icon {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.role-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.role-name {
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 1rem;
}

.role-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Slider styling */
.slider-container {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--glass-border);
}

input[type=range].styled-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: transparent;
    margin: 0.5rem 0 0.25rem;
}

input[type=range].styled-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    border: none;
}

input[type=range].styled-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    border: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: var(--text-main);
    margin-top: -9px;
    box-shadow: 0 0 10px var(--accent-primary);
    border: 3px solid var(--accent-primary);
    cursor: pointer;
    transition: transform 0.1s;
}

input[type=range].styled-slider::-webkit-slider-thumb:active {
    transform: scale(1.1);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.current-hours-display {
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

#hours-val {
    color: var(--text-main);
    font-size: 1.8rem;
    font-weight: 800;
    font-family: var(--font-heading);
    line-height: 1;
    margin-right: 0.2rem;
}

/* Summary Box */
.calc-summary h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    text-align: center;
    margin-bottom: 0.25rem;
}

.cost-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
}

.cost-row.in-house {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    justify-content: center;
    gap: 0.5rem;
}

.cost-row.in-house #inhouse-cost {
    text-decoration: line-through;
    opacity: 0.8;
    color: #ef4444;
}

.nova-price-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 0.5rem 0 1rem;
    gap: 0.25rem;
}

.nova-price-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nova-price-value {
    font-size: 2.8rem;
    font-weight: 800;
    font-family: var(--font-heading);
    line-height: 1;
}

.calc-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 0.5rem 0;
}

.savings-badge {
    text-align: center;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 0.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.savings-badge span {
    font-weight: 800;
}

.full-width {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 0.8rem;
    font-size: 0.95rem;
}

@media (max-width: 992px) {
    .calculator-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .calc-summary {
        position: static;
        margin-top: 1rem;
    }

    .team-builder {
        padding: 2rem 1rem;
        height: auto;
    }

    .nova-price-value {
        font-size: 2.2rem;
    }
}

@media (max-width: 600px) {

    .calc-main,
    .calc-summary {
        padding: 1rem;
        border-radius: 12px;
    }

    .role-toggles {
        grid-template-columns: 1fr;
    }

    .role-toggle {
        padding: 0.6rem 0.8rem;
        gap: 0.75rem;
    }

    .role-icon {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 0.9rem;
        border-radius: 8px;
    }

    .role-name {
        font-size: 0.9rem;
    }

    .role-desc {
        font-size: 0.75rem;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .slider-container {
        padding: 0.75rem 1rem;
    }

    .calc-step {
        margin-bottom: 1rem;
    }

    .calc-step h3 {
        font-size: 1.1rem;
    }

    .nova-price-value {
        font-size: 2.2rem;
    }
}