/* --- ГЕНЕРАТОР ПАРОЛЕЙ BLOCK_21 --- */
#block_21 {
    padding: 40px 20px;
    background-color: var(--color-2);
}

:root {
    --color-active-dark: #3570c9;
    --color-active-light: #eef4fe;
    --color-text-dark: #1a2c3e;
    --color-text-soft: #5b6e8c;
    --color-bg-card: rgba(255, 255, 255, 0.98);
    --color-border-light: #e9f0f5;
}

/* главная карточка */
.card {
    max-width: 680px;
    width: 100%;
    background: var(--color-bg-card);
    backdrop-filter: blur(0px);
    border-radius: 2rem;
    box-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 2rem 1.8rem 2.2rem;
    transition: all 0.2s ease;
    border: 1px solid rgba(255,255,255,0.6);
}

@media (max-width: 520px) {
    .card {
        padding: 1.5rem 1.2rem;
    }
}

h1 {
    font-size: 1.9rem;
    font-weight: 600;
    background: linear-gradient(135deg, #1e2f44, #2c3e66);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.3px;
    margin-bottom: 0.25rem;
}

.sub {
    color: var(--color-text-soft);
    font-weight: 450;
    margin-bottom: 1.8rem;
    font-size: 0.9rem;
    border-left: 3px solid var(--color-active);
    padding-left: 0.75rem;
}

/* блок пароля */
.password-container {
    background: #fbfdfe;
    border-radius: 1.5rem;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border: 1px solid var(--color-border-light);
    transition: all 0.2s;
    box-shadow: inset 0 1px 2px #00000004, 0 2px 6px rgba(0,0,0,0.02);
    margin-bottom: 2rem;
}

.password-container:focus-within {
    border-color: var(--color-active);
    box-shadow: 0 0 0 3px rgba(70, 143, 244, 0.15);
}

.password-field {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 2rem;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-weight: 500;
    padding: 0.9rem 1rem;
    color: var(--color-text-dark);
    letter-spacing: 0.3px;
    outline: none;
    width: 100%;
}

.password-field:focus {
    outline: none;
}

.action-btn {
    background: white;
    border: none;
    width: 46px;
    height: 46px;
    border-radius: 1.2rem;
    font-size: 1.3rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #2c3e66;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2edf5;
}

.action-btn:hover {
    background: var(--color-active-light);
    transform: scale(0.96);
    color: var(--color-active);
    border-color: var(--color-active);
}

.action-btn:active {
    transform: scale(0.94);
}

.generate-primary {
    background: var(--color-active);
    color: white;
    border: none;
    width: auto;
    padding: 0 1.3rem;
    gap: 0.4rem;
    font-weight: 500;
    font-size: 0.95rem;
    box-shadow: 0 3px 8px rgba(70, 143, 244, 0.25);
}

.generate-primary:hover {
    background: var(--color-active-dark);
    transform: scale(0.97);
    color: white;
    box-shadow: 0 4px 12px rgba(70, 143, 244, 0.3);
}

/* настройки */
.settings {
    margin: 1.5rem 0 1rem;
}

.length-control {
    background: #f9fcff;
    border-radius: 1.5rem;
    padding: 0.8rem 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--color-border-light);
}

.length-header {
    display: flex;
    gap: 20px;
    margin-bottom: 0.8rem;
    font-weight: 500;
    color: var(--color-text-dark);
}

.length-value {
    background: var(--color-active-light);
    padding: 0.2rem 0.9rem;
    border-radius: 40px;
    font-family: monospace;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-active-dark);
}

input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    background: #d9e4ef;
    border-radius: 10px;
    outline: none;
}

input[type="range"]:focus {
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: var(--color-active);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(70, 143, 244, 0.4);
    border: 2px solid white;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    background: var(--color-active-dark);
}

.numeric-length {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 0.7rem;
}

.numeric-length label {
    font-size: 0.8rem;
    color: var(--color-text-soft);
}

#lengthNumber {
    width: 70px;
    padding: 0.4rem 0.2rem;
    text-align: center;
    border: 1px solid #cbdde9;
    border-radius: 1rem;
    font-family: monospace;
    font-weight: 500;
    background: white;
    transition: 0.2s;
}

#lengthNumber:focus {
    border-color: var(--color-active);
    outline: none;
    box-shadow: 0 0 0 2px rgba(70, 143, 244, 0.2);
}

/* чекбоксы */
.options-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.8rem 0 1rem;
}

.option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background: #f9fdfe;
    padding: 0.5rem 1rem;
    border-radius: 60px;
    border: 1px solid #e2edf5;
    transition: all 0.2s;
    cursor: pointer;
}

.option:hover {
    border-color: var(--color-active);
    background: var(--color-active-light);
}

.option input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--color-active);
}

.option label {
    font-weight: 500;
    color: var(--color-text-dark);
    cursor: pointer;
    font-size: 0.9rem;
}

/* индикатор сложности */
.strength {
    background: #f0f6fe;
    border-radius: 1.2rem;
    padding: 0.7rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.4rem 0 0.8rem;
    flex-wrap: wrap;
    gap: 0.6rem;
    border: 1px solid #e2eff9;
}

.strength-label {
    display: flex;
    gap: 10px;
    font-weight: 500;
    color: var(--color-text-dark);
}

.strength-meter {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.strength-text {
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.3rem 1rem;
    border-radius: 40px;
    background: #eef2f9;
}

.weak { 
    color: #b91c1c; 
    background: #ffe8e8;
    border-left: 3px solid #dc2626;
}
.medium { 
    color: #b45309; 
    background: #fff1e6;
    border-left: 3px solid #f97316;
}
.strong { 
    color: #15803d; 
    background: #e6f7ec;
    border-left: 3px solid #22c55e;
}

/* уведомление */
.toast {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: #1f2937;
    color: white;
    padding: 0.6rem 1.5rem;
    border-radius: 60px;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

footer {
    font-size: 0.7rem;
    text-align: center;
    margin-top: 2rem;
    color: #7c93ae;
    border-top: 1px solid #e5eef5;
    padding-top: 1rem;
}

button {
    cursor: pointer;
    font-family: inherit;
}

/* дополнительные акценты */
.action-btn.generate-primary:active {
    transform: scale(0.95);
}

.length-value {
    background: rgba(70, 143, 244, 0.12);
}

/* ___ / ГЕНЕРАТОР ПАРОЛЕЙ BLOCK_21 ___ */