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

body {
    font-family: 'Comic Neue', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #5a4a6a;
    background: linear-gradient(135deg, #ffb7d5 0%, #ff8eb4 50%, #ff69b4 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: #fffafc;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(255, 105, 180, 0.3);
    border: 3px solid #ffb6c1;
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    background: #ff69b4;
    border-radius: 50%;
    opacity: 0.1;
}

.container::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 80px;
    height: 80px;
    background: #ffb6c1;
    border-radius: 50%;
    opacity: 0.1;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #ffe4ec;
    position: relative;
}

h1 {
    color: #d94d7c;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 0px #ffd6e6;
    font-weight: 700;
}

h2 {
    color: #e75480;
    margin-bottom: 15px;
    font-size: 1.4em;
    border-left: 4px solid #ffb6c1;
    padding-left: 10px;
    font-weight: 600;
}

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #fff5f9 0%, #ffeef5 100%);
    border-radius: 15px;
    border-left: 4px solid #ff69b4;
    box-shadow: 0 4px 15px rgba(255, 182, 193, 0.2);
    transition: transform 0.2s ease;
}

.form-section:hover {
    transform: translateY(-1px);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #d94d7c;
    font-size: 1em;
}

select, input[type="number"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ffd1dc;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
    font-family: 'Comic Neue', sans-serif;
}

select:focus, input[type="number"]:focus {
    outline: none;
    border-color: #ff69b4;
    box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.1);
    background: #fffafc;
}

.bin-container {
    margin-bottom: 15px;
}

.bin-row {
    margin-bottom: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 12px;
    border: 2px solid #ffe4ec;
    box-shadow: 0 2px 8px rgba(255, 182, 193, 0.2);
    transition: all 0.2s ease;
}

.bin-row:hover {
    border-color: #ffb6c1;
    box-shadow: 0 4px 12px rgba(255, 182, 193, 0.3);
}

.bin-controls {
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.bin-level-group, .bin-count-group {
    flex: 1;
}

.bin-level-group label, .bin-count-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #e75480;
    font-size: 0.9em;
}

.bin-level-group select, .bin-count-group input {
    width: 100%;
    margin-bottom: 0;
}

.remove-bin {
    background: linear-gradient(135deg, #ff6b9d 0%, #ff4785 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    height: fit-content;
    margin-bottom: 0;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(255, 107, 157, 0.3);
}

.remove-bin:hover {
    background: linear-gradient(135deg, #ff4785 0%, #ff2d6f 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 107, 157, 0.4);
}

.btn-primary, .btn-secondary {
    border: none;
    padding: 15px 30px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.2s ease;
    text-align: center;
    font-family: 'Comic Neue', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #ff69b4 0%, #ff1493 100%);
    color: white;
    width: 100%;
    font-size: 18px;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.4);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ff1493 0%, #db0a7c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 105, 180, 0.6);
}

.btn-secondary {
    background: linear-gradient(135deg, #ffb6c1 0%, #ff91a4 100%);
    color: #d94d7c;
    box-shadow: 0 2px 8px rgba(255, 182, 193, 0.4);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #ff91a4 0%, #ff7a95 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 182, 193, 0.6);
}

.result {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #fff5f9 0%, #ffeef5 100%);
    border-radius: 15px;
    text-align: center;
    border: 2px solid #ffb6c1;
    box-shadow: 0 4px 15px rgba(255, 182, 193, 0.3);
}

.result h3 {
    color: #d94d7c;
    font-size: 2em;
    margin-bottom: 15px;
    text-shadow: 1px 1px 0px #ffd6e6;
}

.breakdown {
    margin-top: 20px;
    text-align: left;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(255, 182, 193, 0.2);
    border: 1px solid #ffe4ec;
}

.breakdown p {
    margin-bottom: 8px;
    padding: 10px;
    background: #fffafc;
    border-radius: 8px;
    border-left: 3px solid #ff69b4;
    font-weight: 500;
}

.warning {
    background: #fff0f5 !important;
    border-left: 3px solid #ff91a4 !important;
    color: #d94d7c !important;
    padding: 12px !important;
    border-radius: 8px;
    margin: 10px 0;
    font-weight: 600;
}

.formula-note {
    margin-top: 15px;
    padding: 15px;
    background: #fff0f5;
    border-radius: 10px;
    border-left: 4px solid #ffb6c1;
    font-size: 0.9em;
    color: #d94d7c;
    text-align: left;
}

.formula-note strong {
    color: #e75480;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #ffeef5;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #ffb6c1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff91a4;
}

/* Responsive design */
@media (max-width: 600px) {
    .container {
        padding: 20px;
        margin: 10px;
        border-radius: 15px;
    }
    
    .bin-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .bin-level-group, .bin-count-group {
        width: 100%;
    }
    
    .remove-bin {
        align-self: flex-end;
        width: auto;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .form-section {
        padding: 15px;
    }
}