body {
    background-color: #2c3e50; /* A dark, professional background */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #ecf0f1; /* Light text color for contrast */
}

.container {
    background-color: #34495e; /* Slightly lighter background for the container */
    padding: 30px;
    border-radius: 12px;
    width: 350px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); /* A soft, deep shadow */
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: #ffffff;
    letter-spacing: 1px;
}

.range, .settings, .password-display, .btn {
    margin-bottom: 20px;
}

.range p {
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#lengthValue {
    font-weight: bold;
    color: #1abc9c;
    background-color: #2c3e50;
    padding: 5px 10px;
    border-radius: 5px;
}

input[type="range"] {
    width: 100%;
    height: 8px;
    background: #5a7796;
    border-radius: 5px;
    outline: none;
    transition: background 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #1abc9c;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.settings p {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 15px;
    border-bottom: 2px solid #5a7796;
    padding-bottom: 8px;
}

.checkbox-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    margin-bottom: 12px;
}

input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #1abc9c;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

input[type="checkbox"]:checked {
    background-color: #1abc9c;
}

input[type="checkbox"]:checked::after {
    content: '✔';
    font-size: 14px;
    color: #ffffff;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#passwordOutput {
    width: calc(100% - 20px);
    padding: 10px;
    font-size: 1.2rem;
    text-align: center;
    border: 2px solid #5a7796;
    border-radius: 8px;
    background-color: #2c3e50;
    color: #1abc9c;
    font-weight: bold;
    outline: none;
}

.btn button {
    width: 100%;
    padding: 15px;
    background-color: #1abc9c;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn button:hover {
    background-color: #16a085;
    transform: translateY(-2px);
}