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

html{
    touch-action: manipulation;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #d7d7d7;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%230024fb' fill-opacity='0.49'%3E%3Cpath opacity='.5' d='M96 95h4v1h-4v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9zm-1 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9z'/%3E%3Cpath d='M6 5V0H5v5H0v1h5v94h1V6h94V5H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-attachment: fixed;
}

/*body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
    background: linear-gradient(150deg, #ff7b00 0%, #ffffff 100%);
    padding: 20px;*/
    
/*body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(90deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    min-height: 100vh;  
}*/

/*body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(90deg, #ff7b00, #ec9d53, #ff7b00, #ec9d53);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    min-height: 100vh;  Важно для корректного отображения 
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}*/

.logo{
    width: 35px;
}

.text_promo{
    text-align: start;
    color: #ff7b00;
    font-size: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
}

h1 {
    color: #0029ffbf;
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.calculator {
    background-color: #ffffff78;
    backdrop-filter: blur(0.5px);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.price-settings {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.price-settings div {
    margin-bottom: 15px;
}

.price-settings label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.price-settings input {
    width: 120px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.additional-expenses {
    padding-top: 10px;
    border-top: 1px solid #ccc;
    margin-top: 15px;
}

.details-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.detail-item {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #3498db;
    position: relative;
}

.detail-item h4 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.detail-item label {
    display: inline-block;
    margin-right: 15px;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.detail-item input[type="number"] {
    width: 80px;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    margin-left: 5px;
}

.detail-area, .detail-cost {
    margin-top: 10px;
    font-size: 0.95rem;
}

.detail-cost {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1rem;
}

.quantity-input {
    max-width: 50px;
    text-align: center;
    margin: 0 5px;
}

.quantity-btn {
    width: 35px;
    height: 35px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    line-height: 28px;
    padding: 0;
    vertical-align: middle;
}

.detail-header{
    display: flex;
    justify-content: space-between;
}

.delete-btn {
    max-width: 25px;
    max-height: 25px;
    background-color: #ffffff;
    color: rgb(0, 0, 0);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 28px;
    line-height: 28px;
    padding: 0;
    vertical-align: middle;
}

.quantity-btn:hover {
    background-color: #2980b9;
}

.quantity-btn:active {
    transform: scale(0.95);
}

.buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

button {
    color: white;
    border: none;
    padding: 12px 24px;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    flex-grow: 1;
}

#addDetailBtn {
    background-color: #3498db;
}

#addDetailBtn:hover {
    background-color: #2980b9;
}

#calculateBtn {
    background-color: #2ecc71;
}

#calculateBtn:hover {
    background-color: #27ae60;
}

.results {
    margin-top: 25px;
    background-color: #e8f8f0;
    padding: 20px;
    border-radius: 8px;
    display: none;
}

.results h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.total {
    margin-top: 12px;
    font-size: 1.05rem;
}

.final-cost {
    font-size: 1.2rem;
    font-weight: bold;
    color: #e74c3c;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #ccc;
}

#detailResults p {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .calculator {
        padding: 15px;
    }
    
    .price-settings input {
        width: 100%;
    }
    
    .detail-item input[type="number"] {
        width: 70px;
    }
    
    .quantity-input {
        width: 40px;
    }
    
    .buttons {
        flex-direction: column;
    }
    
    button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    
    .detail-item {
        padding: 15px;
    }
    
    .detail-item label {
        display: block;
        margin-bottom: 8px;
    }
    
    .detail-item input[type="number"] {
        width: 100%;
        margin-left: 0;
    }
}
