 
:root {
    --bg: #121212;
    --card-bg: #1e1e1e;
    --text: #e0e0e0;
    --primary: #bb86fc;
    --primary-dark: #3700b3;
    --secondary: #03dac6;
     --divider: #3333;
     --error:#cf6679;
     --toggle-off: #444;
     --togle-on:var(--primary);


}
*{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
}
body{
    background-color: var(--bg);
    color: var(--text);
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 1rem;
    line-height: 1.5;

}
.password-generator{
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    width: 100%;
    max-width: 420px;
     box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}
.tittle{
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-weight: 700;

}
.password-display{
    display: flex;
    align-items: center;
    background-color: var(--bg);
     border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
}
.password-output{
flex: 1;
word-break: break-all;
padding-right: 1rem;
font-family: 'Courier New', Courier, monospace;
 font-size: 1.1rem;

}
.copy-btn{
    background: none;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;

}
.copy-btn:hover{
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary);
     

}
.copy-btn svg{
    width: 20px;
    height: 20px;
    fill: currentColor;

}

.strength-meter{
    margin-bottom: 1.5rem;


} 
.strength-bar{
    height: 6px;
    background: #3333;
    border-radius: 3px;
    margin-bottom: 0.5rem;
    overflow-y: hidden;

}
.strength-bar::after{
    content: '';
    display: block;
    height: 100%;
    width: 0;
    background: var(--error);
    transition: width, 0.3s, background, 0.3s;
}
.strength-text{
    font-size: 0.9rem;
    opacity: 0.8;

}
.controls{
    margin-bottom: 1.5rem;

}
.length-control{
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;

}
.length-control label{
    font-size: 0.9rem;
    opacity: 0.8;
}
.length-value{
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);

}
input[type="range"]{
    width: 100%;
    height: 6px;
    background: var(--divider);
    border-radius: 3px;
    -webkit-appearanc: none;
    accent-color: var(--primary);
    margin: 0.5rem 0;


}
input[type="range"]::-webkit-slider-thumb{
-webkit-appearance: none;
width: 18px;
height: 18px;
background: var(--primary);
border-radius: 50%;
cursor: pointer;

}
/*toggle switch styles */
.toggle-control{
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    position: relative;

}
.toggle-control input[type="checkbox"]{
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}


.toggle-track{
    display: inline-block;
    width: 40px;
    height: 20px;
    background: var(--toggle-off);
    border-radius: 10px;
    position: relative;
    margin-right: 12px;
    transition: background 0.2s;

}
.toggle-track::after{
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;

} 

.toggle-control input:checked + label .toggle-track{
background: var(--primary);
}
.toggle-control input:checked + label .toggle-track::after{
    transform: translateX(20px);
}
.toggle-control label{
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}
.generate-btn{
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: black;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;

}
.generate-btn:hover{
    background: var(--primary-dark);
    color: white;
    transform: translateY(0);
}