
.password-generator {
    max-width: 1000px;
    margin: 40px auto;
    padding: 40px;
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 20px 60px rgba(59, 130, 246, 0.15);
}

.password-generator h2 {
    margin: 0 0 10px 0;
    font-size: 32px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    font-weight: 800;
}

.generator-subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 30px;
    font-size: 16px;
}

.password-display {
    background: #fff;
    border: 3px solid #3b82f6;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.password-container {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
}

/* Карточка одного пароля */
.password-card {
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    position: relative;
    transition: all 0.3s;
}

.password-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.password-card:last-child {
    margin-bottom: 0;
}

.password-number {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #3b82f6;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.password-text {
    font-family: 'Courier New', monospace;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    word-break: break-all;
    line-height: 1.5;
    padding: 10px 40px;
    text-align: center;
    letter-spacing: 1px;
}

.password-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    padding: 8px 40px;
    font-size: 13px;
    color: #64748b;
}

.password-strength {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.strength-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.strength-weak { background: #ef4444; }
.strength-medium { background: #f97316; }
.strength-good { background: #22c55e; }
.strength-excellent { background: #3b82f6; }

.copy-single-btn {
    padding: 6px 12px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.copy-single-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

/* Одиночный пароль (старый стиль) */
.password-single {
    font-family: 'Courier New', monospace;
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    word-break: break-all;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.4;
    letter-spacing: 2px;
    padding: 20px;
}

.password-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: #fff;
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.btn-secondary:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
}

.strength-meter {
    margin: 30px 0;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
}

.strength-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.strength-text {
    font-weight: 700;
    font-size: 16px;
}

.strength-bar {
    height: 12px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

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

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

@media (max-width: 768px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
    .password-generator {
        padding: 20px;
    }
    .password-text {
        font-size: 16px;
    }
    .password-single {
        font-size: 20px;
    }
}

.setting-group {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
}

.setting-group h3 {
    margin: 0 0 16px 0;
    color: #334155;
    font-size: 16px;
    font-weight: 700;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item label {
    font-weight: 600;
    color: #475569;
    font-size: 14px;
}

.setting-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #3b82f6;
}

.setting-item input[type="range"] {
    width: 100%;
    margin-top: 10px;
    accent-color: #3b82f6;
}

.range-value {
    text-align: center;
    font-size: 24px;
    font-weight: 800;
    color: #3b82f6;
    margin: 10px 0;
}

.history-section {
    margin-top: 40px;
    padding: 24px;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    display: none;
}

.history-section.show {
    display: block;
}

.history-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.history-password {
    color: #475569;
    word-break: break-all;
    flex: 1;
}

.history-actions {
    display: flex;
    gap: 8px;
    margin-left: 12px;
}

.history-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.copy-btn {
    background: #3b82f6;
    color: white;
}

.copy-btn:hover {
    background: #2563eb;
}

.delete-btn {
    background: #ef4444;
    color: white;
}

.delete-btn:hover {
    background: #dc2626;
}

.hint-box {
    background: linear-gradient(135deg, #eff6ff 0%, #f5f3ff 100%);
    border-left: 4px solid #3b82f6;
    padding: 20px;
    border-radius: 12px;
    margin-top: 30px;
}

.hint-box strong {
    display: block;
    margin-bottom: 10px;
    color: #1e40af;
    font-size: 16px;
}

.hint-box p {
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 16px 24px;
    background: #10b981;
    color: white;
    border-radius: 12px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s;
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.pulse {
    animation: pulse 0.3s ease;
}

/* Скроллбар для контейнера паролей */
.password-container::-webkit-scrollbar {
    width: 8px;
}

.password-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.password-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.password-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
