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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #212529;
    color: #FFFFFF;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.calculator-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 40px 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

h1 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 10px;
    font-weight: 600;
    background: linear-gradient(135deg, #FFFFFF, #cccccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
    font-size: 1rem;
}

.input-group {
    margin-bottom: 35px;
}

label {
    display: block;
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 15px;
    color: #FFFFFF;
}

.slider-container {
    position: relative;
}

input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgb(254, 78, 94);
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(254, 78, 94, 0.4);
    transition: all 0.2s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(254, 78, 94, 0.6);
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgb(254, 78, 94);
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 12px rgba(254, 78, 94, 0.4);
    transition: all 0.2s ease;
}

input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(254, 78, 94, 0.6);
}

input[type="range"]::-moz-range-track {
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
}

.value-display {
    text-align: right;
    margin-top: 10px;
}

.editable-value {
    background: rgba(254, 78, 94, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    color: rgb(254, 78, 94);
    border: 1px solid rgba(254, 78, 94, 0.3);
    font-size: 1rem;
    text-align: center;
    min-width: 120px;
    outline: none;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: inherit;
}

.editable-value:focus {
    background: rgba(254, 78, 94, 0.2);
    border-color: rgb(254, 78, 94);
    box-shadow: 0 0 0 3px rgba(254, 78, 94, 0.1);
    transform: scale(1.02);
}

.editable-value:hover:not(:focus) {
    background: rgba(254, 78, 94, 0.15);
    transform: scale(1.01);
}

.results {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.result-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.result-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #FFFFFF;
}

.total-loss {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, rgba(254, 78, 94, 0.1), rgba(254, 78, 94, 0.05));
    border-radius: 15px;
    border: 2px solid rgba(254, 78, 94, 0.3);
    margin-top: 25px;
}

.total-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: #FFFFFF;
}

.total-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgb(254, 78, 94);
    text-shadow: 0 2px 4px rgba(254, 78, 94, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-card {
        padding: 30px 20px;
        margin: 10px;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 0.9rem;
    }
    
    .total-value {
        font-size: 1.3rem;
    }
    
    .editable-value {
        min-width: 100px;
        font-size: 0.9rem;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .calculator-card {
        padding: 25px 15px;
    }
    
    .result-item {
        padding: 12px 15px;
    }
    
    .total-loss {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.6rem;
    }
    
    .editable-value {
        min-width: 90px;
        font-size: 0.85rem;
    }
}

/* Animation pour les changements de valeurs */
.result-value, .total-value {
    transition: all 0.3s ease;
}

.result-value:hover, .total-value:hover {
    transform: scale(1.02);
}