/* Smooth password masking */
.password-hidden {
    -webkit-text-security: disc; /* Chrome/Safari */
}

/* Other styles remain as before: container, headings, buttons, gradients... */
body {
    font-family: Arial, Helvetica, sans-serif;
    background: #bdbebe;
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 50px 10px;
}

.container { 
    max-width: 500px; 
    width: 100%; 
    background: #fff; 
    border-radius: 12px; 
    box-shadow: 0 8px 20px rgba(0,0,0,0.1); 
    padding: 30px 25px; 
}

h1 { 
    text-align: center; 
    color: #2c3e50; 
    margin-bottom: 20px;
}

/* Password group */
.password-group { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    margin-bottom: 15px; 
}

input[type="text"] { 
    flex: 1; 
    padding: 12px 16px; 
    font-size: 16px; 
    border-radius: 8px; 
    border: 1px solid #ccc; 
    transition: all 0.2s; 
    box-sizing: border-box; 
}

input[type="text"]:focus { 
    border-color: #2575fc; 
    box-shadow: 0 0 6px rgba(37,117,252,0.3); 
    outline: none; 
}

/* Icon buttons */
.btn-icon { 
    background: none; 
    border: none; 
    cursor: pointer; 
    font-size: 18px; 
    position: relative; 
    width: 36px; 
    height: 36px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    color: #e52d27;
    transition: color 0.2s ease;
}

.btn-icon span { transition: opacity 0.3s ease; position: absolute; }
.eye-open { opacity: 1; }
.eye-closed { opacity: 0; }
.btn-icon:hover { color: #b31217; }

/* Generate button */
.btn-primary { 
    background: linear-gradient(to right, #e52d27, #b31217); 
    border: none; 
    padding: 8px 14px; 
    color: #fff; 
    font-weight: bold; 
    border-radius: 8px; 
    cursor: pointer; 
    transition: transform 0.2s; 
}
.btn-primary:hover { transform: scale(1.05); }

/* Strength bar */
#strengthBar { 
    width: 100%; 
    height: 18px; 
    background: #e0e0e0; 
    border-radius: 9px; 
    overflow: hidden; 
    margin-top: 8px; 
}

#strength-fill { 
    height: 100%; 
    width: 0; 
    border-radius: 9px; 
    transition: width 0.5s; 
}

#strength-fill.weak { background: linear-gradient(90deg, #ff6b6b, #ff4c4c); }
#strength-fill.medium { background: linear-gradient(90deg, #ffa500, #ffb84d); }
#strength-fill.strong { background: linear-gradient(90deg, #9acd32, #6ebf3f); }
#strength-fill.very-strong { background: linear-gradient(90deg, #27ae60, #2ecc71); }

/* Strength text */
#strength-text { margin-top: 6px; font-weight: bold; }
#strength-text.weak { color: #ff4c4c; }
#strength-text.medium { color: #ffb84d; }
#strength-text.strong { color: #6ebf3f; }
#strength-text.very-strong { color: #2ecc71; }

/* Pwned warning */
.pwned { 
    color: #e74c3c; 
    font-weight: bold; 
    margin-top: 6px; 
}

/* Criteria list */
#criteria { 
    margin-top: 20px; 
}

#criteria li { 
    list-style: none; 
    margin: 5px 0; 
    padding-left: 20px; 
    position: relative; 
    font-size: 14px; 
}

#criteria li.invalid { 
    color: #c0392b; 
}

#criteria li.valid { 
    color: #27ae60; 
    font-weight: bold; 
}

#criteria li.valid::before { 
    content: "✔"; 
    color: #27ae60; 
    position: absolute; 
    left: 0; 
}

#criteria li.invalid::before { 
    content: "✖"; 
    color: #c0392b; 
    position: absolute; 
    left: 0; 
}

/* Slider */
#password-length-control { 
    margin-top: 20px; 
    display: flex; 
    align-items: center; 
    gap: 12px;
    position: relative; 
}

#lengthValue{
    display: inline-block;
    min-width: 20px;
    text-align: center;
    font-weight: bold;
}

input[type="range"] { 
    -webkit-appearance: none; 
    appearance: none; 
    width: 200px; 
    height: 6px; 
    border-radius: 5px; 
    background: #ddd; 
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; 
    width: 20px; 
    height: 20px; 
    background: #e52d27; 
    border-radius: 50%; 
    cursor: pointer; 
    transition: left 0.2s, background 0.3s;
}

input[type="range"]::-webkit-slider-thumb:hover { 
    background: #b31217; 
}
