@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --primary-color: #6faac7;
    --secondary-color: #9986b7;
    --weak-color: #fc8181;
    --medium-color: #fbd38d;
    --strong-color: #68d391;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Montserrat", sans-serif;
}

body {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #333;
    padding: 20px;
}

.container {
    background-color: #fff;
    padding: 1.8rem;
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    width: 95%;
    max-width: 500px;
}

h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 0.5rem;
}

h1::after{
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.password-container {
    margin-bottom: 1.5rem;
    background-color: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.8rem 0 0;
}

#password {
    width: 100%;
    padding: 0.9rem;
    padding-right: 40px;
    border: none;
    background: transparent;
    color: #4a5568;
    letter-spacing: 1px;
    outline: none;
    border-radius: 10px;
    font-size: 0.95rem;
}

#copy-btn {
    cursor: pointer;
    color: #718096;
    font-size: 1rem;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

#copy-btn:hover {
    color: var(--primary-color);
}

.options {
    margin-bottom: 1.5rem;
    background-color: #f8fafc;
    padding: 1.2rem;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.option::last-child {
    margin-bottom: 0;
}

.option label {
    font-size: 0.85rem;
    color: #4a5568;
    font-weight: 500;
}

.range-container {
    display: flex;
    align-items: center;
    width: 65%;
    gap: 8px;
}

input[type="range"] {
    accent-color: var(--primary-color);
    height: 4px;
    cursor: pointer;
    flex: 1;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid var(--primary-color);
    appearance: none;
    border-radius: 4px;
    cursor: pointer;
    outline: none;
    position: relative;
    transition: all 0.3s;
}

input[type="checkbox"]:checked {
    background-color: var(--primary-color);
}

input[type="checkbox"]:checked::after {
    content: "\2714";
    position: absolute;
    color: white;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
}

#length-value {
    font-weight: 600;
    color: var(--primary-color);
    width: 30px;
    text-align: center;
    background: #e2e8f0;
    border-radius: 4px;
    font-size: 0.85rem;
    padding: 1px 4px;
}

button {
    width: 100%;
    padding: 0.85rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 1.2rem;
    box-shadow: 0 4px 8px rgba(43, 88, 118, 0.2);
}

button:hover {
    transform: translateY(-2px);
}

button:active {
    transform: translateY(0);
}

.strength-container {
    margin-top: 0.8rem;
}

.strength-container p {
    font-size: 0.85rem;
    color: #4a5568;
    margin-bottom: 0.6rem;
    display: flex;
    justify-content: space-between;
    font-weight: 500;
}

#strength-label {
    color: var(--primary-color);
    font-weight: 600;
}

.strength-meter {
    height: 8px;
    background-color: #edf2f7;
    border-radius: 5px;
    margin-top: 0.5rem;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.strength-bar {
    height: 100%;
    width: 0;
    min-width: 5%;
    background-color: var(--weak-color);
    transition: all 0.3s ease;
    border-radius: 5px;
}


@media (max-width: 768px) {
    .container {
        /* max-width: 95%; */
        padding: 1.5rem;
    }

    h1 {
        font-size: 1.4rem;
    }

    .option label {
        font-size: 0.8rem;
    }

     button {
        font-size: 0.9rem;
    }
}


