@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

:root {
    --bg-color: #e0f7fa; /* Light Cyan */
    --container-bg: #ffffff;
    --text-color: #37474f; /* Blue Grey */
    --primary-color: #ff7f50; /* Coral */
    --secondary-color: #66cdaa; /* Medium Aquamarine */
    --accent-color: #8a2be2; /* Blue Violet */
    --input-bg: #eceff1; /* Blue Grey Lighten 5 */
    --border-color: #b0bec5; /* Blue Grey Lighten 3 */
    --shadow-color: rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

.container {
    background-color: var(--container-bg);
    padding: 2rem 2.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px var(--shadow-color);
    width: 100%;
    max-width: 500px;
    text-align: center;
}

h1 {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

h1 i {
    margin-right: 0.5rem;
}

.password-display-container {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    background-color: var(--input-bg);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

#passwordDisplay {
    flex-grow: 1;
    padding: 0.8rem 1rem;
    border: none;
    background-color: transparent;
    font-size: 1.1rem;
    color: var(--text-color);
    outline: none;
    font-family: 'Courier New', Courier, monospace; /* Monospaced font for password */
}

#copyButton {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.8rem 1rem;
    font-size: 1.2rem;
    cursor: pointer;
    border-radius: 0 6px 6px 0;
    transition: background-color 0.3s ease;
}

#copyButton:hover {
    background-color: #55b99a; /* Darker Aquamarine */
}

.options {
    margin-bottom: 1.5rem;
    text-align: left;
}

.option {
    margin-bottom: 1rem;
}

.option label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
    color: #546e7a; /* Blue Grey Darken 1 */
}

.checkbox-option label {
    display: inline-block;
    margin-left: 0.5rem;
    font-weight: 400;
    cursor: pointer;
}

.checkbox-option input[type="checkbox"] {
    accent-color: var(--primary-color);
    cursor: pointer;
    transform: scale(1.2);
    margin-right: 5px;
}

input[type="range"] {
    width: 100%;
    cursor: pointer;
    accent-color: var(--primary-color);
}

#lengthValue {
    font-weight: bold;
    color: var(--primary-color);
}

#generateButton {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.9rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    width: 100%;
    display: inline-flex; /* Align icon and text */
    justify-content: center;
    align-items: center;
    gap: 0.5rem; /* Space between icon and text */
}

#generateButton:hover {
    background-color: #e66a3d; /* Darker Coral */
}

#generateButton:active {
    transform: scale(0.98);
}

.copy-feedback {
    margin-top: 1rem;
    color: var(--secondary-color);
    font-weight: 600;
    min-height: 1.5em; /* Reserve space to prevent layout shift */
    opacity: 0;
    transition: opacity 0.5s ease;
}

.copy-feedback.visible {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 480px) {
    .container {
        padding: 1.5rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    #passwordDisplay {
        font-size: 1rem;
    }

    #copyButton {
        padding: 0.7rem 0.9rem;
        font-size: 1.1rem;
    }

    #generateButton {
        padding: 0.8rem 1.2rem;
        font-size: 1rem;
    }

    .checkbox-option label {
        font-size: 0.9rem;
    }
}
