/* Основной фон страницы */
body {
    background-color: #F0EFEA;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
}

/* класс .calc */
.calc {
    max-width: 400px;
    width: 90%;
    padding: 40px;
    background-color: #FDFBF7; /* Молочный */
    border-radius: 28px;
    box-shadow: 0 15px 35px rgba(27, 48, 34, 0.1);
    color: #1B3022; /* Темно-зеленый */
}

.main-title {
    text-align: center;
    color: #1B3022; /* темно-зеленый */
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 30px;
    line-height: 1.4;
    
    /* Анимация появления */
    animation: slowShow 2.5s ease-out; 
}

.main-title span {
    color: #6B8E23; 
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Настройка анимации */
@keyframes slowShow {
    from {
        opacity: 0;
        transform: translateY(-10px); 
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Группы ввода */
.input-group, .sliders-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 14px;
}

/* Поле ввода суммы */
.sum-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.sum-input-wrapper::before {
    content: "₽";
    position: absolute;
    left: 18px;
    font-size: 20px;
    font-weight: 700;
    color: #6B8E23;
    pointer-events: none;
    z-index: 1;
}

input[type="text"], input[type="number"] {
    width: 100%;
    padding: 16px 20px 16px 45px;
    background-color: #F5F3EE;
    border: 2px solid transparent;
    border-radius: 16px;
    font-size: 22px;
    font-weight: 700;
    color: #1B3022;
    outline: none;
    transition: 0.3s;
    box-sizing: border-box;
}

input:focus {
    background-color: #FFFFFF;
    border-color: #6B8E23;
}

/* Ползунки */
input[type="range"] {
    width: 100%;
    accent-color: #6B8E23;
    cursor: pointer;
    margin: 10px 0;
}


#month-value, #per-value {
    color: #6B8E23;
    font-weight: 700;
}

.checkbox-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    background: #F5F3EE;
    padding: 15px;
    border-radius: 12px;
    transition: 0.3s;
}

.checkbox-container:hover {
    background: #EBE9E4;
}

/* Контейнер для текста и переключателя */
.toggle-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #F5F3EE;
    padding: 15px 20px;
    border-radius: 16px;
    margin-bottom: 8px;
}

.toggle-wrapper span {
    font-weight: 600;
    font-size: 15px;
    color: #1B3022;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-round {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #E2E0D9;
    transition: .4s;
    border-radius: 34px;
}

.slider-round:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

input:checked + .slider-round {
    background-color: #6B8E23;
}

input:checked + .slider-round:before {
    transform: translateX(20px);
}

.rate-badge {
    font-size: 13px;
    color: #6B8E23;
    font-weight: 700;
    text-align: right;
    padding-right: 5px;
}

.results {
    margin-top: 30px;
    padding: 25px;
    background-color: #F5F3EE;
    border-radius: 20px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}


.total-pay {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #E2E0D9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-pay span:last-child {
    font-size: 26px;
    color: #2D5A27;
    font-weight: 900;
}
