/* Password Length Section */
.password-length-section {
    margin-bottom: 20px;
}

.password-length-section h3 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.preset-section {
    margin-top: 10px;
}

/* Password Details Section */
.password-details-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #202225;
}

.password-details-section h3 {
    color: #ffffff;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #b9bbbe;
    font-size: 0.9rem;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #202225;
    border-radius: 4px;
    background: #40444b;
    color: #dcddde;
    font-size: 0.9rem;
    font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    transition: border-color 0.2s ease;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #5865f2;
    box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.3);
}

.input-group input::placeholder,
.input-group select::placeholder {
    color: #72767d;
}

/* Length Control */
.length-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.length-btn {
    width: 32px;
    height: 32px;
    background: #40444b;
    border: 1px solid #202225;
    border-radius: 4px;
    color: #dcddde;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.length-btn:hover {
    background: #5865f2;
    border-color: #5865f2;
    color: #ffffff;
    transform: translateY(-1px);
}

.length-btn:active {
    transform: translateY(0);
}

.length-btn:disabled {
    background: #2f3136;
    border-color: #202225;
    color: #72767d;
    cursor: not-allowed;
    transform: none;
}

.length-input {
    width: 35px;
    height: 32px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: bold;
    color: #dcddde;
    background: #40444b;
    border: 1px solid #202225;
    border-radius: 4px;
    padding: 0;
    -moz-appearance: textfield;
    appearance: textfield;
}

.length-input::-webkit-outer-spin-button,
.length-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.length-input:focus {
    outline: none;
    border-color: #5865f2;
    box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.3);
}

.length-presets {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.preset-btn {
    padding: 8px 12px;
    background: #2f3136;
    border: 1px solid #202225;
    border-radius: 4px;
    color: #b9bbbe;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-btn:hover {
    background: #40444b;
    border-color: #5865f2;
    color: #dcddde;
    transform: translateY(-1px);
}

.preset-btn.active {
    background: #5865f2;
    border-color: #5865f2;
    color: #ffffff;
}

/* Checkboxes */
.input-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #5865f2;
    margin-right: 10px;
    cursor: pointer;
}

.input-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: #dcddde;
}

/* Preview Section */
.preview-content {
    min-height: 400px;
    padding: 15px;
    background: #36393f;
    border-radius: 6px;
    border: 1px solid #202225;
    font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.5;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-preview {
    text-align: center;
    width: 100%;
}

.password-display-preview {
    background: #2f3136;
    border: 2px solid #40444b;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-text {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    color: #dcddde;
    letter-spacing: 2px;
    word-break: break-all;
    line-height: 1.4;
}

.strength-preview {
    background: #2f3136;
    border: 1px solid #40444b;
    border-radius: 8px;
    padding: 15px;
}

.strength-label-preview {
    font-weight: 600;
    color: #b9bbbe;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.strength-bar-preview {
    height: 8px;
    background: #202225;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.strength-fill-preview {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.strength-fill-preview.weak {
    background: linear-gradient(90deg, #f04747, #ff6b6b);
    width: 25%;
}

.strength-fill-preview.medium {
    background: linear-gradient(90deg, #faa61a, #ffcc02);
    width: 50%;
}

.strength-fill-preview.strong {
    background: linear-gradient(90deg, #43b581, #57f287);
    width: 75%;
}

.strength-fill-preview.very-strong {
    background: linear-gradient(90deg, #5865f2, #00d4ff);
    width: 100%;
}

.strength-fill-preview.super-strong {
    background: linear-gradient(90deg, #9c27b0, #e91e63);
    width: 100%;
    animation: pulse 2s infinite;
}

.strength-fill-preview.ultra-strong {
    background: linear-gradient(90deg, #ff6b35, #f7931e, #ffd23f);
    width: 100%;
    animation: rainbow 3s infinite;
}

.strength-text-preview {
    text-align: center;
    font-weight: bold;
    font-size: 0.85rem;
    margin-top: 10px;
}

.strength-text-preview.weak {
    color: #f04747;
}

.strength-text-preview.medium {
    color: #faa61a;
}

.strength-text-preview.strong {
    color: #43b581;
}

.strength-text-preview.very-strong {
    color: #5865f2;
}

.strength-text-preview.super-strong {
    color: #9c27b0;
    text-shadow: 0 0 10px rgba(156, 39, 176, 0.5);
}

.strength-text-preview.ultra-strong {
    background: linear-gradient(45deg, #ff6b35, #f7931e, #ffd23f, #9c27b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

/* Animations for super and ultra strong */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

@keyframes rainbow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Animation for generated password */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.password-generated {
    animation: fadeIn 0.5s ease;
}

/* Custom scrollbar */
.preview-content::-webkit-scrollbar {
    width: 8px;
}

.preview-content::-webkit-scrollbar-track {
    background: #2f3136;
    border-radius: 4px;
}

.preview-content::-webkit-scrollbar-thumb {
    background: #4f545c;
    border-radius: 4px;
    border: 1px solid #2f3136;
}

.preview-content::-webkit-scrollbar-thumb:hover {
    background: #5d6269;
}

/* Firefox scrollbar */
.preview-content {
    scrollbar-width: thin;
    scrollbar-color: #4f545c #2f3136;
}

/* Responsive Design */
@media (max-width: 768px) {
    .editor-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .container {
        padding: 15px;
    }

    .header-controls {
        flex-direction: column;
        gap: 8px;
        align-items: flex-end;
    }

    .copy-button {
        align-self: flex-end;
        font-size: 0.8rem;
        padding: 5px 10px;
    }

    .clear-button {
        align-self: flex-end;
        font-size: 0.8rem;
        padding: 5px 10px;
    }

    .button-group {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        margin-right: 0;
        margin-bottom: 8px;
    }

    .length-control {
        justify-content: center;
        gap: 6px;
    }

    .length-presets {
        justify-content: center;
    }
}

/* Hover Effects */
.input-group input:hover,
.input-group select:hover {
    background: #454950;
}

.input-group input[type="checkbox"]:hover {
    transform: scale(1.1);
}

/* Focus states */
.input-group input:focus,
.input-group select:focus {
    background: #454950;
}