.pg-tool {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    margin-bottom: 3rem;
}

.pg-heading {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.pg-title {
    font-weight: 700;
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    margin: 0;
}

.pg-status {
    min-height: 1.25rem;
    color: #1f2937;
    font-size: 0.95rem;
}

.pg-output {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pg-password {
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    padding-block: 0.85rem;
}

.pg-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pg-strength {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.pg-strength-track {
    flex: 1 1 auto;
    height: 16px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.2), rgba(148, 163, 184, 0.35));
    overflow: hidden;
    position: relative;
}

.pg-strength-bar {
    position: absolute;
    inset: 0;
    width: 0%;
    background: linear-gradient(90deg, #ef4444, #22c55e);
    transition: width 0.35s ease, background 0.35s ease;
}

.pg-strength-value {
    min-width: 3.5rem;
    font-weight: 600;
    text-align: right;
}

.pg-controls {
    margin-top: 1rem;
}

.pg-mode {
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: rgba(148, 163, 184, 0.08);
}

.pg-mode .form-label {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.pg-mode-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
}

.pg-mode-option .form-check-input {
    width: 1.35rem;
    height: 1.35rem;
}

.pg-mode-option .form-check-label {
    font-size: 1rem;
}

.pg-toggles {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.08);
}

.pg-description {
    margin-top: 2rem;
    padding: 2rem;
    border-radius: 12px;
    background-color: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    line-height: 1.75;
    color: #1f2937;
}

.pg-description h2,
.pg-description h3,
.pg-description h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.pg-description p {
    margin-bottom: 1rem;
}

.pg-length-range {
    margin-top: 1rem;
}

.pg-strength--weak .pg-strength-bar {
    background: linear-gradient(90deg, #ef4444, #f97316);
}

.pg-strength--fair .pg-strength-bar {
    background: linear-gradient(90deg, #f59e0b, #facc15);
}

.pg-strength--good .pg-strength-bar {
    background: linear-gradient(90deg, #22d3ee, #3b82f6);
}

.pg-strength--excellent .pg-strength-bar {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.pg-toggles .form-check-input:disabled + .form-check-label {
    opacity: 0.6;
}

html[dir="rtl"] .pg-tool {
    text-align: right;
}

html[dir="rtl"] .pg-strength {
    flex-direction: row-reverse;
}

html[dir="rtl"] .pg-strength-value {
    text-align: left;
}

html[dir="rtl"] .pg-controls {
    text-align: right;
}

html[dir="rtl"] .pg-mode {
    align-items: flex-end;
}

html[dir="rtl"] .pg-mode-option {
    flex-direction: row-reverse;
    gap: 0.75rem;
}

html[dir="rtl"] .pg-mode-option .form-check-input {
    margin: 0;
}

html[dir="rtl"] .pg-mode-option .form-check-label {
    text-align: right;
}

html[dir="rtl"] .pg-toggles .form-check {
    text-align: right;
}

@media (max-width: 767.98px) {
    .pg-tool {
        padding: 2rem 1.5rem;
    }

    .pg-actions {
        flex-direction: column;
        align-items: stretch;
    }
}
