:root {
    --bg-color: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.5);
    --panel-bg: rgba(30, 41, 59, 0.7);
    --panel-border: rgba(255, 255, 255, 0.1);
    --positive-color: #10b981;
    --negative-color: #ef4444;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Background Animations */
.background-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #3b82f6, transparent 70%);
    top: -10%;
    left: -10%;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #8b5cf6, transparent 70%);
    bottom: -20%;
    right: -10%;
    animation-delay: -5s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #10b981, transparent 70%);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 50px) scale(1.1); }
}

.container {
    max-width: 1200px;
    width: 90%;
    margin: 40px auto;
    z-index: 1;
}

.header {
    text-align: center;
    margin-bottom: 40px;
}

.header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.badge {
    font-size: 1rem;
    background: linear-gradient(135deg, #38bdf8, #8b5cf6);
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 20px var(--accent-glow);
}

.verification-badge {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    font-size: 0.75rem;
    padding: 2px 8px;
    margin-left: 10px;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
}

.header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

.calculator {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

@media (max-width: 800px) {
    .calculator {
        grid-template-columns: 1fr;
    }
}

.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
}

h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 15px;
}

/* Inputs */
.input-group {
    margin-bottom: 30px;
}

.input-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.tooltip {
    cursor: help;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.tooltip:hover {
    opacity: 1;
}

.range-container {
    display: flex;
    align-items: center;
    gap: 20px;
}

input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    margin-top: -8px;
    box-shadow: 0 0 15px var(--accent-glow);
    transition: transform 0.1s ease;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

input[type=range]:focus {
    outline: none;
}

.value-display {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 16px;
    border-radius: 12px;
    font-weight: 600;
    min-width: 90px;
    text-align: center;
    border: 1px solid var(--panel-border);
    font-variant-numeric: tabular-nums;
}

.shift-label {
    min-width: 110px;
}

/* Results */
.highlight-panel {
    position: relative;
    overflow: hidden;
}

.highlight-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #38bdf8, #10b981);
}

.cost-comparison {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    padding: 20px;
}

.cost-item {
    display: flex;
    flex-direction: column;
}

.human-cost .cost-value {
    color: var(--negative-color);
}

.robot-cost .cost-value {
    color: var(--accent-color);
}

.cost-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cost-value {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 5px 0;
    font-variant-numeric: tabular-nums;
}

.cost-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.vs {
    font-weight: 800;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.savings-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.savings-card:hover {
    transform: scale(1.02);
}

.savings-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    to { left: 200%; }
}

.savings-card.yearly {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--panel-border);
}

.savings-card h3 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 10px;
}

.savings-amount {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--positive-color);
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
    font-variant-numeric: tabular-nums;
}

.savings-card.yearly .savings-amount {
    font-size: 2.5rem;
    color: var(--text-primary);
    text-shadow: none;
}

.savings-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 5px;
}

.shift-context {
    background: rgba(56, 189, 248, 0.1);
    border-left: 4px solid var(--accent-color);
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-top: 30px;
}

/* Animations for updates */
.update-anim {
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
