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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #6e8efb, #a777e3);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    color: #2c3e50;
    line-height: 1.6;
}

.calculator {
    background: rgba(255, 255, 255, 0.97);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 650px;
    margin-top: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.3);
    position: relative;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.logo {
    height: 50px;
    width: auto;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin: 20px 0 30px;
    font-size: 28px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

h1 i {
    color: #3498db;
    font-size: 24px;
}

.input-group {
    margin-bottom: 25px;
    position: relative;
}

label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-weight: 600;
    color: #34495e;
    font-size: 15px;
}

label i {
    color: #3498db;
    width: 20px;
    text-align: center;
}

input[type="number"] {
    width: 100%;
    padding: 14px 45px 14px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f9f9f9;
    font-family: 'Poppins', sans-serif;
}

input[type="number"]:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
}

input[type="range"] {
    width: 100%;
    margin-top: 12px;
    height: 8px;
    border-radius: 4px;
    background: #e0e0e0;
    accent-color: #3498db;
    cursor: pointer;
    transition: all 0.2s ease;
}

input[type="range"]:hover {
    accent-color: #2980b9;
}

.service-item input[type="number"] {
    width: 100%;
    padding: 14px 45px 14px 15px;
}

.range-value {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #7f8c8d;
    font-weight: 500;
    pointer-events: none;
}

.service-item .range-value {
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.dual-input {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.dual-input div {
    flex: 1;
    min-width: 150px;
    position: relative;
}

.service-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8f9fa, #eef2f5);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #d6e0f0;
    margin-bottom: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.service-toggle:hover {
    background: linear-gradient(135deg, #eef2f5, #e1e8f0);
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

.service-toggle .toggle-text {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 16px;
}

.service-toggle .toggle-icon {
    transition: all 0.3s ease;
    color: #3498db;
    font-size: 14px;
}

.service-toggle.open {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.service-inputs {
    display: none;
    padding: 20px;
    background: white;
    border-radius: 0 0 12px 12px;
    border: 1px solid #d6e0f0;
    border-top: none;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.service-inputs.open {
    display: block;
    animation: slideDown 0.4s ease forwards;
}

.service-item {
    margin-bottom: 25px;
    position: relative;
}

.service-item:last-child {
    margin-bottom: 0;
}

.service-item label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    cursor: pointer;
}

.service-price {
    font-size: 14px;
    color: #7f8c8d;
    margin-left: 8px;
    font-weight: 500;
}

.service-item input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3498db;
}

.buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

button {
    flex: 1;
    padding: 16px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

button:active {
    transform: translateY(-1px);
}

.organic {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
}

.fast {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

#downloadPdf {
    background: linear-gradient(135deg, #e67e22, #d35400);
    margin-top: 20px;
    width: 100%;
}

#result {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    display: none;
    animation: fadeIn 0.5s;
    min-width: 200px;
    text-align: center;
}

.error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
    display: none;
    animation: fadeIn 0.5s;
}

.language-selector select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    background: #f9f9f9;
    font-size: 14px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

.language-selector select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 720px;
    width: 90%;
    position: relative;
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
    animation: fadeIn 0.3s;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #34495e;
    transition: all 0.3s ease;
}

.close:hover {
    color: #e74c3c;
    transform: scale(1.1);
}

#orderSummary {
    font-size: 16px;
    line-height: 1.6;
    color: #2c3e50;
}

#orderSummary strong.total-cost {
    font-size: 24px;
    color: #e74c3c;
    display: block;
    margin-top: 20px;
    padding-top: 10px;
    border-top: 2px solid #f0f4f8;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 1000px;
    }
}

@media (max-width: 768px) {
    .calculator {
        padding: 25px;
        margin: 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .language-selector {
        align-self: flex-end;
    }
    
    .buttons {
        flex-direction: column;
    }
    
    .dual-input div {
        min-width: 100%;
    }
    
    .modal-content {
        max-width: 540px;
    }
    
    #result {
        bottom: 15px;
        right: 15px;
        padding: 12px 20px;
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .calculator {
        padding: 20px;
    }
    
    h1 {
        font-size: 22px;
        flex-direction: column;
        gap: 8px;
    }
    
    button {
        padding: 14px;
        font-size: 15px;
    }
    
    .modal-content {
        padding: 20px;
        max-width: 360px;
    }
    
    #result {
        bottom: 10px;
        right: 10px;
        padding: 10px 15px;
        min-width: 150px;
        font-size: 14px;
    }
}