*{
margin:0;
padding:0;
box-sizing:border-box;
font-family:Arial, Helvetica, sans-serif;
}

body{
height:100vh;
display:flex;
justify-content:center;
align-items:center;
background:linear-gradient(135deg,#4facfe,#00f2fe);
}

.container{
background:white;
padding:30px;
border-radius:10px;
width:350px;
text-align:center;
box-shadow:0 10px 25px rgba(0,0,0,0.2);
}

h1{
margin-bottom:20px;
}

.result{
display:flex;
flex-direction:column;
gap:10px;
margin-bottom:20px;
}

.result input{
flex:1;
padding:10px;
font-size:16px;
border:1px solid #ccc;
border-radius:5px 0 0 5px;
}

.result button{
padding:10px;
border:none;
background:#4facfe;
color:white;
cursor:pointer;
border-radius:0 5px 5px 0;
}

.settings{
display:flex;
flex-direction:column;
gap:10px;
margin-bottom:20px;
text-align:left;
}

#generate{
width:100%;
padding:12px;
background:#00c853;
color:white;
border:none;
border-radius:5px;
font-size:16px;
cursor:pointer;
}

.strength{
width:100%;
height:8px;
background:#ddd;
border-radius:5px;
margin-top:10px;
}

#strength-bar{
height:100%;
width:0%;
border-radius:5px;
transition:0.3s;
}

#strength-text{
margin-top:5px;
font-size:14px;
}

.password-box{
display:flex;
}

.password-box input{
flex:1;
padding:10px;
font-size:16px;
border:1px solid #ccc;
border-radius:5px 0 0 5px;
}

.password-box button{
padding:10px;
border:none;
background:#444;
color:white;
cursor:pointer;
border-radius:0 5px 5px 0;
}

.password-box button:hover{
background:#222;
}

#generate{
transition:0.2s;
}

#generate:active{
transform:scale(0.95);
}

#theme-toggle{
position:absolute;
top:20px;
right:20px;
border:none;
background:#222;
color:white;
padding:8px 10px;
border-radius:5px;
cursor:pointer;
}

body.dark{
background:linear-gradient(135deg,#141e30,#243b55);
}

body.dark .container{
background:#1e1e1e;
color:white;
}

body.dark input{
background:#333;
color:white;
border:1px solid #555;
}

body.dark button{
opacity:0.9;
}